去除静态变量Funs.DB
This commit is contained in:
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckColligationDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据综合检查id获取所有相关明细信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckSpecialDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查id获取所有相关明细信息
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -12,8 +13,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class Check_CheckSpecialService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 获取专项检查列表信息
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -27,7 +26,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Check_CheckSpecial> getDataLists = from x in db.Check_CheckSpecial
|
||||
private static IQueryable<Model.Check_CheckSpecial> getDataLists = from x in Funs.DB.Check_CheckSpecial
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -90,7 +89,7 @@ namespace BLL
|
||||
x.CheckSpecialId,
|
||||
x.CheckTime,
|
||||
x.CheckSpecialCode,
|
||||
CheckItemName =db.Technique_CheckItemSet .First(y=>y.CheckItemSetId ==x. CheckItemSetId).CheckItemName,
|
||||
CheckItemName =Funs.DB.Technique_CheckItemSet .First(y=>y.CheckItemSetId ==x. CheckItemSetId).CheckItemName,
|
||||
CheckTypeName = x.CheckType == "1" ? "联合检查" : "专项检查",
|
||||
StatesName = x.States == "2" ? "已完成" : (x.States == "1" ? "待整改" : "待提交"),
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class IncentiveNoticeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取奖励通知单
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PunishNoticeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取处罚通知单
|
||||
|
||||
Reference in New Issue
Block a user