去除静态变量Funs.DB
This commit is contained in:
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportMainCostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工月报总包工程施工请款情况模板列表
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加施工月报
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class ConstructionMonthReportSubCostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工月报分包工程施工付款情况模板列表
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 HSSEData_HiddenDangerDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.HSSEData_HiddenDangerDetail> GetHSSEData_HiddenDangerDetailByModle(Model.HSSEData_HiddenDangerDetail table)
|
||||
{
|
||||
var q = from x in db.HSSEData_HiddenDangerDetail
|
||||
var q = from x in Funs.DB.HSSEData_HiddenDangerDetail
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
@@ -70,12 +68,12 @@ namespace BLL
|
||||
|
||||
public static Model.HSSEData_HiddenDangerDetail GetHSSEData_HiddenDangerDetailById(string Id)
|
||||
{
|
||||
return db.HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
public static List<Model.HSSEData_HiddenDangerDetail> GetHSSEData_HiddenDangerDetailByDate(DateTime? reportDate)
|
||||
{
|
||||
var q = from x in db.HSSEData_HiddenDangerDetail
|
||||
var q = from x in Funs.DB.HSSEData_HiddenDangerDetail
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
|
||||
select x;
|
||||
return q.ToList();
|
||||
|
||||
@@ -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 HazardRealtimedeviceService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Hazard_RealTimeDevice> GetHazard_RealTimeDeviceByModle(Model.Hazard_RealTimeDevice table)
|
||||
{
|
||||
var q = from x in db.Hazard_RealTimeDevice
|
||||
var q = from x in Funs.DB.Hazard_RealTimeDevice
|
||||
where
|
||||
(string.IsNullOrEmpty(table.ID) || x.ID.Contains(table.ID)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
@@ -130,7 +128,7 @@ namespace BLL
|
||||
|
||||
public static Model.Hazard_RealTimeDevice GetHazard_RealTimeDeviceById(string ID)
|
||||
{
|
||||
return db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID);
|
||||
return Funs.DB.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID);
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +266,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Hazard_RealTimeDevice> GetHazard_RealTimeDeviceByDate(DateTime? reportDate)
|
||||
{
|
||||
var q = from x in db.Hazard_RealTimeDevice
|
||||
var q = from x in Funs.DB.Hazard_RealTimeDevice
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
|
||||
select x;
|
||||
return q.ToList();
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace BLL
|
||||
|
||||
public static class Project_CQMSDataService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// CQMS数据类型
|
||||
/// </summary>
|
||||
@@ -64,7 +63,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Project_CQMSData_CQMS> GetProject_CQMSData_CQMSByModle(Model.Project_CQMSData_CQMS table)
|
||||
{
|
||||
var q = from x in db.Project_CQMSData_CQMS
|
||||
var q = from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
|
||||
@@ -141,11 +140,11 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.Project_CQMSData_CQMS GetProject_CQMSData_CQMSById(string Id)
|
||||
{
|
||||
return db.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.Project_CQMSData_CQMS.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
public static List<Model.Project_CQMSData_CQMS> GetProject_CQMSData_CQMSByprojectid(string projectid)
|
||||
{
|
||||
var q = (from x in db.Project_CQMSData_CQMS
|
||||
var q = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where x.ProjectId == projectid
|
||||
select x).ToList();
|
||||
return q;
|
||||
@@ -756,7 +755,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static ReturnData PushProjectCQMSData()
|
||||
{
|
||||
var items = (from x in db.Project_CQMSData_CQMS
|
||||
var items = (from x in Funs.DB.Project_CQMSData_CQMS
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace BLL
|
||||
|
||||
public static class Project_HJGLData_HJGLService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// HJGL数据类型
|
||||
/// </summary>
|
||||
@@ -54,7 +53,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Project_HJGLData_HJGL> GetProject_HJGLData_HJGLByModle(Model.Project_HJGLData_HJGL table)
|
||||
{
|
||||
var q = from x in db.Project_HJGLData_HJGL
|
||||
var q = from x in Funs.DB.Project_HJGLData_HJGL
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
|
||||
@@ -102,12 +101,12 @@ namespace BLL
|
||||
|
||||
public static Model.Project_HJGLData_HJGL GetProject_HJGLData_HJGLById(string Id)
|
||||
{
|
||||
return db.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.Project_HJGLData_HJGL.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
public static List<Model.Project_HJGLData_HJGL> GetProject_HJGLData_HJGLByProjectid(string Projectid)
|
||||
{
|
||||
var q = (from x in db.Project_HJGLData_HJGL
|
||||
var q = (from x in Funs.DB.Project_HJGLData_HJGL
|
||||
where x.ProjectId == Projectid
|
||||
select x).ToList();
|
||||
return q;
|
||||
@@ -355,10 +354,11 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static ReturnData PushProjectHJGLData()
|
||||
{
|
||||
var items = (from x in db.Project_HJGLData_HJGL
|
||||
var db1 = Funs.DB;
|
||||
var items = (from x in db1.Project_HJGLData_HJGL
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
var defectItems = (from x in db.Project_HJGLData_Defect
|
||||
var defectItems = (from x in db1.Project_HJGLData_Defect
|
||||
where x.ReportDate == DateTime.Now.Date
|
||||
select x).ToList();
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
|
||||
+2
-5
@@ -13,9 +13,6 @@ namespace BLL
|
||||
|
||||
public static class Project_HSSEData_HiddenDangerDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -27,7 +24,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Project_HSSEData_HiddenDangerDetail> GetProject_HSSEData_HiddenDangerDetailByModle(Model.Project_HSSEData_HiddenDangerDetail table)
|
||||
{
|
||||
var q = from x in db.Project_HSSEData_HiddenDangerDetail
|
||||
var q = from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
|
||||
@@ -74,7 +71,7 @@ namespace BLL
|
||||
|
||||
public static Model.Project_HSSEData_HiddenDangerDetail GetModelById(string Id)
|
||||
{
|
||||
return db.Project_HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.Project_HSSEData_HiddenDangerDetail.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取项目该日期的隐患类别数据
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace BLL
|
||||
|
||||
public static class Project_SYHSEData_SYHSEService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 实业数据类型
|
||||
/// </summary>
|
||||
@@ -61,7 +60,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Project_SYHSEData_SYHSE> GetProject_SYHSEData_SYHSEByModle(Model.Project_SYHSEData_SYHSE table)
|
||||
{
|
||||
var q = from x in db.Project_SYHSEData_SYHSE
|
||||
var q = from x in Funs.DB.Project_SYHSEData_SYHSE
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
|
||||
@@ -138,7 +137,7 @@ namespace BLL
|
||||
|
||||
public static Model.Project_SYHSEData_SYHSE GetProject_SYHSEData_SYHSEById(string Id)
|
||||
{
|
||||
return db.Project_SYHSEData_SYHSE.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.Project_SYHSEData_SYHSE.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
public static void AddProject_SYHSEData_SYHSE(Model.Project_SYHSEData_SYHSE newtable)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,6 @@ namespace BLL
|
||||
|
||||
public static class SYHSEData_DataService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -27,7 +24,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.SYHSEData_Data> GetSYHSEData_DataByModle(Model.SYHSEData_Data table)
|
||||
{
|
||||
var q = from x in db.SYHSEData_Data
|
||||
var q = from x in Funs.DB.SYHSEData_Data
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId))
|
||||
@@ -174,7 +171,7 @@ namespace BLL
|
||||
|
||||
public static Model.SYHSEData_Data GetSYHSEData_DataById(string Id)
|
||||
{
|
||||
return db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.SYHSEData_Data.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,22 +189,23 @@ namespace BLL
|
||||
GreatRiskNum = newtable.GreatRiskNum,
|
||||
ReportDate = newtable.ReportDate,
|
||||
};
|
||||
db.SYHSEData_Data.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_Data.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkSYHSEData_Data(List<Model.SYHSEData_Data> newtables)
|
||||
{
|
||||
|
||||
db.SYHSEData_Data.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_Data.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateSYHSEData_Data(Model.SYHSEData_Data newtable)
|
||||
{
|
||||
|
||||
Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_Data table = db1.SYHSEData_Data.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
@@ -218,28 +216,29 @@ namespace BLL
|
||||
table.MoreRiskNum = newtable.MoreRiskNum;
|
||||
table.GreatRiskNum = newtable.GreatRiskNum;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteSYHSEData_DataById(string Id)
|
||||
{
|
||||
|
||||
Model.SYHSEData_Data table = db.SYHSEData_Data.FirstOrDefault(x => x.Id == Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_Data table = db1.SYHSEData_Data.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.SYHSEData_Data.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_Data.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLSYHSEData_Data()
|
||||
{
|
||||
if (db.SYHSEData_Data != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.SYHSEData_Data != null)
|
||||
{
|
||||
db.SYHSEData_Data.DeleteAllOnSubmit(db.SYHSEData_Data);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_Data.DeleteAllOnSubmit(db1.SYHSEData_Data);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 SyhsedataHiddendangercheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.SYHSEData_HiddenDangerCheck> GetSYHSEData_HiddenDangerCheckByModle(Model.SYHSEData_HiddenDangerCheck table)
|
||||
{
|
||||
var q = from x in db.SYHSEData_HiddenDangerCheck
|
||||
var q = from x in Funs.DB.SYHSEData_HiddenDangerCheck
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) &&
|
||||
@@ -67,7 +65,7 @@ namespace BLL
|
||||
|
||||
public static Model.SYHSEData_HiddenDangerCheck GetSYHSEData_HiddenDangerCheckById(string Id)
|
||||
{
|
||||
return db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,22 +81,23 @@ namespace BLL
|
||||
OKNum = newtable.OKNum,
|
||||
ReportDate = newtable.ReportDate,
|
||||
};
|
||||
db.SYHSEData_HiddenDangerCheck.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_HiddenDangerCheck.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkSYHSEData_HiddenDangerCheck(List<Model.SYHSEData_HiddenDangerCheck> newtables)
|
||||
{
|
||||
|
||||
db.SYHSEData_HiddenDangerCheck.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_HiddenDangerCheck.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateSYHSEData_HiddenDangerCheck(Model.SYHSEData_HiddenDangerCheck newtable)
|
||||
{
|
||||
|
||||
Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_HiddenDangerCheck table = db1.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
@@ -107,45 +106,46 @@ namespace BLL
|
||||
table.TotalNum = newtable.TotalNum;
|
||||
table.OKNum = newtable.OKNum;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteSYHSEData_HiddenDangerCheckById(string Id)
|
||||
{
|
||||
|
||||
Model.SYHSEData_HiddenDangerCheck table = db.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_HiddenDangerCheck table = db1.SYHSEData_HiddenDangerCheck.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.SYHSEData_HiddenDangerCheck.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_HiddenDangerCheck.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLSYHSEData_HiddenDangerCheck()
|
||||
{
|
||||
if (db.SYHSEData_HiddenDangerCheck != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.SYHSEData_HiddenDangerCheck != null)
|
||||
{
|
||||
db.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(db.SYHSEData_HiddenDangerCheck);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(db1.SYHSEData_HiddenDangerCheck);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static List<Model.SYHSEData_HiddenDangerCheck> GetSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate)
|
||||
{
|
||||
var q = from x in db.SYHSEData_HiddenDangerCheck
|
||||
var q = from x in Funs.DB.SYHSEData_HiddenDangerCheck
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
|
||||
select x;
|
||||
return q.ToList();
|
||||
}
|
||||
public static void DeleteSYHSEData_HiddenDangerCheckByDate(DateTime? reportDate)
|
||||
{
|
||||
|
||||
var table = db.SYHSEData_HiddenDangerCheck.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
var db1 = Funs.DB;
|
||||
var table = db1.SYHSEData_HiddenDangerCheck.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
if (table != null)
|
||||
{
|
||||
db.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_HiddenDangerCheck.DeleteAllOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 SyhsedataRiskcontrolService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.SYHSEData_RiskControl> GetSYHSEData_RiskControlByModle(Model.SYHSEData_RiskControl table)
|
||||
{
|
||||
var q = from x in db.SYHSEData_RiskControl
|
||||
var q = from x in Funs.DB.SYHSEData_RiskControl
|
||||
where
|
||||
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
|
||||
(string.IsNullOrEmpty(table.FactoryId) || x.FactoryId.Contains(table.FactoryId)) &&
|
||||
@@ -65,7 +63,7 @@ namespace BLL
|
||||
|
||||
public static Model.SYHSEData_RiskControl GetSYHSEData_RiskControlById(string Id)
|
||||
{
|
||||
return db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id);
|
||||
return Funs.DB.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,67 +77,69 @@ namespace BLL
|
||||
RiskControlName = newtable.RiskControlName,
|
||||
ReportDate = newtable.ReportDate,
|
||||
};
|
||||
db.SYHSEData_RiskControl.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_RiskControl.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkSYHSEData_RiskControl(List<Model.SYHSEData_RiskControl> newtables)
|
||||
{
|
||||
|
||||
db.SYHSEData_RiskControl.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.SYHSEData_RiskControl.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateSYHSEData_RiskControl(Model.SYHSEData_RiskControl newtable)
|
||||
{
|
||||
|
||||
Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_RiskControl table = db1.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == newtable.Id);
|
||||
if (table != null)
|
||||
{
|
||||
table.Id = newtable.Id;
|
||||
table.FactoryId = newtable.FactoryId;
|
||||
table.RiskControlName = newtable.RiskControlName;
|
||||
table.ReportDate = newtable.ReportDate;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteSYHSEData_RiskControlById(string Id)
|
||||
{
|
||||
|
||||
Model.SYHSEData_RiskControl table = db.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id);
|
||||
var db1 = Funs.DB;
|
||||
Model.SYHSEData_RiskControl table = db1.SYHSEData_RiskControl.FirstOrDefault(x => x.Id == Id);
|
||||
if (table != null)
|
||||
{
|
||||
db.SYHSEData_RiskControl.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_RiskControl.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLSYHSEData_RiskControl()
|
||||
{
|
||||
if (db.SYHSEData_RiskControl != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.SYHSEData_RiskControl != null)
|
||||
{
|
||||
db.SYHSEData_RiskControl.DeleteAllOnSubmit(db.SYHSEData_RiskControl);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_RiskControl.DeleteAllOnSubmit(db1.SYHSEData_RiskControl);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static List<Model.SYHSEData_RiskControl> GetSYHSEData_RiskControlByDate(DateTime? reportDate)
|
||||
{
|
||||
var q = from x in db.SYHSEData_RiskControl
|
||||
var q = from x in Funs.DB.SYHSEData_RiskControl
|
||||
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
|
||||
select x;
|
||||
return q.ToList();
|
||||
}
|
||||
public static void DeleteSYHSEData_RiskControlByDate(DateTime? reportDate)
|
||||
{
|
||||
|
||||
var table = db.SYHSEData_RiskControl.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
var db1 = Funs.DB;
|
||||
var table = db1.SYHSEData_RiskControl.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
|
||||
if (table != null)
|
||||
{
|
||||
db.SYHSEData_RiskControl.DeleteAllOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.SYHSEData_RiskControl.DeleteAllOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
{
|
||||
public static class SYHSEData_SYHSEService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnitDrillRecordListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnitEmergencyListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急预案管理
|
||||
|
||||
@@ -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 EnergyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_EnergyReport> GetEnvironmental_EnergyReportByModle(Model.Environmental_EnergyReport table)
|
||||
{
|
||||
var q = from x in db.Environmental_EnergyReport
|
||||
var q = from x in Funs.DB.Environmental_EnergyReport
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
@@ -71,7 +69,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportById(string EnergyReportId)
|
||||
{
|
||||
return db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
return Funs.DB.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
}
|
||||
|
||||
public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
|
||||
@@ -92,15 +90,16 @@ namespace BLL
|
||||
DutyPerson = newtable.DutyPerson,
|
||||
UpState = newtable.UpState,
|
||||
};
|
||||
db.Environmental_EnergyReport.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_EnergyReport.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_EnergyReport(List<Model.Environmental_EnergyReport> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_EnergyReport.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_EnergyReport.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -124,8 +123,8 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_EnergyReport table = db1.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
@@ -136,7 +135,7 @@ namespace BLL
|
||||
table.FillingDate = newtable.FillingDate;
|
||||
table.DutyPerson = newtable.DutyPerson;
|
||||
table.UpState = newtable.UpState;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -154,10 +153,11 @@ namespace BLL
|
||||
|
||||
public static void DeleteALLEnvironmental_EnergyReport()
|
||||
{
|
||||
if (db.Environmental_EnergyReport != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.Environmental_EnergyReport != null)
|
||||
{
|
||||
db.Environmental_EnergyReport.DeleteAllOnSubmit(db.Environmental_EnergyReport);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_EnergyReport.DeleteAllOnSubmit(db1.Environmental_EnergyReport);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 EnergyreportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_EnergyReportItem> GetEnvironmental_EnergyReportItemByModle(Model.Environmental_EnergyReportItem table)
|
||||
{
|
||||
var q = from x in db.Environmental_EnergyReportItem
|
||||
var q = from x in Funs.DB.Environmental_EnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
@@ -87,7 +85,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_EnergyReportItem GetEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
return db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
return Funs.DB.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -203,22 +201,23 @@ namespace BLL
|
||||
ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear,
|
||||
};
|
||||
db.Environmental_EnergyReportItem.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_EnergyReportItem.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_EnergyReportItem(List<Model.Environmental_EnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_EnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_EnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_EnergyReportItem table = db1.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportItemId = newtable.EnergyReportItemId;
|
||||
@@ -243,28 +242,29 @@ namespace BLL
|
||||
table.ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod;
|
||||
table.ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear;
|
||||
table.ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_EnergyReportItem table = db1.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_EnergyReportItem.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_EnergyReportItem.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_EnergyReportItem()
|
||||
{
|
||||
if (db.Environmental_EnergyReportItem != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.Environmental_EnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_EnergyReportItem.DeleteAllOnSubmit(db.Environmental_EnergyReportItem);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_EnergyReportItem.DeleteAllOnSubmit(db1.Environmental_EnergyReportItem);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void DeleteEnergyReportItemByChemicalReportId(string EnergyReportId)
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Model;
|
||||
|
||||
|
||||
namespace BLL
|
||||
@@ -12,9 +13,6 @@ namespace BLL
|
||||
|
||||
public static class ProjectEnergyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -26,7 +24,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReport> GetEnvironmental_ProjectEnergyReportByModle(Model.Environmental_ProjectEnergyReport table)
|
||||
{
|
||||
var q = from x in db.Environmental_ProjectEnergyReport
|
||||
var q = from x in Funs.DB.Environmental_ProjectEnergyReport
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
(string.IsNullOrEmpty(table.UnitId) || x.UnitId.Contains(table.UnitId)) &&
|
||||
@@ -73,7 +71,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
return db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
return Funs.DB.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
}
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportByProjectIdAndYearAndQuarters(string ProjectId, int year, int Quarters)
|
||||
@@ -95,15 +93,16 @@ namespace BLL
|
||||
UpState = newtable.UpState,
|
||||
ProjectId=newtable.ProjectId,
|
||||
};
|
||||
db.Environmental_ProjectEnergyReport.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_ProjectEnergyReport.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReport(List<Model.Environmental_ProjectEnergyReport> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_ProjectEnergyReport.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_ProjectEnergyReport.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -131,8 +130,8 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReport table = db1.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportId = newtable.EnergyReportId;
|
||||
@@ -144,28 +143,29 @@ namespace BLL
|
||||
table.DutyPerson = newtable.DutyPerson;
|
||||
table.UpState = newtable.UpState;
|
||||
table.ProjectId=newtable.ProjectId;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReport table = db1.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReport.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_ProjectEnergyReport.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReport()
|
||||
{
|
||||
if (db.Environmental_ProjectEnergyReport != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.Environmental_ProjectEnergyReport != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReport.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReport);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_ProjectEnergyReport.DeleteAllOnSubmit(db1.Environmental_ProjectEnergyReport);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ProjectEnergyreportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -25,7 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetEnvironmental_ProjectEnergyReportItemByModle(Model.Environmental_ProjectEnergyReportItem table)
|
||||
{
|
||||
var q = from x in db.Environmental_ProjectEnergyReportItem
|
||||
var q = from x in Funs.DB.Environmental_ProjectEnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
@@ -87,7 +85,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReportItem GetEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
return db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
return Funs.DB.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -209,22 +207,23 @@ namespace BLL
|
||||
ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear,
|
||||
};
|
||||
db.Environmental_ProjectEnergyReportItem.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_ProjectEnergyReportItem.InsertOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReportItem(List<Model.Environmental_ProjectEnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
db.Environmental_ProjectEnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
var db1 = Funs.DB;
|
||||
db1.Environmental_ProjectEnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
public static void UpdateEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReportItem table = db1.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
table.EnergyReportItemId = newtable.EnergyReportItemId;
|
||||
@@ -249,28 +248,29 @@ namespace BLL
|
||||
table.ServiceOperatingIncome_BasePeriod = newtable.ServiceOperatingIncome_BasePeriod;
|
||||
table.ServiceOperatingIncome_LastYear = newtable.ServiceOperatingIncome_LastYear;
|
||||
table.ServiceOperatingIncome_ThisYear = newtable.ServiceOperatingIncome_ThisYear;
|
||||
db.SubmitChanges();
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
var db1 = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReportItem table = db1.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReportItem.DeleteOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_ProjectEnergyReportItem.DeleteOnSubmit(table);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReportItem()
|
||||
{
|
||||
if (db.Environmental_ProjectEnergyReportItem != null)
|
||||
var db1 = Funs.DB;
|
||||
if (db1.Environmental_ProjectEnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReportItem);
|
||||
db.SubmitChanges();
|
||||
db1.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(db1.Environmental_ProjectEnergyReportItem);
|
||||
db1.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void DeleteEnergyReportItemByChemicalReportId(string EnergyReportId)
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CompanySafetyMeetingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取企业安委会
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CompanySpecialMeetingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取企业专题会
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace BLL
|
||||
{
|
||||
public static class BasicDataService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取字典信息
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class CityService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取国家信息
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class CountryService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取国家信息
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using FineUIPro;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class OnPostService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -21,7 +20,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.SitePerson_Person> getDataLists = from x in db.SitePerson_Person
|
||||
private static IQueryable<Model.SitePerson_Person> getDataLists = from x in Funs.DB.SitePerson_Person
|
||||
where x.States == Const.State_1
|
||||
select x;
|
||||
|
||||
@@ -87,8 +86,9 @@ 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.Person_Persons on x.IdentityCard equals y.IdentityCard
|
||||
join y in db1.Person_Persons on x.IdentityCard equals y.IdentityCard
|
||||
select new
|
||||
{
|
||||
x.PersonId,
|
||||
@@ -103,9 +103,9 @@ namespace BLL
|
||||
y.CountryCode,
|
||||
y.ProvinceCode,
|
||||
x.TeamGroupId,
|
||||
db.ProjectData_TeamGroup.First(z => x.TeamGroupId == z.TeamGroupId).TeamGroupName,
|
||||
db1.ProjectData_TeamGroup.First(z => x.TeamGroupId == z.TeamGroupId).TeamGroupName,
|
||||
x.WorkPostId,
|
||||
db.Base_WorkPost.First(z => x.WorkPostId == z.WorkPostId).WorkPostName,
|
||||
db1.Base_WorkPost.First(z => x.WorkPostId == z.WorkPostId).WorkPostName,
|
||||
IsPostName = x.OutTime.HasValue ? "是" : "否",
|
||||
y.Telephone,
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class RealName_ProjectService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user