去除静态变量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
+5 -5
View File
@@ -3,13 +3,12 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using Model;
namespace BLL
{
public class CheckEquipmentService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 记录数
/// </summary>
@@ -22,7 +21,7 @@ namespace BLL
/// <summary>
/// 定义变量
/// </summary>
private static IQueryable<Model.Check_CheckEquipment> qq = from x in db.Check_CheckEquipment orderby x.CompileDate descending select x;
private static IQueryable<Model.Check_CheckEquipment> qq = from x in Funs.DB.Check_CheckEquipment orderby x.CompileDate descending select x;
/// <summary>
/// 获取分页列表
@@ -60,12 +59,13 @@ namespace BLL
return new object[] { "" };
}
var db1 = Funs.DB;
return from x in q.Skip(startRowIndex).Take(maximumRows)
select new
{
x.CheckEquipmentId,
x.ProjectId,
UserUnit = (from y in db.Base_Unit where y.UnitId == x.UserUnitId select y.UnitName).First(),
UserUnit = (from y in db1.Base_Unit where y.UnitId == x.UserUnitId select y.UnitName).First(),
x.EquipmentName,
x.Format,
x.SetAccuracyGrade,
@@ -75,7 +75,7 @@ namespace BLL
IsIdentification = x.IsIdentification == true ? "有" : "没有",
IsCheckCertificate = x.IsCheckCertificate == true ? "有" : "没有",
x.AttachUrl,
CompileMan = (from y in db.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
CompileMan = (from y in db1.Person_Persons where y.PersonId == x.CompileMan select y.PersonName).First(),
x.CompileDate,
x.State,
};