查询优化

This commit is contained in:
2026-04-23 15:18:39 +08:00
parent 746cb57619
commit c2eeffa0de
16 changed files with 223 additions and 143 deletions
+2 -2
View File
@@ -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);