去除静态变量Funs.DB
This commit is contained in:
@@ -5,6 +5,7 @@ using Aspose.Words.Lists;
|
||||
using FineUIPro;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using System.Collections;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -13,8 +14,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PersonQualityService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 获取人员证书列表信息
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -28,7 +27,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.QualityAudit_PersonQuality> getDataLists = from x in db.QualityAudit_PersonQuality
|
||||
private static IQueryable<Model.QualityAudit_PersonQuality> getDataLists = from x in Funs.DB.QualityAudit_PersonQuality
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -46,13 +45,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.PersonQualityId,
|
||||
x.PersonId,
|
||||
x.CertificateId,
|
||||
CertificateName = db.Base_Certificate.First(u => u.CertificateId == x.CertificateId).CertificateName,
|
||||
CertificateName = db1.Base_Certificate.First(u => u.CertificateId == x.CertificateId).CertificateName,
|
||||
x.CertificateNo,
|
||||
x.SendUnit,
|
||||
x.SendDate,
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
x.Major,
|
||||
x.LimitDate,
|
||||
x.Url,
|
||||
db.AttachFile.First(u => u.ToKeyId == x.PersonQualityId).AttachUrl,
|
||||
db1.AttachFile.First(u => u.ToKeyId == x.PersonQualityId).AttachUrl,
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user