全局处理问题:public static Model.SGGLDB db = Funs.DB;

This commit is contained in:
2026-04-23 11:36:49 +08:00
parent 5a38880a14
commit 746cb57619
315 changed files with 641 additions and 449 deletions
@@ -11,7 +11,7 @@ namespace BLL
public static class HazardRealtimedeviceService
{
public static Model.SGGLDB db = Funs.DB;
#region
@@ -25,6 +25,7 @@ namespace BLL
}
public static List<Model.Hazard_RealTimeDevice> GetHazard_RealTimeDeviceByModle(Model.Hazard_RealTimeDevice table)
{
Model.SGGLDB db = Funs.DB;
var q = from x in db.Hazard_RealTimeDevice
where
(string.IsNullOrEmpty(table.ID) || x.ID.Contains(table.ID)) &&
@@ -130,6 +131,7 @@ namespace BLL
public static Model.Hazard_RealTimeDevice GetHazard_RealTimeDeviceById(string ID)
{
Model.SGGLDB db = Funs.DB;
return db.Hazard_RealTimeDevice.FirstOrDefault(x => x.ID == ID);
}
@@ -268,6 +270,7 @@ namespace BLL
}
public static List<Model.Hazard_RealTimeDevice> GetHazard_RealTimeDeviceByDate(DateTime? reportDate)
{
Model.SGGLDB db = Funs.DB;
var q = from x in db.Hazard_RealTimeDevice
where x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0
select x;