查询优化
This commit is contained in:
@@ -18,10 +18,10 @@ namespace BLL
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.RealName_LeavePost> getLeavePosts = from x in Funs.DB.RealName_LeavePost select x;
|
||||
///// <summary>
|
||||
///// 定义变量
|
||||
///// </summary>
|
||||
//private static IQueryable<Model.RealName_LeavePost> getLeavePosts = from x in Funs.DB.RealName_LeavePost select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
@@ -31,7 +31,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string states, string projectCode, string personName, string identityCard, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.RealName_LeavePost> getLeavePostList = getLeavePosts;
|
||||
IQueryable<Model.RealName_LeavePost> getLeavePostList = from x in Funs.DB.RealName_LeavePost select x;
|
||||
if (states == "1")
|
||||
{
|
||||
getLeavePostList = getLeavePostList.Where(x => x.OutTime.HasValue);
|
||||
|
||||
Reference in New Issue
Block a user