去除静态变量Funs.DB
This commit is contained in:
@@ -3,13 +3,12 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class Person_PersonContractService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 获取列表数据
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -23,7 +22,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Person_PersonContract> getDataLists = from x in db.Person_PersonContract
|
||||
private static IQueryable<Model.Person_PersonContract> getDataLists = from x in Funs.DB.Person_PersonContract
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -41,15 +40,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
|
||||
select new
|
||||
{
|
||||
x.PersonContractId,
|
||||
x.PersonId,
|
||||
x.UnitId,
|
||||
db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
db1.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
x.ProjectId,
|
||||
db.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
|
||||
db1.Base_Project.First(u => u.ProjectId == x.ProjectId).ProjectName,
|
||||
x.LeadManId,
|
||||
x.Telephone,
|
||||
x.ContractType,
|
||||
|
||||
Reference in New Issue
Block a user