去除静态变量Funs.DB
This commit is contained in:
@@ -14,8 +14,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LicenseManagerService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 获取安全巡检列表信息
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -29,7 +27,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.License_LicenseManager> getDataLists = from x in db.License_LicenseManager
|
||||
private static IQueryable<Model.License_LicenseManager> getDataLists = from x in Funs.DB.License_LicenseManager
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -85,13 +83,14 @@ 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
|
||||
select new
|
||||
{
|
||||
x.LicenseManagerId,
|
||||
x.LicenseManagerCode,
|
||||
LicenseTypeName = db.Base_LicenseType.First(t => t.LicenseTypeId == x.LicenseTypeId).LicenseTypeName,
|
||||
UnitName = db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
LicenseTypeName = db1.Base_LicenseType.First(t => t.LicenseTypeId == x.LicenseTypeId).LicenseTypeName,
|
||||
UnitName = db1.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
|
||||
x.CompileDate,
|
||||
x.StartDate,
|
||||
|
||||
Reference in New Issue
Block a user