去除静态变量Funs.DB
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Model;
|
||||
|
||||
|
||||
namespace BLL
|
||||
@@ -11,9 +12,6 @@ namespace BLL
|
||||
|
||||
public static class HJGLData_DefectService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.HJGLData_Defect> GetHJGLData_DefectByModle(Model.HJGLData_Defect table)
|
||||
{
|
||||
var q = from x in db.HJGLData_Defect
|
||||
var q = from x in Funs.DB.HJGLData_Defect
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
@@ -69,11 +67,11 @@ namespace BLL
|
||||
|
||||
public static Model.HJGLData_Defect GetHJGLData_DefectById(string Id)
|
||||
{
|
||||
return db.HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.HJGLData_Defect.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
public static List<Model.HJGLData_Defect> GetHJGLData_DefectByDate(DateTime? reportDate)
|
||||
{
|
||||
var q = from x in db.HJGLData_Defect
|
||||
var q = from x in Funs.DB.HJGLData_Defect
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
|
||||
select x;
|
||||
return q.ToList();
|
||||
|
||||
Reference in New Issue
Block a user