去除静态变量Funs.DB

This commit is contained in:
2025-01-07 19:00:48 +08:00
parent 188974fadc
commit 2c1a328bc1
290 changed files with 1205 additions and 1242 deletions
@@ -4,6 +4,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using Model;
namespace BLL
{
@@ -12,8 +13,6 @@ namespace BLL
/// </summary>
public static class Check_ProjectLeaderCheckService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取领导带班检查
/// </summary>
@@ -37,7 +36,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in db.Check_ProjectLeaderCheck
private static IQueryable<Model.Check_ProjectLeaderCheck> getDataLists = from x in Funs.DB.Check_ProjectLeaderCheck
select x;
/// <summary>
@@ -75,15 +74,16 @@ namespace BLL
return null;
}
getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
var db1 = Funs.DB;
return from x in getDataList
join y in db.Base_Project on x.ProjectId equals y.ProjectId
join y in db1.Base_Project on x.ProjectId equals y.ProjectId
into ps
from y in ps.DefaultIfEmpty()
select new
{
x.ProjectLeaderCheckId,
x.ProjectId,
db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
db1.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
x.CheckCode,
x.UnitIds,
x.LeaderIds,