This commit is contained in:
2026-04-08 14:03:39 +08:00
parent 7ecbc2ebc0
commit 4a1b636ce0
353 changed files with 1378 additions and 500 deletions
@@ -11,7 +11,7 @@ namespace BLL
public static class EnergyReportService
{
public static Model.CNPCDB db = Funs.DB;
#region
@@ -25,6 +25,7 @@ namespace BLL
}
public static List<Model.Environmental_EnergyReport> GetEnvironmental_EnergyReportByModle(Model.Environmental_EnergyReport table)
{
Model.CNPCDB db = Funs.DB;
var q = from x in db.Environmental_EnergyReport
where
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
@@ -71,6 +72,7 @@ namespace BLL
public static Model.Environmental_EnergyReport GetEnvironmental_EnergyReportById(string EnergyReportId)
{
Model.CNPCDB db = Funs.DB;
return db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
}
@@ -80,7 +82,7 @@ namespace BLL
}
public static void AddEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable)
{
Model.CNPCDB db = Funs.DB;
Model.Environmental_EnergyReport table = new Model.Environmental_EnergyReport
{
EnergyReportId = newtable.EnergyReportId,
@@ -98,7 +100,7 @@ namespace BLL
public static void AddBulkEnvironmental_EnergyReport(List<Model.Environmental_EnergyReport> newtables)
{
Model.CNPCDB db = Funs.DB;
db.Environmental_EnergyReport.InsertAllOnSubmit(newtables);
db.SubmitChanges();
}
@@ -124,7 +126,7 @@ namespace BLL
}
public static void UpdateEnvironmental_EnergyReport(Model.Environmental_EnergyReport newtable)
{
Model.CNPCDB db = Funs.DB;
Model.Environmental_EnergyReport table = db.Environmental_EnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
if (table != null)
{
@@ -154,6 +156,7 @@ namespace BLL
public static void DeleteALLEnvironmental_EnergyReport()
{
Model.CNPCDB db = Funs.DB;
if (db.Environmental_EnergyReport != null)
{
db.Environmental_EnergyReport.DeleteAllOnSubmit(db.Environmental_EnergyReport);