去除静态变量Funs.DB
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionReportApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable getListData(string ConstructionReportId)
|
||||
{
|
||||
return from x in db.ZHGL_ConstructionReportApprove
|
||||
var db1 = Funs.DB;
|
||||
return from x in db1.ZHGL_ConstructionReportApprove
|
||||
where x.ConstructionReportId == ConstructionReportId && x.ApproveDate != null
|
||||
orderby x.ApproveDate
|
||||
select new
|
||||
{
|
||||
x.ConstructionReportApproveId,
|
||||
x.ConstructionReportId,
|
||||
ApproveMan = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
ApproveMan = (from y in db1.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
x.ApproveDate,
|
||||
x.ApproveIdea,
|
||||
x.IsAgree,
|
||||
x.ApproveType,
|
||||
UserName = (from y in db.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
UserName = (from y in db1.Person_Persons where y.PersonId == x.ApproveMan select y.PersonName).First(),
|
||||
IsAgreeName = x.IsAgree == true ? "同意" : "不同意"
|
||||
};
|
||||
}
|
||||
@@ -95,7 +95,7 @@ namespace BLL
|
||||
/// <returns>一个总承包商施工报告审批实体</returns>
|
||||
public static Model.ZHGL_ConstructionReportApprove GetConstructionReportApproveByConstructionReportId(string constructionReportId)
|
||||
{
|
||||
return db.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == constructionReportId && x.ApproveDate == null);
|
||||
return Funs.DB.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == constructionReportId && x.ApproveDate == null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改总承包商施工报告审批信息
|
||||
@@ -117,7 +117,7 @@ namespace BLL
|
||||
|
||||
public static Model.ZHGL_ConstructionReportApprove GetComplie(string ConstructionReportId)
|
||||
{
|
||||
return db.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == ConstructionReportId && x.ApproveType == BLL.Const.ConstructionReport_Compile);
|
||||
return Funs.DB.ZHGL_ConstructionReportApprove.FirstOrDefault(x => x.ConstructionReportId == ConstructionReportId && x.ApproveType == BLL.Const.ConstructionReport_Compile);
|
||||
}
|
||||
public static Model.ZHGL_ConstructionReportApprove GetConstructionReportApproveById(string ConstructionReportApproveId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user