去除静态变量Funs.DB
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user