1
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
|
||||
public static class EnergyreportItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
|
||||
#region 获取列表
|
||||
@@ -25,6 +25,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_EnergyReportItem> GetEnvironmental_EnergyReportItemByModle(Model.Environmental_EnergyReportItem table)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = from x in db.Environmental_EnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
@@ -87,6 +88,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_EnergyReportItem GetEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
@@ -177,7 +179,7 @@ namespace BLL
|
||||
}
|
||||
public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnergyReportItem table = new Model.Environmental_EnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = newtable.EnergyReportItemId,
|
||||
@@ -209,7 +211,7 @@ namespace BLL
|
||||
|
||||
public static void AddBulkEnvironmental_EnergyReportItem(List<Model.Environmental_EnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
db.Environmental_EnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -217,7 +219,7 @@ namespace BLL
|
||||
|
||||
public static void UpdateEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -249,7 +251,7 @@ namespace BLL
|
||||
}
|
||||
public static void DeleteEnvironmental_EnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnergyReportItem table = db.Environmental_EnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -261,6 +263,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteALLEnvironmental_EnergyReportItem()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
if (db.Environmental_EnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_EnergyReportItem.DeleteAllOnSubmit(db.Environmental_EnergyReportItem);
|
||||
|
||||
@@ -12,9 +12,6 @@ namespace BLL
|
||||
|
||||
public static class ProjectEnergyReportService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
#region 获取列表
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
@@ -26,6 +23,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReport> GetEnvironmental_ProjectEnergyReportByModle(Model.Environmental_ProjectEnergyReport table)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = from x in db.Environmental_ProjectEnergyReport
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportId) || x.EnergyReportId.Contains(table.EnergyReportId)) &&
|
||||
@@ -73,6 +71,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReport GetEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
}
|
||||
|
||||
@@ -82,7 +81,7 @@ namespace BLL
|
||||
}
|
||||
public static void AddEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReport table = new Model.Environmental_ProjectEnergyReport
|
||||
{
|
||||
EnergyReportId = newtable.EnergyReportId,
|
||||
@@ -101,7 +100,7 @@ namespace BLL
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReport(List<Model.Environmental_ProjectEnergyReport> newtables)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
db.Environmental_ProjectEnergyReport.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -131,7 +130,7 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateEnvironmental_ProjectEnergyReport(Model.Environmental_ProjectEnergyReport newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == newtable.EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -150,7 +149,7 @@ namespace BLL
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportById(string EnergyReportId)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReport table = db.Environmental_ProjectEnergyReport.FirstOrDefault(x => x.EnergyReportId == EnergyReportId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -162,6 +161,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReport()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
if (db.Environmental_ProjectEnergyReport != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReport.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReport);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
|
||||
public static class ProjectEnergyreportItemService
|
||||
{
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
|
||||
|
||||
#region 获取列表
|
||||
@@ -25,6 +25,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.Environmental_ProjectEnergyReportItem> GetEnvironmental_ProjectEnergyReportItemByModle(Model.Environmental_ProjectEnergyReportItem table)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = from x in db.Environmental_ProjectEnergyReportItem
|
||||
where
|
||||
(string.IsNullOrEmpty(table.EnergyReportItemId) || x.EnergyReportItemId.Contains(table.EnergyReportItemId)) &&
|
||||
@@ -87,6 +88,7 @@ namespace BLL
|
||||
|
||||
public static Model.Environmental_ProjectEnergyReportItem GetEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
}
|
||||
|
||||
@@ -183,7 +185,7 @@ namespace BLL
|
||||
}
|
||||
public static void AddEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReportItem table = new Model.Environmental_ProjectEnergyReportItem
|
||||
{
|
||||
EnergyReportItemId = newtable.EnergyReportItemId,
|
||||
@@ -215,7 +217,7 @@ namespace BLL
|
||||
|
||||
public static void AddBulkEnvironmental_ProjectEnergyReportItem(List<Model.Environmental_ProjectEnergyReportItem> newtables)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
db.Environmental_ProjectEnergyReportItem.InsertAllOnSubmit(newtables);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -223,7 +225,7 @@ namespace BLL
|
||||
|
||||
public static void UpdateEnvironmental_ProjectEnergyReportItem(Model.Environmental_ProjectEnergyReportItem newtable)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == newtable.EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -255,7 +257,7 @@ namespace BLL
|
||||
}
|
||||
public static void DeleteEnvironmental_ProjectEnergyReportItemById(string EnergyReportItemId)
|
||||
{
|
||||
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_ProjectEnergyReportItem table = db.Environmental_ProjectEnergyReportItem.FirstOrDefault(x => x.EnergyReportItemId == EnergyReportItemId);
|
||||
if (table != null)
|
||||
{
|
||||
@@ -267,6 +269,7 @@ namespace BLL
|
||||
|
||||
public static void DeleteALLEnvironmental_ProjectEnergyReportItem()
|
||||
{
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
if (db.Environmental_ProjectEnergyReportItem != null)
|
||||
{
|
||||
db.Environmental_ProjectEnergyReportItem.DeleteAllOnSubmit(db.Environmental_ProjectEnergyReportItem);
|
||||
|
||||
Reference in New Issue
Block a user