查询优化
This commit is contained in:
@@ -23,7 +23,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.WBS_Breakdown> qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
//private static IQueryable<Model.WBS_Breakdown> qq = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目列表
|
||||
@@ -35,7 +35,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string divisionId, string name, int startRowIndex, int maximumRows)
|
||||
{
|
||||
IQueryable<Model.WBS_Breakdown> q = qq;
|
||||
IQueryable<Model.WBS_Breakdown> q = from x in Funs.DB.WBS_Breakdown orderby x.SortIndex select x;
|
||||
if (!string.IsNullOrEmpty(divisionId))
|
||||
{
|
||||
q = q.Where(e => e.DivisionId == divisionId);
|
||||
|
||||
Reference in New Issue
Block a user