数据库变更CNPC_XJYJ
This commit is contained in:
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentHandleService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取HSSE事故(含未遂)处理
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="accidentHandle"></param>
|
||||
public static void AddAccidentHandle(Model.Accident_AccidentHandle accidentHandle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentHandle newAccidentHandle = new Model.Accident_AccidentHandle
|
||||
{
|
||||
AccidentHandleId = accidentHandle.AccidentHandleId,
|
||||
@@ -61,7 +61,7 @@ namespace BLL
|
||||
/// <param name="accidentHandle"></param>
|
||||
public static void UpdateAccidentHandle(Model.Accident_AccidentHandle accidentHandle)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentHandle newAccidentHandle = db.Accident_AccidentHandle.FirstOrDefault(e => e.AccidentHandleId == accidentHandle.AccidentHandleId);
|
||||
if (newAccidentHandle != null)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
/// <param name="accidentHandleId"></param>
|
||||
public static void DeleteAccidentHandleById(string accidentHandleId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentHandle accidentHandle = db.Accident_AccidentHandle.FirstOrDefault(e => e.AccidentHandleId == accidentHandleId);
|
||||
if (accidentHandle != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentPersonRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取HSSE事故(对人员)记录
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="accidentPersonRecord"></param>
|
||||
public static void AddAccidentPersonRecord(Model.Accident_AccidentPersonRecord accidentPersonRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentPersonRecord newAccidentPersonRecord = new Model.Accident_AccidentPersonRecord
|
||||
{
|
||||
AccidentPersonRecordId = accidentPersonRecord.AccidentPersonRecordId,
|
||||
@@ -59,7 +59,7 @@ namespace BLL
|
||||
/// <param name="accidentPersonRecord"></param>
|
||||
public static void UpdateAccidentPersonRecord(Model.Accident_AccidentPersonRecord accidentPersonRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentPersonRecord newAccidentPersonRecord = db.Accident_AccidentPersonRecord.FirstOrDefault(e => e.AccidentPersonRecordId == accidentPersonRecord.AccidentPersonRecordId);
|
||||
if (newAccidentPersonRecord != null)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace BLL
|
||||
/// <param name="accidentPersonRecordId"></param>
|
||||
public static void DeleteAccidentPersonRecordById(string accidentPersonRecordId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentPersonRecord accidentPersonRecord = db.Accident_AccidentPersonRecord.FirstOrDefault(e => e.AccidentPersonRecordId == accidentPersonRecordId);
|
||||
if (accidentPersonRecord != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class AccidentReportOtherItemService
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据事故调查处理报告主键获取所有相关调查组成员信息列表
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOtherItem"></param>
|
||||
public static void AddAccidentReportOtherItem(Model.Accident_AccidentReportOtherItem accidentReportOtherItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOtherItem newAccidentReportOtherItem = new Model.Accident_AccidentReportOtherItem
|
||||
{
|
||||
AccidentReportOtherItemId = accidentReportOtherItem.AccidentReportOtherItemId,
|
||||
@@ -57,7 +57,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOtherItem"></param>
|
||||
public static void UpdateAccidentReportOtherItem(Model.Accident_AccidentReportOtherItem accidentReportOtherItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOtherItem newAccidentReportOtherItem = db.Accident_AccidentReportOtherItem.FirstOrDefault(e => e.AccidentReportOtherItemId == accidentReportOtherItem.AccidentReportOtherItemId);
|
||||
if (newAccidentReportOtherItem != null)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOtherId"></param>
|
||||
public static void DeleteAccidentReportOtherItemByAccidentReportOtherId(string accidentReportOtherId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Accident_AccidentReportOtherItem where x.AccidentReportOtherId == accidentReportOtherId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOtherItemId"></param>
|
||||
public static void DeleteAccidentReportOtherItemById(string accidentReportOtherItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOtherItem item = db.Accident_AccidentReportOtherItem.FirstOrDefault(e => e.AccidentReportOtherItemId == accidentReportOtherItemId);
|
||||
if (item != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReportOtherService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查处理报告
|
||||
@@ -191,7 +191,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOther"></param>
|
||||
public static void AddAccidentReportOther(Model.Accident_AccidentReportOther accidentReportOther)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOther newAccidentReportOther = new Model.Accident_AccidentReportOther
|
||||
{
|
||||
AccidentReportOtherId = accidentReportOther.AccidentReportOtherId,
|
||||
@@ -232,7 +232,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOther"></param>
|
||||
public static void UpdateAccidentReportOther(Model.Accident_AccidentReportOther accidentReportOther)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOther newAccidentReportOther = db.Accident_AccidentReportOther.FirstOrDefault(e => e.AccidentReportOtherId == accidentReportOther.AccidentReportOtherId);
|
||||
if (newAccidentReportOther != null)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ namespace BLL
|
||||
/// <param name="accidentReportOtherId"></param>
|
||||
public static void DeleteAccidentReportOtherById(string accidentReportOtherId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReportOther accidentReportOther = db.Accident_AccidentReportOther.FirstOrDefault(e => e.AccidentReportOtherId == accidentReportOtherId);
|
||||
if (accidentReportOther != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查报告
|
||||
@@ -334,7 +334,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.Accident_AccidentReport> GetAccidentReportsByTimeAndAccidentTypeId(DateTime startTime, DateTime endTime, string projectId, string accidentTypeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
if (accidentTypeId == "1" || accidentTypeId == "2" || accidentTypeId == "3") //轻重死事故按审批完成时间
|
||||
{
|
||||
return (from x in db.Accident_AccidentReport
|
||||
@@ -356,7 +356,7 @@ namespace BLL
|
||||
/// <param name="accidentReport"></param>
|
||||
public static void AddAccidentReport(Model.Accident_AccidentReport accidentReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport newAccidentReport = new Model.Accident_AccidentReport
|
||||
{
|
||||
AccidentReportId = accidentReport.AccidentReportId,
|
||||
@@ -401,7 +401,7 @@ namespace BLL
|
||||
/// <param name="accidentReport"></param>
|
||||
public static void UpdateAccidentReport(Model.Accident_AccidentReport accidentReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport newAccidentReport = db.Accident_AccidentReport.FirstOrDefault(e => e.AccidentReportId == accidentReport.AccidentReportId);
|
||||
if (newAccidentReport != null)
|
||||
{
|
||||
@@ -443,7 +443,7 @@ namespace BLL
|
||||
/// <param name="accidentReportId"></param>
|
||||
public static void DeleteAccidentReportById(string accidentReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport accidentReport = db.Accident_AccidentReport.FirstOrDefault(e => e.AccidentReportId == accidentReportId);
|
||||
if (accidentReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class NoFourLetoffService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取四不放过
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="noFourLetoff"></param>
|
||||
public static void AddNoFourLetoff(Model.Accident_NoFourLetoff noFourLetoff)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_NoFourLetoff newNoFourLetoff = new Model.Accident_NoFourLetoff
|
||||
{
|
||||
NoFourLetoffId = noFourLetoff.NoFourLetoffId,
|
||||
@@ -62,7 +62,7 @@ namespace BLL
|
||||
/// <param name="noFourLetoff"></param>
|
||||
public static void UpdateNoFourLetoff(Model.Accident_NoFourLetoff noFourLetoff)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_NoFourLetoff newNoFourLetoff = db.Accident_NoFourLetoff.FirstOrDefault(e => e.NoFourLetoffId == noFourLetoff.NoFourLetoffId);
|
||||
if (newNoFourLetoff != null)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace BLL
|
||||
/// <param name="noFourLetoffId"></param>
|
||||
public static void DeleteNoFourLetoffByNoFourLetoffId(string noFourLetoffId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_NoFourLetoff noFourLetoff = db.Accident_NoFourLetoff.FirstOrDefault(e => e.NoFourLetoffId == noFourLetoffId);
|
||||
if (noFourLetoff != null)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ namespace BLL
|
||||
/// <param name="accidentHandleId"></param>
|
||||
public static void DeleteNoFourLetoffByAccidentHandleId(string accidentHandleId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Accident_NoFourLetoff where x.AccidentHandleId == accidentHandleId select x).ToList();
|
||||
if (q!=null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckColligationDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据综合检查id获取所有相关明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="CheckColligationDetail"></param>
|
||||
public static void AddCheckColligationDetail(Model.Check_CheckColligationDetail CheckColligationDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckColligationDetail newCheckColligationDetail = new Model.Check_CheckColligationDetail
|
||||
{
|
||||
CheckColligationDetailId = CheckColligationDetail.CheckColligationDetailId,
|
||||
@@ -71,7 +71,7 @@ namespace BLL
|
||||
/// <param name="CheckColligationDetail"></param>
|
||||
public static void UpdateCheckColligationDetail(Model.Check_CheckColligationDetail CheckColligationDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var newCheckColligationDetail = db.Check_CheckColligationDetail.FirstOrDefault(x => x.CheckColligationDetailId == CheckColligationDetail.CheckColligationDetailId);
|
||||
if (newCheckColligationDetail != null)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="checkColligationId"></param>
|
||||
public static void DeleteCheckColligationDetails(string checkColligationId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckColligationDetail where x.CheckColligationId == checkColligationId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ namespace BLL
|
||||
/// <param name="checkColligationDetailId"></param>
|
||||
public static void DeleteCheckColligationDetailById(string checkColligationDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = db.Check_CheckColligationDetail.FirstOrDefault(x => x.CheckColligationDetailId == checkColligationDetailId);
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
/// <returns>已完成的综合大检查整改数量</returns>
|
||||
public static int GetIsOKViolationCountByCheckTime(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Check_CheckColligation
|
||||
join y in db.Check_CheckColligationDetail on x.CheckColligationId equals y.CheckColligationId
|
||||
where x.CheckTime >= startTime && x.CheckTime <= endTime && x.ProjectId == projectId && y.CompleteStatus != null && y.CompleteStatus == true
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <param name="checkColligation"></param>
|
||||
public static void AddCheckColligation(Model.Check_CheckColligation checkColligation)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckColligation newCheckColligation = new Model.Check_CheckColligation
|
||||
{
|
||||
CheckColligationId = checkColligation.CheckColligationId,
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="checkColligation"></param>
|
||||
public static void UpdateCheckColligation(Model.Check_CheckColligation checkColligation)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckColligation newCheckColligation = db.Check_CheckColligation.FirstOrDefault(e => e.CheckColligationId == checkColligation.CheckColligationId);
|
||||
if (newCheckColligation != null)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ namespace BLL
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteCheckColligation(string checkColligationId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var checkColligation = (from x in db.Check_CheckColligation where x.CheckColligationId == checkColligationId select x).FirstOrDefault();
|
||||
if (checkColligation != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckDayDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据日常巡检id获取所有相关明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="CheckDayDetail"></param>
|
||||
public static void AddCheckDayDetail(Model.Check_CheckDayDetail CheckDayDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckDayDetail newCheckDayDetail = new Model.Check_CheckDayDetail
|
||||
{
|
||||
CheckDayDetailId = CheckDayDetail.CheckDayDetailId,
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
/// <param name="CheckDayDetail"></param>
|
||||
public static void UpdateCheckDayDetail(Model.Check_CheckDayDetail CheckDayDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var newCheckDayDetail = db.Check_CheckDayDetail.FirstOrDefault(x => x.CheckDayDetailId == CheckDayDetail.CheckDayDetailId);
|
||||
if (newCheckDayDetail != null)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ namespace BLL
|
||||
/// <param name="checkDayId"></param>
|
||||
public static void DeleteCheckDayDetails(string checkDayId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckDayDetail where x.CheckDayId == checkDayId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ namespace BLL
|
||||
/// <param name="checkDayDetailId"></param>
|
||||
public static void DeleteCheckDayDetailById(string checkDayDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckDayDetail where x.CheckDayDetailId == checkDayDetailId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <param name="checkDay"></param>
|
||||
public static void AddCheckDay(Model.Check_CheckDay checkDay)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckDay newCheckDay = new Model.Check_CheckDay
|
||||
{
|
||||
CheckDayId = checkDay.CheckDayId,
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <param name="checkDay"></param>
|
||||
public static void UpdateCheckDay(Model.Check_CheckDay checkDay)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckDay newCheckDay = db.Check_CheckDay.FirstOrDefault(e => e.CheckDayId == checkDay.CheckDayId);
|
||||
if (newCheckDay != null)
|
||||
{
|
||||
@@ -101,7 +101,7 @@ namespace BLL
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteCheckDay(string checkDayId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var checkDay = (from x in db.Check_CheckDay where x.CheckDayId == checkDayId select x).FirstOrDefault();
|
||||
if (checkDay != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class Check_CheckSpecialDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据专项检查id获取所有相关明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="checkSpecialDetail"></param>
|
||||
public static void AddCheckSpecialDetail(Model.Check_CheckSpecialDetail checkSpecialDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckSpecialDetail newCheckSpecialDetail = new Model.Check_CheckSpecialDetail
|
||||
{
|
||||
CheckSpecialDetailId = checkSpecialDetail.CheckSpecialDetailId,
|
||||
@@ -77,7 +77,7 @@ namespace BLL
|
||||
/// <param name="CheckSpecialDetail"></param>
|
||||
public static void UpdateCheckSpecialDetail(Model.Check_CheckSpecialDetail CheckSpecialDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var newCheckSpecialDetail = db.Check_CheckSpecialDetail.FirstOrDefault(x => x.CheckSpecialDetailId == CheckSpecialDetail.CheckSpecialDetailId);
|
||||
if (newCheckSpecialDetail != null)
|
||||
{
|
||||
@@ -112,7 +112,7 @@ namespace BLL
|
||||
/// <param name="checkSpecialId"></param>
|
||||
public static void DeleteCheckSpecialDetails(string checkSpecialId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialId == checkSpecialId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ namespace BLL
|
||||
/// <param name="checkSpecialDetailId"></param>
|
||||
public static void DeleteCheckSpecialDetailById(string checkSpecialDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckSpecialDetail where x.CheckSpecialDetailId == checkSpecialDetailId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <returns>已完成的专项检查整改数量</returns>
|
||||
public static int GetIsOKViolationCountByCheckTime(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.Check_CheckSpecial
|
||||
join y in db.Check_CheckSpecialDetail on x.CheckSpecialId equals y.CheckSpecialId
|
||||
where x.CheckTime >= startTime && x.CheckTime <= endTime && x.ProjectId == projectId && y.CompleteStatus != null && y.CompleteStatus == true
|
||||
@@ -67,7 +67,7 @@ namespace BLL
|
||||
/// <param name="checkSpecial"></param>
|
||||
public static void AddCheckSpecial(Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckSpecial newCheckSpecial = new Model.Check_CheckSpecial
|
||||
{
|
||||
CheckSpecialId = checkSpecial.CheckSpecialId,
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="checkSpecial"></param>
|
||||
public static void UpdateCheckSpecial(Model.Check_CheckSpecial checkSpecial)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_CheckSpecial newCheckSpecial = db.Check_CheckSpecial.FirstOrDefault(e => e.CheckSpecialId == checkSpecial.CheckSpecialId);
|
||||
if (newCheckSpecial != null)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ namespace BLL
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeleteCheckSpecial(string checkSpecialId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_CheckSpecial where x.CheckSpecialId == checkSpecialId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice"></param>
|
||||
public static void AddPauseNotice(Model.Check_PauseNotice pauseNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_PauseNotice newPauseNotice = new Model.Check_PauseNotice
|
||||
{
|
||||
PauseNoticeId = pauseNotice.PauseNoticeId,
|
||||
@@ -79,7 +79,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice"></param>
|
||||
public static void UpdatePauseNotice(Model.Check_PauseNotice pauseNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_PauseNotice newPauseNotice = db.Check_PauseNotice.FirstOrDefault(e => e.PauseNoticeId == pauseNotice.PauseNoticeId);
|
||||
if (newPauseNotice != null)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ namespace BLL
|
||||
/// <param name="superviseCheckReportId"></param>
|
||||
public static void DeletePauseNotice(string pauseNoticeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Check_PauseNotice where x.PauseNoticeId == pauseNoticeId select x).FirstOrDefault();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class Check_ProjectLeaderCheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取领导带班检查
|
||||
@@ -127,7 +127,7 @@ namespace BLL
|
||||
/// <param name="ProjectLeaderCheck"></param>
|
||||
public static void AddProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck
|
||||
{
|
||||
ProjectLeaderCheckId = ProjectLeaderCheck.ProjectLeaderCheckId,
|
||||
@@ -156,7 +156,7 @@ namespace BLL
|
||||
/// <param name="ProjectLeaderCheck"></param>
|
||||
public static void UpdateProjectLeaderCheck(Model.Check_ProjectLeaderCheck ProjectLeaderCheck)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ProjectLeaderCheck newProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheck.ProjectLeaderCheckId);
|
||||
if (newProjectLeaderCheck != null)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ namespace BLL
|
||||
/// <param name="ProjectLeaderCheckId"></param>
|
||||
public static void DeleteProjectLeaderCheckById(string ProjectLeaderCheckId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ProjectLeaderCheck ProjectLeaderCheck = db.Check_ProjectLeaderCheck.FirstOrDefault(e => e.ProjectLeaderCheckId == ProjectLeaderCheckId);
|
||||
if (ProjectLeaderCheck != null)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class IncentiveNoticeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取奖励通知单
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSumMoney(string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
decimal? sumRewardMoney = (from x in db.Check_IncentiveNotice
|
||||
where
|
||||
x.ProjectId == projectId && x.States == BLL.Const.State_2
|
||||
@@ -94,7 +94,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSumMoneyByTime(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
decimal? sumRewardMoney = (from x in db.Check_IncentiveNotice
|
||||
where
|
||||
x.IncentiveDate >= startTime && x.IncentiveDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2
|
||||
@@ -116,7 +116,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSumMoneyByTimeAndType(DateTime startTime, DateTime endTime, string rewardType, string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
decimal? sumRewardMoney = (from x in db.Check_IncentiveNotice
|
||||
where
|
||||
x.RewardType == rewardType &&
|
||||
@@ -135,7 +135,7 @@ namespace BLL
|
||||
/// <param name="incentiveNotice"></param>
|
||||
public static void AddIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_IncentiveNotice newIncentiveNotice = new Model.Check_IncentiveNotice
|
||||
{
|
||||
IncentiveNoticeId = incentiveNotice.IncentiveNoticeId,
|
||||
@@ -170,7 +170,7 @@ namespace BLL
|
||||
/// <param name="incentiveNotice"></param>
|
||||
public static void UpdateIncentiveNotice(Model.Check_IncentiveNotice incentiveNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_IncentiveNotice newIncentiveNotice = db.Check_IncentiveNotice.FirstOrDefault(e => e.IncentiveNoticeId == incentiveNotice.IncentiveNoticeId);
|
||||
if (newIncentiveNotice != null)
|
||||
{
|
||||
@@ -203,7 +203,7 @@ namespace BLL
|
||||
/// <param name="incentiveNoticeId"></param>
|
||||
public static void DeleteIncentiveNoticeById(string incentiveNoticeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_IncentiveNotice incentiveNotice = db.Check_IncentiveNotice.FirstOrDefault(e => e.IncentiveNoticeId == incentiveNoticeId);
|
||||
if (incentiveNotice != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class PunishNoticeService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取处罚通知单
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSumMoney(string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
decimal? sumRewardMoney = (from x in db.Check_PunishNotice
|
||||
where x.ProjectId == projectId && x.States == BLL.Const.State_2
|
||||
select x.PunishMoney).Sum();
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal? GetSumMoneyByTime(DateTime startTime, DateTime endTime, string projectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
decimal? sumRewardMoney = (from x in db.Check_PunishNotice
|
||||
where x.PunishNoticeDate >= startTime && x.PunishNoticeDate < endTime && x.ProjectId == projectId && x.States == BLL.Const.State_2
|
||||
select x.PunishMoney).Sum();
|
||||
@@ -109,7 +109,7 @@ namespace BLL
|
||||
/// <param name="punishNotice"></param>
|
||||
public static void AddPunishNotice(Model.Check_PunishNotice punishNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_PunishNotice newPunishNotice = new Model.Check_PunishNotice
|
||||
{
|
||||
PunishNoticeId = punishNotice.PunishNoticeId,
|
||||
@@ -144,7 +144,7 @@ namespace BLL
|
||||
/// <param name="punishNotice"></param>
|
||||
public static void UpdatePunishNotice(Model.Check_PunishNotice punishNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_PunishNotice newPunishNotice = db.Check_PunishNotice.FirstOrDefault(e => e.PunishNoticeId == punishNotice.PunishNoticeId);
|
||||
if (newPunishNotice != null)
|
||||
{
|
||||
@@ -176,7 +176,7 @@ namespace BLL
|
||||
/// <param name="punishNoticeId"></param>
|
||||
public static void DeletePunishNoticeById(string punishNoticeId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_PunishNotice punishNotice = db.Check_PunishNotice.FirstOrDefault(e => e.PunishNoticeId == punishNoticeId);
|
||||
if (punishNotice != null)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// <param name="rectifyNotice"></param>
|
||||
public static void AddRectifyNotices(Model.Check_RectifyNotices rectifyNotice)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_RectifyNotices newRectifyNotices = new Model.Check_RectifyNotices
|
||||
{
|
||||
RectifyNoticesId = rectifyNotice.RectifyNoticesId,
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="rectifyNotices"></param>
|
||||
public static void UpdateRectifyNotices(Model.Check_RectifyNotices rectifyNotices)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_RectifyNotices newRectifyNotices = db.Check_RectifyNotices.FirstOrDefault(e => e.RectifyNoticesId == rectifyNotices.RectifyNoticesId);
|
||||
if (newRectifyNotices != null)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ namespace BLL
|
||||
/// <param name="rectifyNoticesId"></param>
|
||||
public static void DeleteRectifyNoticesById(string rectifyNoticesId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_RectifyNotices rectifyNotices = db.Check_RectifyNotices.FirstOrDefault(e => e.RectifyNoticesId == rectifyNoticesId);
|
||||
if (rectifyNotices != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ViolationPersonService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取违规人员记录
|
||||
@@ -40,7 +40,7 @@ namespace BLL
|
||||
/// <param name="violationPerson"></param>
|
||||
public static void AddViolationPerson(Model.Check_ViolationPerson violationPerson)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ViolationPerson newViolationPerson = new Model.Check_ViolationPerson
|
||||
{
|
||||
ViolationPersonId = violationPerson.ViolationPersonId,
|
||||
@@ -69,7 +69,7 @@ namespace BLL
|
||||
/// <param name="violationPerson"></param>
|
||||
public static void UpdateViolationPerson(Model.Check_ViolationPerson violationPerson)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ViolationPerson newViolationPerson = db.Check_ViolationPerson.FirstOrDefault(e => e.ViolationPersonId == violationPerson.ViolationPersonId);
|
||||
if (newViolationPerson != null)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ namespace BLL
|
||||
/// <param name="violationPersonId"></param>
|
||||
public static void DeleteViolationPersonById(string violationPersonId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Check_ViolationPerson violationPerson = db.Check_ViolationPerson.FirstOrDefault(e => e.ViolationPersonId == violationPersonId);
|
||||
if (violationPerson != null)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostManageItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除费用管理明细
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <param name="costManageItem"></param>
|
||||
public static void AddCostManageItem(Model.CostGoods_CostManageItem costManageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem newCostManageItem = new Model.CostGoods_CostManageItem
|
||||
{
|
||||
CostManageItemId = costManageItem.CostManageItemId,
|
||||
@@ -77,7 +77,7 @@ namespace BLL
|
||||
/// <param name="costManageItem"></param>
|
||||
public static void UpdateCostManageItem(Model.CostGoods_CostManageItem costManageItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem newCostManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItem.CostManageItemId);
|
||||
if (newCostManageItem != null)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="costManageId"></param>
|
||||
public static void DeleteCostManageItemByCostManageId(string costManageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_CostManageItem where x.CostManageId == costManageId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ namespace BLL
|
||||
/// <param name="costManageItemId"></param>
|
||||
public static void DeleteCostManageItemById(string costManageItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManageItem costManageItem = db.CostGoods_CostManageItem.FirstOrDefault(e => e.CostManageItemId == costManageItemId);
|
||||
if (costManageItem != null)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ namespace BLL
|
||||
|
||||
public static decimal? GetCostsByUnitId(string unitId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_CostManageItem
|
||||
join y in db.CostGoods_CostManage
|
||||
on x.CostManageId equals y.CostManageId
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostManageService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用管理
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="costManage"></param>
|
||||
public static void AddCostManage(Model.CostGoods_CostManage costManage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage newCostManage = new Model.CostGoods_CostManage
|
||||
{
|
||||
CostManageId = costManage.CostManageId,
|
||||
@@ -67,7 +67,7 @@ namespace BLL
|
||||
/// <param name="costManage"></param>
|
||||
public static void UpdateCostManage(Model.CostGoods_CostManage costManage)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage newCostManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManage.CostManageId);
|
||||
if (newCostManage != null)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ namespace BLL
|
||||
/// <param name="costManageId"></param>
|
||||
public static void DeleteCostManageById(string costManageId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostManage costManage = db.CostGoods_CostManage.FirstOrDefault(e => e.CostManageId == costManageId);
|
||||
if (costManage != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记明细
|
||||
@@ -24,7 +24,7 @@ namespace BLL
|
||||
|
||||
public static List<Model.CostGoods_CostSmallDetailItem> GetCostDetailsByUnitId(string projectId,string unitId, DateTime? startTime, DateTime? endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_CostSmallDetailItem
|
||||
join y in db.CostGoods_CostSmallDetail on x.CostSmallDetailId equals y.CostSmallDetailId
|
||||
@@ -45,7 +45,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal GetCostDetailsByUnitIdAndCostType(string projectId, string unitId, DateTime startTime, DateTime endTime, string costType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
decimal cost = 0;
|
||||
var q = from x in db.CostGoods_CostSmallDetailItem
|
||||
@@ -79,7 +79,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal GetCostDetailsByCostType(string projectId, DateTime startTime, DateTime endTime, string costType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
decimal cost = 0;
|
||||
var q = from x in db.CostGoods_CostSmallDetailItem
|
||||
@@ -113,7 +113,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal GetTotalCostDetailsByCostType(string projectId, string costType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
decimal cost = 0;
|
||||
var q = from x in db.CostGoods_CostSmallDetailItem
|
||||
@@ -153,7 +153,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice">费用明细实体</param>
|
||||
public static void AddCostDetail(string costSmallDetailId, string costType, decimal costMoney, string costDef)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostSmallDetailItem newCostSmallDetailItem = new Model.CostGoods_CostSmallDetailItem
|
||||
{
|
||||
CostSmallDetailItemId = SQLHelper.GetNewID(typeof(Model.CostGoods_CostSmallDetailItem)),
|
||||
@@ -172,7 +172,7 @@ namespace BLL
|
||||
/// <param name="costSmallDetailItemId"></param>
|
||||
public static void DeleteCostSmallDetailItemById(string costSmallDetailItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostSmallDetailItem costSmallDetailItem = db.CostGoods_CostSmallDetailItem.FirstOrDefault(e => e.CostSmallDetailItemId == costSmallDetailItemId);
|
||||
if (costSmallDetailItem != null)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ namespace BLL
|
||||
/// <param name="costSmallDetailId"></param>
|
||||
public static void DeleteCostSmallDetailItemByCostSmallDetailId(string costSmallDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_CostSmallDetailItem where x.CostSmallDetailId == costSmallDetailId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CostSmallDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全费用投入登记
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="costSmallDetail"></param>
|
||||
public static void AddCostSmallDetail(Model.CostGoods_CostSmallDetail costSmallDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostSmallDetail newCostSmallDetail = new Model.CostGoods_CostSmallDetail
|
||||
{
|
||||
CostSmallDetailId = costSmallDetail.CostSmallDetailId,
|
||||
@@ -56,7 +56,7 @@ namespace BLL
|
||||
/// <param name="costSmallDetail"></param>
|
||||
public static void UpdateCostSmallDetail(Model.CostGoods_CostSmallDetail costSmallDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostSmallDetail newCostSmallDetail = db.CostGoods_CostSmallDetail.FirstOrDefault(e => e.CostSmallDetailId == costSmallDetail.CostSmallDetailId);
|
||||
if (newCostSmallDetail != null)
|
||||
{
|
||||
@@ -82,7 +82,7 @@ namespace BLL
|
||||
/// <param name="costSmallDetailId"></param>
|
||||
public static void DeleteCostSmallDetailById(string costSmallDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_CostSmallDetail costSmallDetail = db.CostGoods_CostSmallDetail.FirstOrDefault(e => e.CostSmallDetailId == costSmallDetailId);
|
||||
if (costSmallDetail != null)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static List<Model.CostGoods_ExpenseDetail> GetCostDetailsByUnitId(string unitId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.CostGoods_ExpenseDetail
|
||||
join y in db.CostGoods_Expense on x.ExpenseId equals y.ExpenseId
|
||||
@@ -58,7 +58,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static decimal GetCostDetailsByUnitIdAndCostType(string unitId, DateTime startTime, DateTime endTime, string costType)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
decimal cost = 0;
|
||||
var q = from x in db.CostGoods_ExpenseDetail
|
||||
@@ -88,7 +88,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice">费用明细实体</param>
|
||||
public static void AddCostDetail(string expenseId, string costType, decimal costMoney, string costDef)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_ExpenseDetail newExpenseDetail = new Model.CostGoods_ExpenseDetail
|
||||
{
|
||||
ExpenseDetailId = SQLHelper.GetNewID(typeof(Model.CostGoods_ExpenseDetail)),
|
||||
@@ -118,7 +118,7 @@ namespace BLL
|
||||
/// <param name="expenseId">编号</param>
|
||||
public static void DeleteCostDetailByExpenseId(string expenseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.CostGoods_ExpenseDetail where x.ExpenseId == expenseId select x).ToList();
|
||||
db.CostGoods_ExpenseDetail.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ExpenseService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取措施费用使用计划
|
||||
@@ -43,7 +43,7 @@ namespace BLL
|
||||
/// <param name="expense"></param>
|
||||
public static void AddExpense(Model.CostGoods_Expense expense)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_Expense newExpense = new Model.CostGoods_Expense
|
||||
{
|
||||
ExpenseId = expense.ExpenseId,
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="expense"></param>
|
||||
public static void UpdateExpense(Model.CostGoods_Expense expense)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_Expense newExpense = db.CostGoods_Expense.FirstOrDefault(e => e.ExpenseId == expense.ExpenseId);
|
||||
if (newExpense != null)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ namespace BLL
|
||||
/// <param name="expenseId"></param>
|
||||
public static void DeleteExpenseById(string expenseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.CostGoods_Expense expense = db.CostGoods_Expense.FirstOrDefault(e => e.ExpenseId == expenseId);
|
||||
if (expense != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class AccidentCaseItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据常见事故案例明细Id获取事故案例明细
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="item"></param>
|
||||
public static void AddAccidentCaseItem(Model.EduTrain_AccidentCaseItem item)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCaseItem newItem = new Model.EduTrain_AccidentCaseItem
|
||||
{
|
||||
AccidentCaseItemId = item.AccidentCaseItemId,
|
||||
@@ -61,7 +61,7 @@ namespace BLL
|
||||
/// <param name="item"></param>
|
||||
public static void UpdateAccidentCaseItem(Model.EduTrain_AccidentCaseItem item)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCaseItem newItem = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == item.AccidentCaseItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <param name="item"></param>
|
||||
public static void UpdateAccidentCaseItemIsPass(Model.EduTrain_AccidentCaseItem item)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCaseItem newItem = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == item.AccidentCaseItemId);
|
||||
if (newItem != null)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace BLL
|
||||
/// <param name="trainingId">教育培训项ID</param>
|
||||
public static void DeleteAccidentCaseItemsByAccidentCaseId(string accidentCaseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var accidentCaseItems = (from x in db.EduTrain_AccidentCaseItem where x.AccidentCaseId == accidentCaseId select x).ToList();
|
||||
if (accidentCaseItems != null)
|
||||
{
|
||||
@@ -112,7 +112,7 @@ namespace BLL
|
||||
/// <param name="accidentCaseItemId">常见事故案例明细主键</param>
|
||||
public static void DeleteAccidentCaseItemId(string accidentCaseItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCaseItem item = db.EduTrain_AccidentCaseItem.FirstOrDefault(e => e.AccidentCaseItemId == accidentCaseItemId);
|
||||
if (item != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class AccidentCaseService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故伤害及预防
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="accidentCase"></param>
|
||||
public static void AddAccidentCase(Model.EduTrain_AccidentCase accidentCase)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCase newAccidentCase = new Model.EduTrain_AccidentCase
|
||||
{
|
||||
AccidentCaseId = accidentCase.AccidentCaseId,
|
||||
@@ -44,7 +44,7 @@ namespace BLL
|
||||
/// <param name="accidentCase"></param>
|
||||
public static void UpdateAccidentCase(Model.EduTrain_AccidentCase accidentCase)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCase newAccidentCase = db.EduTrain_AccidentCase.FirstOrDefault(e => e.AccidentCaseId == accidentCase.AccidentCaseId);
|
||||
if (newAccidentCase != null)
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace BLL
|
||||
/// <param name="accidentCaseId"></param>
|
||||
public static void DeleteAccidentCaseByAccidentCaseId(string accidentCaseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_AccidentCase accidentCase = db.EduTrain_AccidentCase.FirstOrDefault(e => e.AccidentCaseId == accidentCaseId);
|
||||
if (accidentCase != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class CompanyTrainingItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取公司培训明细信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class CompanyTrainingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取公司培训
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainRecordDetailService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取所有的教育培训明细信息
|
||||
@@ -31,7 +31,7 @@ namespace BLL
|
||||
/// <param name="trainDetail">教育培训明细信息实体</param>
|
||||
public static void AddTrainDetail(Model.EduTrain_TrainRecordDetail trainDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.EduTrain_TrainRecordDetail));
|
||||
Model.EduTrain_TrainRecordDetail newTrainDetail = new Model.EduTrain_TrainRecordDetail
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <param name="trainDetail">教育培训明细信息</param>
|
||||
public static void UpdateTrainDetail(Model.EduTrain_TrainRecordDetail trainDetail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainRecordDetail newTrainRecordDetail = db.EduTrain_TrainRecordDetail.FirstOrDefault(e => e.TrainDetailId == trainDetail.TrainDetailId);
|
||||
if (newTrainRecordDetail != null)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace BLL
|
||||
/// <param name="trainingId">教育培训主键</param>
|
||||
public static void DeleteTrainDetailByTrainingId(string trainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.EduTrain_TrainRecordDetail where x.TrainingId == trainingId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="trainingId"></param>
|
||||
public static void DeleteTrainDetailByTrainDetail(string trainDetailId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainRecordDetail trainDetails = Funs.DB.EduTrain_TrainRecordDetail.FirstOrDefault(e => e.TrainDetailId == trainDetailId);
|
||||
if (trainDetails != null)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取教育培训信息
|
||||
@@ -29,7 +29,7 @@ namespace BLL
|
||||
/// <param name="training">教育培训实体</param>
|
||||
public static void AddTraining(Model.EduTrain_TrainRecord training)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainRecord newTraining = new Model.EduTrain_TrainRecord
|
||||
{
|
||||
TrainingId = training.TrainingId,
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
/// <param name="training">教育培训实体</param>
|
||||
public static void UpdateTraining(Model.EduTrain_TrainRecord training)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainRecord newTraining = db.EduTrain_TrainRecord.FirstOrDefault(e => e.TrainingId == training.TrainingId);
|
||||
if (newTraining != null)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ namespace BLL
|
||||
/// <param name="trainingId">教育培训主键</param>
|
||||
public static void DeleteTrainingByTrainingId(string trainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainRecord training = db.EduTrain_TrainRecord.FirstOrDefault(e => e.TrainingId == trainingId);
|
||||
if (training != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EduTrain_TrainTestService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据教育培训主键获取所有的教育培训明细信息
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// <param name="trainTest">教育培训明细信息实体</param>
|
||||
public static void AddTrainTest(Model.EduTrain_TrainTest trainTest)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.EduTrain_TrainTest newTrainTest = new Model.EduTrain_TrainTest
|
||||
{
|
||||
TrainTestId = trainTest.TrainTestId,
|
||||
@@ -58,7 +58,7 @@ namespace BLL
|
||||
/// <param name="trainingId">教育培训主键</param>
|
||||
public static void DeleteTrainTestByTrainingId(string trainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.EduTrain_TrainTest where x.TrainingId == trainingId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestPlanService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestRecordItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据考试记录Id获取明细信息
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TestRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取考试记录
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void AddTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestRecord newTestRecord = new Model.Training_TestRecord
|
||||
{
|
||||
TestRecordId = testRecord.TestRecordId,
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void UpdateTestRecord(Model.Training_TestRecord testRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestRecord newTestRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecord.TestRecordId);
|
||||
if (newTestRecord != null)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace BLL
|
||||
/// <param name="planId"></param>
|
||||
public static void DeleteTestRecordByTestRecordId(string testRecordId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var testRecord = db.Training_TestRecord.FirstOrDefault(e => e.TestRecordId == testRecordId);
|
||||
if (testRecord != null)
|
||||
@@ -117,7 +117,7 @@ namespace BLL
|
||||
public static int UpdateTestEndTimeNull(string testRecordId)
|
||||
{
|
||||
int icount = 0;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.Training_TestRecord
|
||||
where x.TestRecordId == testRecordId
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class TestTrainingItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// <param name="TrainingItem"></param>
|
||||
public static void AddTestTrainingItem(Model.Training_TestTrainingItem TestTrainingItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTrainingItem newTestTrainingItem = new Model.Training_TestTrainingItem
|
||||
{
|
||||
TrainingItemId = TestTrainingItem.TrainingItemId,
|
||||
@@ -56,7 +56,7 @@ namespace BLL
|
||||
/// <param name="TrainingItem"></param>
|
||||
public static void UpdateTestTrainingItem(Model.Training_TestTrainingItem TestTrainingItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTrainingItem newTestTrainingItem = db.Training_TestTrainingItem.FirstOrDefault(e => e.TrainingItemId == TestTrainingItem.TrainingItemId);
|
||||
if (newTestTrainingItem != null)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace BLL
|
||||
/// <param name="TrainingItemId"></param>
|
||||
public static void DeleteTestTrainingItemById(string TrainingItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTrainingItem TestTrainingItem = db.Training_TestTrainingItem.FirstOrDefault(e => e.TrainingItemId == TrainingItemId);
|
||||
if (TestTrainingItem != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class TestTrainingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void AddTestTraining(Model.Training_TestTraining TestTraining)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTraining newTestTraining = new Model.Training_TestTraining
|
||||
{
|
||||
TrainingId = TestTraining.TrainingId,
|
||||
@@ -44,7 +44,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void UpdateTestTraining(Model.Training_TestTraining TestTraining)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTraining newTestTraining = db.Training_TestTraining.FirstOrDefault(e => e.TrainingId == TestTraining.TrainingId);
|
||||
if (newTestTraining != null)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace BLL
|
||||
/// <param name="TrainingId"></param>
|
||||
public static void DeleteTestTrainingById(string TrainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TestTraining TestTraining = db.Training_TestTraining.FirstOrDefault(e => e.TrainingId == TrainingId);
|
||||
if (TestTraining != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestDBItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除安全试题库明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="trainTestDBItem"></param>
|
||||
public static void AddTrainTestDBItem(Model.Training_TrainTestDBItem trainTestDBItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDBItem newTrainTestDBItem = new Model.Training_TrainTestDBItem
|
||||
{
|
||||
TrainTestItemId = trainTestDBItem.TrainTestItemId,
|
||||
@@ -62,7 +62,7 @@ namespace BLL
|
||||
/// <param name="trainTestDBItem"></param>
|
||||
public static void UpdateTrainTestDBItem(Model.Training_TrainTestDBItem trainTestDBItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDBItem newTrainTestDBItem = db.Training_TrainTestDBItem.FirstOrDefault(e => e.TrainTestItemId == trainTestDBItem.TrainTestItemId);
|
||||
if (newTrainTestDBItem != null)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace BLL
|
||||
/// <param name="trainTestDBItem"></param>
|
||||
public static void UpdateTrainTestDBItemIsPass(Model.Training_TrainTestDBItem trainTestDBItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDBItem newTrainTestDBItem = db.Training_TrainTestDBItem.FirstOrDefault(e => e.TrainTestItemId == trainTestDBItem.TrainTestItemId);
|
||||
if (newTrainTestDBItem != null)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
/// <param name="trainTestItemId"></param>
|
||||
public static void DeleteTrainTestDBItemById(string trainTestItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDBItem trainTestDBItem = db.Training_TrainTestDBItem.FirstOrDefault(e => e.TrainTestItemId == trainTestItemId);
|
||||
if (trainTestDBItem != null)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace BLL
|
||||
/// <param name="trainTestId"></param>
|
||||
public static void DeleteTrainTestDBItemList(string trainTestId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Training_TrainTestDBItem where x.TrainTestId == trainTestId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestDBService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全试题库信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="trainTestDB"></param>
|
||||
public static void AddTrainTestDB(Model.Training_TrainTestDB trainTestDB)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDB newTrainTestDB = new Model.Training_TrainTestDB
|
||||
{
|
||||
TrainTestId = trainTestDB.TrainTestId,
|
||||
@@ -57,7 +57,7 @@ namespace BLL
|
||||
/// <param name="trainTestDB"></param>
|
||||
public static void UpdateTrainTestDB(Model.Training_TrainTestDB trainTestDB)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDB newTrainTestDB = db.Training_TrainTestDB.FirstOrDefault(e => e.TrainTestId == trainTestDB.TrainTestId);
|
||||
if (newTrainTestDB != null)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
/// <param name="trainTestDBId"></param>
|
||||
public static void DeleteTrainTestDB(string trainTestId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestDB trainTestDB = db.Training_TrainTestDB.FirstOrDefault(e => e.TrainTestId == trainTestId);
|
||||
if (trainTestDB != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainTestRecordService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取考试记录
|
||||
@@ -26,7 +26,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void AddTestRecord(Model.Training_TrainTestRecord testRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestRecord newTestRecord = new Model.Training_TrainTestRecord
|
||||
{
|
||||
TrainingTestRecordId = testRecord.TrainingTestRecordId,
|
||||
@@ -48,7 +48,7 @@ namespace BLL
|
||||
/// <param name="Training"></param>
|
||||
public static void UpdateTrainTestRecord(Model.Training_TrainTestRecord testRecord)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainTestRecord newTestRecord = db.Training_TrainTestRecord.FirstOrDefault(e => e.TrainingTestRecordId == testRecord.TrainingTestRecordId);
|
||||
if (newTestRecord != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class TrainingItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="trainingItem">教育培训内容实体</param>
|
||||
public static void AddTrainingItem(Model.Training_TrainingItem trainingItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainingItem newTrainingItem = new Model.Training_TrainingItem
|
||||
{
|
||||
TrainingItemId = trainingItem.TrainingItemId,
|
||||
@@ -65,7 +65,7 @@ namespace BLL
|
||||
/// <param name="trainingItem">教育培训内容实体</param>
|
||||
public static void UpdateTrainingItem(Model.Training_TrainingItem trainingItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainingItem newTrainingItem = db.Training_TrainingItem.FirstOrDefault(e => e.TrainingItemId == trainingItem.TrainingItemId);
|
||||
if (newTrainingItem != null)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
/// <param name="trainingItem"></param>
|
||||
public static void UpdateTrainingItemIsPass(Model.Training_TrainingItem trainingItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_TrainingItem newTrainingItem = db.Training_TrainingItem.FirstOrDefault(e => e.TrainingItemId == trainingItem.TrainingItemId);
|
||||
if (newTrainingItem != null)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ namespace BLL
|
||||
/// <param name="trainingId">教育培训项ID</param>
|
||||
public static void DeleteTrainingItemsByTrainingId(string trainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var trainingItems = (from x in db.Training_TrainingItem where x.TrainingId == trainingId select x).ToList();
|
||||
if (trainingItems.Count() > 0)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ namespace BLL
|
||||
/// <param name="trainingItemId">教育培训内容ID</param>
|
||||
public static void DeleteTrainingItemsByTrainingItemId(string trainingItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var trainingItem = db.Training_TrainingItem.FirstOrDefault(x => x.TrainingItemId == trainingItemId);
|
||||
if (trainingItem != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据培训计划明细表Id获取所有相关明细信息
|
||||
@@ -79,7 +79,7 @@ namespace BLL
|
||||
/// <param name="planId"></param>
|
||||
public static void DeletePlanItemByPlanId(string planId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var planItem = (from x in db.Training_PlanItem where x.PlanId == planId select x).ToList();
|
||||
if (planItem.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingPlanService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训计划
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class TrainingService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据上级Id查询所有教育培训主键列的值
|
||||
@@ -44,7 +44,7 @@ namespace BLL
|
||||
/// <param name="Training">教育培训实体</param>
|
||||
public static void AddTraining(Model.Training_Training Training)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Training newTraining = new Model.Training_Training
|
||||
{
|
||||
TrainingId = Training.TrainingId,
|
||||
@@ -64,7 +64,7 @@ namespace BLL
|
||||
/// <param name="Training">教育培训实体</param>
|
||||
public static void UpdateTraining(Model.Training_Training Training)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Training newTraining = db.Training_Training.First(e => e.TrainingId == Training.TrainingId);
|
||||
newTraining.TrainingCode = Training.TrainingCode;
|
||||
newTraining.TrainingName = Training.TrainingName;
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <param name="TrainingId">教育培训ID</param>
|
||||
public static void DeleteTrainingByTrainingId(string TrainingId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Training_Training Training = db.Training_Training.FirstOrDefault(e => e.TrainingId == TrainingId);
|
||||
if (Training != null)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ namespace BLL
|
||||
/// <param name="supItem">上级Id</param>
|
||||
public static void DeleteTrainingBySupItem(string supItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Training_Training where x.SupTrainingId == supItem select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class TrainingTaskService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取培训任务
|
||||
@@ -89,7 +89,7 @@ namespace BLL
|
||||
/// <param name="planId"></param>
|
||||
public static void DeleteTaskByPlanId(string planId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var tasks = from x in db.Training_Task where x.PlanId == planId select x;
|
||||
if (tasks.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class DrillRecordListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
/// <param name="DrillRecordList"></param>
|
||||
public static void AddDrillRecordList(Model.Emergency_DrillRecordList DrillRecordList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_DrillRecordList newDrillRecordList = new Model.Emergency_DrillRecordList
|
||||
{
|
||||
DrillRecordListId = DrillRecordList.DrillRecordListId,
|
||||
@@ -108,7 +108,7 @@ namespace BLL
|
||||
/// <param name="DrillRecordList"></param>
|
||||
public static void UpdateDrillRecordList(Model.Emergency_DrillRecordList DrillRecordList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_DrillRecordList newDrillRecordList = db.Emergency_DrillRecordList.FirstOrDefault(e => e.DrillRecordListId == DrillRecordList.DrillRecordListId);
|
||||
if (newDrillRecordList != null)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ namespace BLL
|
||||
/// <param name="DrillRecordListId"></param>
|
||||
public static void DeleteDrillRecordListById(string DrillRecordListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_DrillRecordList DrillRecordList = db.Emergency_DrillRecordList.FirstOrDefault(e => e.DrillRecordListId == DrillRecordListId);
|
||||
if (DrillRecordList != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencyListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急预案管理
|
||||
@@ -42,7 +42,7 @@ namespace BLL
|
||||
/// <returns>应急预案实体集合</returns>
|
||||
public static List<Model.Emergency_EmergencyList> GetEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Emergency_EmergencyList
|
||||
join y in db.Base_EmergencyType
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <returns>其他应急预案实体集合</returns>
|
||||
public static List<Model.Emergency_EmergencyList> GetOtherEmergencyListsByEmergencyType(string emergencyType, string projectId, DateTime startTime, DateTime endTime)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.Emergency_EmergencyList
|
||||
join y in db.Base_EmergencyType
|
||||
@@ -76,7 +76,7 @@ namespace BLL
|
||||
/// <param name="EmergencyList"></param>
|
||||
public static void AddEmergencyList(Model.Emergency_EmergencyList EmergencyList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyList newEmergencyList = new Model.Emergency_EmergencyList
|
||||
{
|
||||
EmergencyListId = EmergencyList.EmergencyListId,
|
||||
@@ -106,7 +106,7 @@ namespace BLL
|
||||
/// <param name="EmergencyList"></param>
|
||||
public static void UpdateEmergencyList(Model.Emergency_EmergencyList EmergencyList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyList newEmergencyList = db.Emergency_EmergencyList.FirstOrDefault(e => e.EmergencyListId == EmergencyList.EmergencyListId);
|
||||
if (newEmergencyList != null)
|
||||
{
|
||||
@@ -132,7 +132,7 @@ namespace BLL
|
||||
/// <param name="EmergencyListId"></param>
|
||||
public static void DeleteEmergencyListById(string EmergencyListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyList EmergencyList = db.Emergency_EmergencyList.FirstOrDefault(e => e.EmergencyListId == EmergencyListId);
|
||||
if (EmergencyList != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencySupplyService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急物资管理
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EmergencySupply"></param>
|
||||
public static void AddEmergencySupply(Model.Emergency_EmergencySupply EmergencySupply)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencySupply newEmergencySupply = new Model.Emergency_EmergencySupply
|
||||
{
|
||||
FileId = EmergencySupply.FileId,
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <param name="EmergencySupply"></param>
|
||||
public static void UpdateEmergencySupply(Model.Emergency_EmergencySupply EmergencySupply)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencySupply newEmergencySupply = db.Emergency_EmergencySupply.FirstOrDefault(e => e.FileId == EmergencySupply.FileId);
|
||||
if (newEmergencySupply != null)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEmergencySupplyById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencySupply EmergencySupply = db.Emergency_EmergencySupply.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (EmergencySupply != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EmergencyTeamAndTrainService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急队伍/培训
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EmergencyTeamAndTrain"></param>
|
||||
public static void AddEmergencyTeamAndTrain(Model.Emergency_EmergencyTeamAndTrain EmergencyTeamAndTrain)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyTeamAndTrain newEmergencyTeamAndTrain = new Model.Emergency_EmergencyTeamAndTrain
|
||||
{
|
||||
FileId = EmergencyTeamAndTrain.FileId,
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <param name="EmergencyTeamAndTrain"></param>
|
||||
public static void UpdateEmergencyTeamAndTrain(Model.Emergency_EmergencyTeamAndTrain EmergencyTeamAndTrain)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyTeamAndTrain newEmergencyTeamAndTrain = db.Emergency_EmergencyTeamAndTrain.FirstOrDefault(e => e.FileId == EmergencyTeamAndTrain.FileId);
|
||||
if (newEmergencyTeamAndTrain != null)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEmergencyTeamAndTrainById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyTeamAndTrain EmergencyTeamAndTrain = db.Emergency_EmergencyTeamAndTrain.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (EmergencyTeamAndTrain != null)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace BLL
|
||||
/// <param name="item"></param>
|
||||
public static void AddEmergencyTeamItem(Model.Emergency_EmergencyTeamItem item)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Emergency_EmergencyTeamItem newItem = new Model.Emergency_EmergencyTeamItem
|
||||
{
|
||||
EmergencyTeamItemId = item.EmergencyTeamItemId,
|
||||
@@ -115,7 +115,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEmergency_EmergencyTeamItem(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var delItem = from x in db.Emergency_EmergencyTeamItem where x.FileId == FileId select x;
|
||||
if (delItem.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EIAReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环评报告
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EIAReport"></param>
|
||||
public static void AddEIAReport(Model.Environmental_EIAReport EIAReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EIAReport newEIAReport = new Model.Environmental_EIAReport
|
||||
{
|
||||
FileId = EIAReport.FileId,
|
||||
@@ -53,7 +53,7 @@ namespace BLL
|
||||
/// <param name="EIAReport"></param>
|
||||
public static void UpdateEIAReport(Model.Environmental_EIAReport EIAReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EIAReport newEIAReport = db.Environmental_EIAReport.FirstOrDefault(e => e.FileId == EIAReport.FileId);
|
||||
if (newEIAReport != null)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEIAReportById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EIAReport EIAReport = db.Environmental_EIAReport.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (EIAReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EnvironmentalEmergencyPlanService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环境事件应急预案
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EnvironmentalEmergencyPlan"></param>
|
||||
public static void AddEnvironmentalEmergencyPlan(Model.Environmental_EnvironmentalEmergencyPlan EnvironmentalEmergencyPlan)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalEmergencyPlan newEnvironmentalEmergencyPlan = new Model.Environmental_EnvironmentalEmergencyPlan
|
||||
{
|
||||
FileId = EnvironmentalEmergencyPlan.FileId,
|
||||
@@ -53,7 +53,7 @@ namespace BLL
|
||||
/// <param name="EnvironmentalEmergencyPlan"></param>
|
||||
public static void UpdateEnvironmentalEmergencyPlan(Model.Environmental_EnvironmentalEmergencyPlan EnvironmentalEmergencyPlan)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalEmergencyPlan newEnvironmentalEmergencyPlan = db.Environmental_EnvironmentalEmergencyPlan.FirstOrDefault(e => e.FileId == EnvironmentalEmergencyPlan.FileId);
|
||||
if (newEnvironmentalEmergencyPlan != null)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEnvironmentalEmergencyPlanById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalEmergencyPlan EnvironmentalEmergencyPlan = db.Environmental_EnvironmentalEmergencyPlan.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (EnvironmentalEmergencyPlan != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EnvironmentalMonitoringService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取环境监测数据
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EnvironmentalMonitoring"></param>
|
||||
public static void AddEnvironmentalMonitoring(Model.Environmental_EnvironmentalMonitoring EnvironmentalMonitoring)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalMonitoring newEnvironmentalMonitoring = new Model.Environmental_EnvironmentalMonitoring
|
||||
{
|
||||
FileId = EnvironmentalMonitoring.FileId,
|
||||
@@ -53,7 +53,7 @@ namespace BLL
|
||||
/// <param name="EnvironmentalMonitoring"></param>
|
||||
public static void UpdateEnvironmentalMonitoring(Model.Environmental_EnvironmentalMonitoring EnvironmentalMonitoring)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalMonitoring newEnvironmentalMonitoring = db.Environmental_EnvironmentalMonitoring.FirstOrDefault(e => e.FileId == EnvironmentalMonitoring.FileId);
|
||||
if (newEnvironmentalMonitoring != null)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteEnvironmentalMonitoringById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_EnvironmentalMonitoring EnvironmentalMonitoring = db.Environmental_EnvironmentalMonitoring.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (EnvironmentalMonitoring != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class UnexpectedEnvironmentalService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取突发环境事件
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="UnexpectedEnvironmental"></param>
|
||||
public static void AddUnexpectedEnvironmental(Model.Environmental_UnexpectedEnvironmental UnexpectedEnvironmental)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_UnexpectedEnvironmental newUnexpectedEnvironmental = new Model.Environmental_UnexpectedEnvironmental
|
||||
{
|
||||
FileId = UnexpectedEnvironmental.FileId,
|
||||
@@ -53,7 +53,7 @@ namespace BLL
|
||||
/// <param name="UnexpectedEnvironmental"></param>
|
||||
public static void UpdateUnexpectedEnvironmental(Model.Environmental_UnexpectedEnvironmental UnexpectedEnvironmental)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_UnexpectedEnvironmental newUnexpectedEnvironmental = db.Environmental_UnexpectedEnvironmental.FirstOrDefault(e => e.FileId == UnexpectedEnvironmental.FileId);
|
||||
if (newUnexpectedEnvironmental != null)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace BLL
|
||||
/// <param name="FileId"></param>
|
||||
public static void DeleteUnexpectedEnvironmentalById(string FileId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Environmental_UnexpectedEnvironmental UnexpectedEnvironmental = db.Environmental_UnexpectedEnvironmental.FirstOrDefault(e => e.FileId == FileId);
|
||||
if (UnexpectedEnvironmental != null)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace BLL
|
||||
/// <param name="material"></param>
|
||||
public static void AddMaterial(Model.Epidemic_Material material)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Epidemic_Material newMaterial = new Epidemic_Material
|
||||
{
|
||||
MaterialId = material.MaterialId,
|
||||
@@ -45,7 +45,7 @@ namespace BLL
|
||||
/// <param name="material"></param>
|
||||
public static void UpdateMaterial(Model.Epidemic_Material material)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Epidemic_Material newMaterial = db.Epidemic_Material.FirstOrDefault(e => e.MaterialId == material.MaterialId);
|
||||
if (newMaterial != null)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <param name="materialId"></param>
|
||||
public static void DeleteMaterialByMaterialId(string materialId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Epidemic_Material delMaterial = db.Epidemic_Material.FirstOrDefault(e => e.MaterialId == materialId);
|
||||
if (delMaterial != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class HSSEMainDutyService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全主体责任
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="hsseMainDuty"></param>
|
||||
public static void AddHSSEMainDuty(Model.HSSESystem_HSSEMainDuty hsseMainDuty)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_HSSEMainDuty newHSSEMainDuty = new Model.HSSESystem_HSSEMainDuty
|
||||
{
|
||||
HSSEMainDutyId = hsseMainDuty.HSSEMainDutyId,
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
/// <param name="hsseMainDuty"></param>
|
||||
public static void UpdateHSSEMainDuty(Model.HSSESystem_HSSEMainDuty hsseMainDuty)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_HSSEMainDuty newHSSEMainDuty = db.HSSESystem_HSSEMainDuty.FirstOrDefault(e => e.HSSEMainDutyId == hsseMainDuty.HSSEMainDutyId);
|
||||
if (newHSSEMainDuty != null)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
/// <param name="hsseMainDutyId"></param>
|
||||
public static void DeleteHSSEMainDuty(string hsseMainDutyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_HSSEMainDuty hsseMainDuty = db.HSSESystem_HSSEMainDuty.FirstOrDefault(e => e.HSSEMainDutyId == hsseMainDutyId);
|
||||
if (hsseMainDuty != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ServerSafetyInstitutionService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全制度
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="SafetyInstitution"></param>
|
||||
public static void AddSafetyInstitution(Model.HSSESystem_SafetyInstitution safetyInstitution)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_SafetyInstitution newSafetyInstitution = new Model.HSSESystem_SafetyInstitution
|
||||
{
|
||||
SafetyInstitutionId = safetyInstitution.SafetyInstitutionId,
|
||||
@@ -45,7 +45,7 @@ namespace BLL
|
||||
/// <param name="safetyInstitution"></param>
|
||||
public static void UpdateSafetyInstitution(Model.HSSESystem_SafetyInstitution safetyInstitution)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_SafetyInstitution newSafetyInstitution = db.HSSESystem_SafetyInstitution.FirstOrDefault(e => e.SafetyInstitutionId == safetyInstitution.SafetyInstitutionId);
|
||||
if (newSafetyInstitution != null)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ namespace BLL
|
||||
/// <param name="safetyInstitutionId"></param>
|
||||
public static void DeleteSafetyInstitutionById(string safetyInstitutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSESystem_SafetyInstitution safetyInstitution = db.HSSESystem_SafetyInstitution.FirstOrDefault(e => e.SafetyInstitutionId == safetyInstitutionId);
|
||||
if (safetyInstitution != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class ConstructionRiskApproveService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 获取风险管控模板列表
|
||||
/// </summary>
|
||||
@@ -37,7 +37,7 @@ namespace BLL
|
||||
/// <param name="ConstructionRiskId">风险管控编号</param>
|
||||
public static void DeleteConstructionRiskApprovesByConstructionRiskId(string ConstructionRiskId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.HSSE_ConstructionRiskApprove where x.ConstructionRiskId == ConstructionRiskId select x).ToList();
|
||||
db.HSSE_ConstructionRiskApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
@@ -50,7 +50,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static IQueryable getList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var res = from x in db.HSSE_ConstructionRiskApprove
|
||||
join ca in db.HSSE_ConstructionRisk on x.ConstructionRiskId equals ca.ConstructionRiskId
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
}
|
||||
public static void See(string ConstructionRiskId, string userId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var res = db.HSSE_ConstructionRiskApprove.FirstOrDefault(x => x.ConstructionRiskId == ConstructionRiskId && x.ApproveType == "S" && x.ApproveMan == userId && x.ApproveDate == null);
|
||||
if (res != null)
|
||||
@@ -105,7 +105,7 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">风险管控审批实体</param>
|
||||
public static void UpdateConstructionRiskApprove(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.First(e => e.ConstructionRiskApproveId == approve.ConstructionRiskApproveId && e.ApproveDate == null);
|
||||
newApprove.ConstructionRiskId = approve.ConstructionRiskId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
@@ -122,7 +122,7 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">风险管控审批实体</param>
|
||||
public static void AddConstructionRiskApprove(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HSSE_ConstructionRiskApprove));
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = new Model.HSSE_ConstructionRiskApprove();
|
||||
newApprove.ConstructionRiskApproveId = newKeyID;
|
||||
@@ -138,7 +138,7 @@ namespace BLL
|
||||
}
|
||||
public static string AddConstructionRiskApproveForApi(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.HSSE_ConstructionRiskApprove));
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = new Model.HSSE_ConstructionRiskApprove();
|
||||
@@ -191,7 +191,7 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.HSSE_ConstructionRiskApprove> GetListDataByCodeForApi(string code)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.HSSE_ConstructionRiskApprove
|
||||
where x.ConstructionRiskId == code && x.ApproveDate != null && x.ApproveType != "S"
|
||||
@@ -225,7 +225,7 @@ namespace BLL
|
||||
}
|
||||
public static Model.HSSE_ConstructionRiskApprove getCurrApproveForApi(string ConstructionRiskId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.FirstOrDefault(e => e.ConstructionRiskId == ConstructionRiskId && e.ApproveType != "S" && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
@@ -237,7 +237,7 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateConstructionRiskApproveForApi(Model.HSSE_ConstructionRiskApprove approve)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.HSSE_ConstructionRiskApprove newApprove = db.HSSE_ConstructionRiskApprove.FirstOrDefault(e => e.ConstructionRiskApproveId == approve.ConstructionRiskApproveId && e.ApproveDate == null);
|
||||
if (newApprove != null)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskCheckService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="hazardList"></param>
|
||||
public static void AddConstructionRiskCheck(Model.HSSE_ConstructionRiskCheck ConstructionRiskCheck)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck newConstructionRiskCheck = new Model.HSSE_ConstructionRiskCheck
|
||||
{
|
||||
ConstructionRiskCheckId = ConstructionRiskCheck.ConstructionRiskCheckId,
|
||||
@@ -46,7 +46,7 @@ namespace BLL
|
||||
/// <param name="hazardList"></param>
|
||||
public static void UpdateConstructionRiskCheck(Model.HSSE_ConstructionRiskCheck hazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck newHazardList = db.HSSE_ConstructionRiskCheck.FirstOrDefault(e => e.ConstructionRiskCheckId == hazardList.ConstructionRiskCheckId);
|
||||
if (newHazardList != null)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ namespace BLL
|
||||
/// <param name="ConstructionRiskCheckId"> </param>
|
||||
public static void DeleteConstructionRiskCheck(string ConstructionRiskCheckId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskCheck hazardList = db.HSSE_ConstructionRiskCheck.FirstOrDefault(e => e.ConstructionRiskCheckId == ConstructionRiskCheckId);
|
||||
if (hazardList != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionRiskListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -30,7 +30,7 @@ namespace BLL
|
||||
/// <param name="hazardList"></param>
|
||||
public static void AddConstructionRisk(Model.HSSE_ConstructionRisk constructionRisk)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRisk newconstructionRisk = new Model.HSSE_ConstructionRisk
|
||||
{
|
||||
ProjectId = constructionRisk.ProjectId,
|
||||
@@ -56,7 +56,7 @@ namespace BLL
|
||||
|
||||
public static void AddConstructionRiskControl(Model.HSSE_ConstructionRiskControl constructionRiskControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskControl newconstructionRisk = new Model.HSSE_ConstructionRiskControl
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace BLL
|
||||
}
|
||||
public static void UpdateConstructionRiskControl(Model.HSSE_ConstructionRiskControl constructionRiskControl)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRiskControl newconstructionRisk = Funs.DB.HSSE_ConstructionRiskControl.FirstOrDefault(x => x.ControlId == constructionRiskControl.ControlId);
|
||||
|
||||
if (newconstructionRisk != null)
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
}
|
||||
public static void AddConstructionRiskControl(List<Model.HSSE_ConstructionRiskControl> constructionRisk, string constructionRiskId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
int i = 1;
|
||||
|
||||
var cons = Funs.DB.HSSE_ConstructionRiskControl.Where(x => x.ConstructionRiskId == constructionRiskId);
|
||||
@@ -122,7 +122,7 @@ namespace BLL
|
||||
/// <param name="hazardList"></param>
|
||||
public static void UpdateConstructionRisk(Model.HSSE_ConstructionRisk hazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRisk newHazardList = db.HSSE_ConstructionRisk.FirstOrDefault(e => e.ConstructionRiskId == hazardList.ConstructionRiskId);
|
||||
if (newHazardList != null)
|
||||
{
|
||||
@@ -153,7 +153,7 @@ namespace BLL
|
||||
/// <param name="constructionRiskId"> </param>
|
||||
public static void DeleteConstructionRisk(string constructionRiskId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_ConstructionRisk hazardList = db.HSSE_ConstructionRisk.FirstOrDefault(e => e.ConstructionRiskId == constructionRiskId);
|
||||
if (hazardList != null)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源明细表id得到明细信息
|
||||
@@ -43,7 +43,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskItem">危险源辨识与评价清单实体</param>
|
||||
public static void AddEnvironmentalRiskItem(Model.Hazard_EnvironmentalRiskItem environmentalRiskItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_EnvironmentalRiskItem newEnvironmentalRiskItem = new Model.Hazard_EnvironmentalRiskItem
|
||||
{
|
||||
EnvironmentalRiskItemId = environmentalRiskItem.EnvironmentalRiskItemId,
|
||||
@@ -105,7 +105,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskItemId">危险源辨识与评价清单Id</param>
|
||||
public static void DeleteEnvironmentalRiskItemById(string environmentalRiskItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_EnvironmentalRiskItem newEnvironmentalRiskItem = db.Hazard_EnvironmentalRiskItem.FirstOrDefault(e => e.EnvironmentalRiskItemId == environmentalRiskItemId);
|
||||
if (newEnvironmentalRiskItem != null)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskItemId">危险源辨识与评价清单Id</param>
|
||||
public static void DeleteEnvironmentalRiskItemByRiskListId(string environmentalRiskListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var newEnvironmentalRiskItem = from x in db.Hazard_EnvironmentalRiskItem where x.EnvironmentalRiskListId == environmentalRiskListId select x;
|
||||
if (newEnvironmentalRiskItem.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_EnvironmentalRiskListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -40,7 +40,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskList">危险源辨识与评价清单实体</param>
|
||||
public static void AddEnvironmentalRiskList(Model.Hazard_EnvironmentalRiskList environmentalRiskList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_EnvironmentalRiskList newEnvironmentalRiskList = new Model.Hazard_EnvironmentalRiskList
|
||||
{
|
||||
EnvironmentalRiskListId = environmentalRiskList.EnvironmentalRiskListId,
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskList">危险源辨识与评价清单实体</param>
|
||||
public static void UpdateEnvironmentalRiskList(Model.Hazard_EnvironmentalRiskList environmentalRiskList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_EnvironmentalRiskList newEnvironmentalRiskList = db.Hazard_EnvironmentalRiskList.FirstOrDefault(e => e.EnvironmentalRiskListId == environmentalRiskList.EnvironmentalRiskListId);
|
||||
if (newEnvironmentalRiskList != null)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
/// <param name="environmentalRiskListId">危险源辨识与评价清单Id</param>
|
||||
public static void DeleteEnvironmentalRiskListById(string environmentalRiskListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_EnvironmentalRiskList newEnvironmentalRiskList = db.Hazard_EnvironmentalRiskList.FirstOrDefault(e => e.EnvironmentalRiskListId == environmentalRiskListId);
|
||||
if (newEnvironmentalRiskList != null)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 要求主键获取危险清单信息
|
||||
@@ -49,7 +49,7 @@ namespace BLL
|
||||
/// <param name="hazardList">危险源辨识与评价清单实体</param>
|
||||
public static void AddHazardList(Model.Hazard_HazardList hazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_HazardList newHazardList = new Model.Hazard_HazardList
|
||||
{
|
||||
HazardListId = hazardList.HazardListId,
|
||||
@@ -77,7 +77,7 @@ namespace BLL
|
||||
/// <param name="hazardList">危险源辨识与评价清单实体</param>
|
||||
public static void UpdateHazardList(Model.Hazard_HazardList hazardList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_HazardList newHazardList = db.Hazard_HazardList.FirstOrDefault(e => e.HazardListId == hazardList.HazardListId);
|
||||
if (newHazardList != null)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ namespace BLL
|
||||
/// <param name="hazardListCode">危险源辨识与评价清单Id</param>
|
||||
public static void DeleteHazardListByHazardListId(string hazardListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_HazardList hazardList = db.Hazard_HazardList.FirstOrDefault(e => e.HazardListId == hazardListId);
|
||||
if (hazardList != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public static class Hazard_HazardSelectedItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险源类别编号查询危险源类别
|
||||
@@ -165,7 +165,7 @@ namespace BLL
|
||||
/// <param name="noticeSign">危险源实体</param>
|
||||
public static void AddHazardSelectedItem(Model.Hazard_HazardSelectedItem hazardSelectedItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_HazardSelectedItem newHazardSelectedItem = new Model.Hazard_HazardSelectedItem
|
||||
{
|
||||
HazardSelectedItemId = hazardSelectedItem.HazardSelectedItemId,
|
||||
@@ -203,7 +203,7 @@ namespace BLL
|
||||
/// <param name="hazardSelectedItem">危险源实体</param>
|
||||
public static void UpdateHazardSelectedItem(Model.Hazard_HazardSelectedItem hazardSelectedItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Hazard_HazardSelectedItem newHazardSelectedItem = db.Hazard_HazardSelectedItem.FirstOrDefault(e => e.HazardSelectedItemId == hazardSelectedItem.HazardSelectedItemId);
|
||||
if (newHazardSelectedItem != null)
|
||||
{
|
||||
@@ -242,7 +242,7 @@ namespace BLL
|
||||
/// <param name="hazardListCode">危险源类别主键</param>
|
||||
public static void DeleteHazardSelectedItemByHazardListId(string hazardListId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Hazard_HazardSelectedItem where x.HazardListId == hazardListId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class HSSE_Hazard_HazardRegisterService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据危险观察登记主键获取危险观察登记信息
|
||||
@@ -40,7 +40,7 @@ namespace BLL
|
||||
/// <param name="model">危险观察登记实体</param>
|
||||
public static void AddHazardRegister(Model.HSSE_Hazard_HazardRegister model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister newModel = new Model.HSSE_Hazard_HazardRegister();
|
||||
newModel.HazardRegisterId = model.HazardRegisterId;
|
||||
newModel.HazardCode = model.HazardCode;
|
||||
@@ -87,7 +87,7 @@ namespace BLL
|
||||
/// <param name="model">危险观察登记实体</param>
|
||||
public static void UpdateHazardRegister(Model.HSSE_Hazard_HazardRegister model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister newModel = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == model.HazardRegisterId);
|
||||
if (newModel != null)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ namespace BLL
|
||||
/// <param name="hazardRegisterId">危险观察登记主键</param>
|
||||
public static void DeleteHazardRegisterByHazardRegisterId(string hazardRegisterId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.HSSE_Hazard_HazardRegister model = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId);
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentInItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具入场报批明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="equipmentInItem"></param>
|
||||
public static void AddEquipmentInItem(Model.InApproveManager_EquipmentInItem equipmentInItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentInItem newEquipmentItem = new Model.InApproveManager_EquipmentInItem
|
||||
{
|
||||
EquipmentInItemId = equipmentInItem.EquipmentInItemId,
|
||||
@@ -65,7 +65,7 @@ namespace BLL
|
||||
/// <param name="equipmentInItem"></param>
|
||||
public static void UpdateEquipmentInItem(Model.InApproveManager_EquipmentInItem equipmentInItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentInItem newEquipmentItem = db.InApproveManager_EquipmentInItem.FirstOrDefault(e => e.EquipmentInItemId == equipmentInItem.EquipmentInItemId);
|
||||
if (newEquipmentItem != null)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
/// <param name="equipmentInItemId"></param>
|
||||
public static void DeleteEquipmentInItemById(string equipmentInItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentInItem equipmenetInItem = db.InApproveManager_EquipmentInItem.FirstOrDefault(e => e.EquipmentInItemId == equipmentInItemId);
|
||||
if (equipmenetInItem != null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace BLL
|
||||
/// <param name="equipmentInId"></param>
|
||||
public static void DeleteEquipmentInItemByEquipmentInId(string equipmentInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in Funs.DB.InApproveManager_EquipmentInItem where x.EquipmentInId == equipmentInId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentInService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具入场报批
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="equipmentIn"></param>
|
||||
public static void AddEquipmentIn(Model.InApproveManager_EquipmentIn equipmentIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentIn newEquipmenteIn = new Model.InApproveManager_EquipmentIn
|
||||
{
|
||||
EquipmentInId = equipmentIn.EquipmentInId,
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
/// <param name="equipmentIn"></param>
|
||||
public static void UpdateEquipmentIn(Model.InApproveManager_EquipmentIn equipmentIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentIn newEquipmenteIn = db.InApproveManager_EquipmentIn.FirstOrDefault(e => e.EquipmentInId == equipmentIn.EquipmentInId);
|
||||
if (newEquipmenteIn != null)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ namespace BLL
|
||||
/// <param name="equipmentInId"></param>
|
||||
public static void DeleteEquipmentInById(string equipmentInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentIn equipmentIn = db.InApproveManager_EquipmentIn.FirstOrDefault(e => e.EquipmentInId == equipmentInId);
|
||||
if (equipmentIn != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentOutItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具出场报批明细
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="equipmentOutItem"></param>
|
||||
public static void AddEquipmentOutItem(Model.InApproveManager_EquipmentOutItem equipmentOutItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOutItem newEquipmentOutItem = new Model.InApproveManager_EquipmentOutItem
|
||||
{
|
||||
EquipmentOutItemId = equipmentOutItem.EquipmentOutItemId,
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <param name="equipmentItemOut"></param>
|
||||
public static void UpdateEquipmentItemOut(Model.InApproveManager_EquipmentOutItem equipmentOutItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOutItem newEquipmentOutItem = db.InApproveManager_EquipmentOutItem.FirstOrDefault(e => e.EquipmentOutItemId == equipmentOutItem.EquipmentOutItemId);
|
||||
if (newEquipmentOutItem != null)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace BLL
|
||||
/// <param name="equipmentItemOutId"></param>
|
||||
public static void DeleteEquipmentOutItemById(string equipmentOutItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOutItem equipmentOutItem = db.InApproveManager_EquipmentOutItem.FirstOrDefault(e => e.EquipmentOutItemId == equipmentOutItemId);
|
||||
if (equipmentOutItem != null)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ namespace BLL
|
||||
/// <param name="equipmentOutId"></param>
|
||||
public static void DeleteEquipmentOutItemByEqupmentOutId(string equipmentOutId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InApproveManager_EquipmentOutItem where x.EquipmentOutId == equipmentOutId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentOutService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备机具出场报批
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="equipmentOut"></param>
|
||||
public static void AddEquipmentOut(Model.InApproveManager_EquipmentOut equipmentOut)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOut newEquipmentOut = new Model.InApproveManager_EquipmentOut
|
||||
{
|
||||
EquipmentOutId = equipmentOut.EquipmentOutId,
|
||||
@@ -57,7 +57,7 @@ namespace BLL
|
||||
/// <param name="equipmentOut"></param>
|
||||
public static void UpdateEquipmentOut(Model.InApproveManager_EquipmentOut equipmentOut)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOut newEquipmentOut = db.InApproveManager_EquipmentOut.FirstOrDefault(e => e.EquipmentOutId == equipmentOut.EquipmentOutId);
|
||||
if (newEquipmentOut != null)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ namespace BLL
|
||||
/// <param name="equipmentOutId"></param>
|
||||
public static void DeleteEquipmentOutById(string equipmentOutId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentOut equipmentOut = db.InApproveManager_EquipmentOut.FirstOrDefault(e => e.EquipmentOutId == equipmentOutId);
|
||||
if (equipmentOut != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentQualityInItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主表ID获取明细信息
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EquipmentQualityInItem"></param>
|
||||
public static void AddEquipmentQualityInItem(Model.InApproveManager_EquipmentQualityInItem EquipmentQualityInItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentQualityInItem newEquipmentQualityInItem = new Model.InApproveManager_EquipmentQualityInItem
|
||||
{
|
||||
EquipmentQualityInItemId = EquipmentQualityInItem.EquipmentQualityInItemId,
|
||||
@@ -64,7 +64,7 @@ namespace BLL
|
||||
/// <param name="EquipmentQualityInId"></param>
|
||||
public static void DeleteEquipmentQualityInItemByEquipmentQualityInId(string EquipmentQualityInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InApproveManager_EquipmentQualityInItem where x.EquipmentQualityInId == EquipmentQualityInId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class EquipmentQualityInService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取特种设备审批
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="EquipmentQualityIn"></param>
|
||||
public static void AddEquipmentQualityIn(Model.InApproveManager_EquipmentQualityIn EquipmentQualityIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentQualityIn newEquipmentQualityIn = new Model.InApproveManager_EquipmentQualityIn
|
||||
{
|
||||
EquipmentQualityInId = EquipmentQualityIn.EquipmentQualityInId,
|
||||
@@ -52,7 +52,7 @@ namespace BLL
|
||||
/// <param name="EquipmentQualityIn"></param>
|
||||
public static void UpdateEquipmentQualityIn(Model.InApproveManager_EquipmentQualityIn EquipmentQualityIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentQualityIn newEquipmentQualityIn = db.InApproveManager_EquipmentQualityIn.FirstOrDefault(e => e.EquipmentQualityInId == EquipmentQualityIn.EquipmentQualityInId);
|
||||
if (newEquipmentQualityIn != null)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
/// <param name="EquipmentQualityInId"></param>
|
||||
public static void DeleteEquipmentQualityInById(string EquipmentQualityInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_EquipmentQualityIn EquipmentQualityIn = db.InApproveManager_EquipmentQualityIn.FirstOrDefault(e => e.EquipmentQualityInId == EquipmentQualityInId);
|
||||
if (EquipmentQualityIn != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentInItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具入场报批明细信息
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="GeneralEquipmentInItem"></param>
|
||||
public static void AddGeneralEquipmentInItem(Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentInItem newEquipmentItem = new Model.InApproveManager_GeneralEquipmentInItem
|
||||
{
|
||||
GeneralEquipmentInItemId = generalEquipmentInItem.GeneralEquipmentInItemId,
|
||||
@@ -57,7 +57,7 @@ namespace BLL
|
||||
/// <param name="GeneralEquipmentInItem"></param>
|
||||
public static void UpdateGeneralEquipmentInItem(Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentInItem newGeneralEquipmentInItem = db.InApproveManager_GeneralEquipmentInItem.FirstOrDefault(e => e.GeneralEquipmentInItemId == generalEquipmentInItem.GeneralEquipmentInItemId);
|
||||
if (newGeneralEquipmentInItem != null)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ namespace BLL
|
||||
/// <param name="GeneralEquipmentInItemId"></param>
|
||||
public static void DeleteGeneralEquipmentInItemById(string generalEquipmentInItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentInItem generalEquipmentInItem = db.InApproveManager_GeneralEquipmentInItem.FirstOrDefault(e => e.GeneralEquipmentInItemId == generalEquipmentInItemId);
|
||||
if (generalEquipmentInItem != null)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
/// <param name="equipmentInId"></param>
|
||||
public static void DeleteGeneralEquipmentInItemByEquipmentInId(string generalEquipmentInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in Funs.DB.InApproveManager_GeneralEquipmentInItem where x.GeneralEquipmentInId == generalEquipmentInId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentInService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具入场报批
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="GeneralGeneralEquipmentIn"></param>
|
||||
public static void AddGeneralEquipmentIn(Model.InApproveManager_GeneralEquipmentIn generalEquipmentIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentIn newGeneralEquipmentIn = new Model.InApproveManager_GeneralEquipmentIn
|
||||
{
|
||||
GeneralEquipmentInId = generalEquipmentIn.GeneralEquipmentInId,
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
/// <param name="GeneralGeneralEquipmentIn"></param>
|
||||
public static void UpdateGeneralEquipmentIn(Model.InApproveManager_GeneralEquipmentIn generalEquipmentIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentIn newGeneralEquipmentIn = db.InApproveManager_GeneralEquipmentIn.FirstOrDefault(e => e.GeneralEquipmentInId == generalEquipmentIn.GeneralEquipmentInId);
|
||||
if (newGeneralEquipmentIn != null)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ namespace BLL
|
||||
/// <param name="GeneralEquipmentInId"></param>
|
||||
public static void DeleteGeneralEquipmentInById(string generalEquipmentInId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentIn generalEquipmentIn = db.InApproveManager_GeneralEquipmentIn.FirstOrDefault(e => e.GeneralEquipmentInId == generalEquipmentInId);
|
||||
if (generalEquipmentIn != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentOutItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具出场报批
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOutItem"></param>
|
||||
public static void AddGeneralEquipmentOutItem(Model.InApproveManager_GeneralEquipmentOutItem generalEquipmentOutItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOutItem newGeneralEquipmentOutItem = new Model.InApproveManager_GeneralEquipmentOutItem
|
||||
{
|
||||
GeneralEquipmentOutItemId = generalEquipmentOutItem.GeneralEquipmentOutItemId,
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOutItem"></param>
|
||||
public static void UpdateGeneralEquipmentOutItem(Model.InApproveManager_GeneralEquipmentOutItem generalEquipmentOutItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOutItem newGeneralEquipmentOutItem = db.InApproveManager_GeneralEquipmentOutItem.FirstOrDefault(e => e.GeneralEquipmentOutItemId == generalEquipmentOutItem.GeneralEquipmentOutItemId);
|
||||
if (newGeneralEquipmentOutItem != null)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOutItemId"></param>
|
||||
public static void DeleteGeneralEquipmentOutItemById(string generalEquipmentOutItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOutItem generalEquipmentOutItem = db.InApproveManager_GeneralEquipmentOutItem.FirstOrDefault(e => e.GeneralEquipmentOutItemId == generalEquipmentOutItemId);
|
||||
if (generalEquipmentOutItem != null)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOutId"></param>
|
||||
public static void DeleteGeneralEquipmentOutItemByGeneralEquipmentOutId(string generalEquipmentOutId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InApproveManager_GeneralEquipmentOutItem where x.GeneralEquipmentOutId == generalEquipmentOutId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class GeneralEquipmentOutService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取一般设备机具出场报批
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOut"></param>
|
||||
public static void AddGeneralEquipmentOut(Model.InApproveManager_GeneralEquipmentOut generalEquipmentOut)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOut newGeneralEquipmentOut = new Model.InApproveManager_GeneralEquipmentOut
|
||||
{
|
||||
GeneralEquipmentOutId = generalEquipmentOut.GeneralEquipmentOutId,
|
||||
@@ -58,7 +58,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOut"></param>
|
||||
public static void UpdateGeneralEquipmentOut(Model.InApproveManager_GeneralEquipmentOut generalEquipmentOut)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOut newGeneralEquipmentOut = db.InApproveManager_GeneralEquipmentOut.FirstOrDefault(e => e.GeneralEquipmentOutId == generalEquipmentOut.GeneralEquipmentOutId);
|
||||
if (newGeneralEquipmentOut != null)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace BLL
|
||||
/// <param name="generalEquipmentOutId"></param>
|
||||
public static void DeleteGeneralEquipmentOutById(string generalEquipmentOutId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InApproveManager_GeneralEquipmentOut generalEquipmentOut = db.InApproveManager_GeneralEquipmentOut.FirstOrDefault(e => e.GeneralEquipmentOutId == generalEquipmentOutId);
|
||||
if (generalEquipmentOut != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionStandardIdentifyService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据标准规范辨识主键获取一个标准规范辨识信息
|
||||
@@ -34,7 +34,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentify">标准规范辨识实体</param>
|
||||
public static void AddConstructionStandardIdentify(Model.InformationProject_ConstructionStandardIdentify constructionStandardIdentify)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_ConstructionStandardIdentify newConstructionStandardIdentify = new Model.InformationProject_ConstructionStandardIdentify
|
||||
{
|
||||
ConstructionStandardIdentifyId = constructionStandardIdentify.ConstructionStandardIdentifyId,
|
||||
@@ -58,7 +58,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentify">标准规范辨识实体</param>
|
||||
public static void UpdateConstructionStandardIdentify(Model.InformationProject_ConstructionStandardIdentify constructionStandardIdentify)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_ConstructionStandardIdentify newConstructionStandardIdentify = db.InformationProject_ConstructionStandardIdentify.FirstOrDefault(e => e.ConstructionStandardIdentifyId == constructionStandardIdentify.ConstructionStandardIdentifyId);
|
||||
if (newConstructionStandardIdentify != null)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <param name="constructionStandardIdentifyId">标准规范辨识主键</param>
|
||||
public static void DeleteConstructionStandardIdentifyById(string constructionStandardIdentifyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_ConstructionStandardIdentify constructionStandardIdentify = db.InformationProject_ConstructionStandardIdentify.FirstOrDefault(e => e.ConstructionStandardIdentifyId == constructionStandardIdentifyId);
|
||||
if (constructionStandardIdentify != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public static class ConstructionStandardSelectedItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据标准规范辨识Id获取对应所有标准规范项信息
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationSelectedItem">标准规范项实体</param>
|
||||
public static void AddConstructionStandardSelectedItem(Model.InformationProject_ConstructionStandardSelectedItem constructionStandardSelectedItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.InformationProject_ConstructionStandardSelectedItem));
|
||||
Model.InformationProject_ConstructionStandardSelectedItem newLawRegulationSelectedItem = new Model.InformationProject_ConstructionStandardSelectedItem
|
||||
{
|
||||
@@ -43,7 +43,7 @@ namespace BLL
|
||||
/// <param name="constructionStandardIdentifyId">标准规范辨识主键</param>
|
||||
public static void DeleteConstructionStandardSelectedItemByConstructionStandardIdentifyId(string constructionStandardIdentifyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InformationProject_ConstructionStandardSelectedItem where x.ConstructionStandardIdentifyId == constructionStandardIdentifyId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
|
||||
public static void AddLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationIdentify newLawRegulationIdentify = new Model.Law_LawRegulationIdentify
|
||||
{
|
||||
LawRegulationIdentifyId = lawRegulationIdentify.LawRegulationIdentifyId,
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
|
||||
public static void UpdateLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
|
||||
if (newLawRegulationIdentify != null)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentifyCode">法律法规辨识编号</param>
|
||||
public static void DeleteLawRegulationIdentify(string lawRegulationIdentifyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationIdentify lawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentifyId);
|
||||
if (lawRegulationIdentify != null)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationSelectedItem">法律法规项实体</param>
|
||||
public static void AddLawRegulationSelectedItem(Model.Law_LawRegulationSelectedItem lawRegulationSelectedItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Law_LawRegulationSelectedItem));
|
||||
Model.Law_LawRegulationSelectedItem newLawRegulationSelectedItem = new Model.Law_LawRegulationSelectedItem
|
||||
{
|
||||
@@ -46,7 +46,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationIdentifyCode">法律法规辨识主键</param>
|
||||
public static void DeleteLawRegulationSelectedItemByLawRegulationIdentifyId(string lawRegulationIdentifyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.Law_LawRegulationSelectedItem where x.LawRegulationIdentifyId == lawRegulationIdentifyId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectAccidentCauseReportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表明细表
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReportItem">职工伤亡事故原因分析报表明细表实体</param>
|
||||
public static void AddAccidentCauseReportItem(Model.InformationProject_AccidentCauseReportItem AccidentCauseReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_AccidentCauseReportItem newAccidentCauseReportItem = new Model.InformationProject_AccidentCauseReportItem
|
||||
{
|
||||
AccidentCauseReportItemId = AccidentCauseReportItem.AccidentCauseReportItemId,
|
||||
@@ -82,7 +82,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReportItem">职工伤亡事故原因分析报表明细表实体</param>
|
||||
public static void UpdateAccidentCauseReportItem(Model.InformationProject_AccidentCauseReportItem AccidentCauseReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_AccidentCauseReportItem newAccidentCauseReportItem = db.InformationProject_AccidentCauseReportItem.FirstOrDefault(e => e.AccidentCauseReportItemId == AccidentCauseReportItem.AccidentCauseReportItemId);
|
||||
newAccidentCauseReportItem.AccidentType = AccidentCauseReportItem.AccidentType;
|
||||
newAccidentCauseReportItem.TotalDeath = AccidentCauseReportItem.TotalDeath;
|
||||
@@ -131,7 +131,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReportItemId"></param>
|
||||
public static void DeleteAccidentCauseReportItemByAccidentCauseReportId(string AccidentCauseReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = from x in db.InformationProject_AccidentCauseReportItem where x.AccidentCauseReportId == AccidentCauseReportId select x;
|
||||
if (q != null)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ namespace BLL
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.InformationProject_AccidentCauseReportItem> GetItemsNoSum(string AccidentCauseReportId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.InformationProject_AccidentCauseReportItem
|
||||
join y in db.Sys_Const on x.AccidentType equals y.ConstText
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectAccidentCauseReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 职工伤亡事故原因分析报表
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReport">职工伤亡事故原因分析报表实体</param>
|
||||
public static void AddAccidentCauseReport(Model.InformationProject_AccidentCauseReport AccidentCauseReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_AccidentCauseReport newAccidentCauseReport = new Model.InformationProject_AccidentCauseReport
|
||||
{
|
||||
AccidentCauseReportId = AccidentCauseReport.AccidentCauseReportId,
|
||||
@@ -68,7 +68,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReport">职工伤亡事故原因分析报表实体</param>
|
||||
public static void UpdateAccidentCauseReport(Model.InformationProject_AccidentCauseReport AccidentCauseReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_AccidentCauseReport newAccidentCauseReport = db.InformationProject_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReport.AccidentCauseReportId);
|
||||
if (newAccidentCauseReport != null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace BLL
|
||||
/// <param name="AccidentCauseReportId"></param>
|
||||
public static void DeleteAccidentCauseReportById(string AccidentCauseReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_AccidentCauseReport newAccidentCauseReport = db.InformationProject_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReportId);
|
||||
if (newAccidentCauseReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillConductedQuarterlyReportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练开展情况季报表明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReportItem"></param>
|
||||
public static void AddDrillConductedQuarterlyReportItem(Model.InformationProject_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReportItem newDrillConductedQuarterlyReportItem = new Model.InformationProject_DrillConductedQuarterlyReportItem
|
||||
{
|
||||
DrillConductedQuarterlyReportItemId = drillConductedQuarterlyReportItem.DrillConductedQuarterlyReportItemId,
|
||||
@@ -71,7 +71,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReportItem"></param>
|
||||
public static void UpdateDrillConductedQuarterlyReportItem(Model.InformationProject_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReportItem newDrillConductedQuarterlyReportItem = db.InformationProject_DrillConductedQuarterlyReportItem.FirstOrDefault(e => e.DrillConductedQuarterlyReportItemId == drillConductedQuarterlyReportItem.DrillConductedQuarterlyReportItemId);
|
||||
if (newDrillConductedQuarterlyReportItem != null)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReportItemId"></param>
|
||||
public static void DeleteDrillConductedQuarterlyReportItemById(string drillConductedQuarterlyReportItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem = db.InformationProject_DrillConductedQuarterlyReportItem.FirstOrDefault(e => e.DrillConductedQuarterlyReportItemId == drillConductedQuarterlyReportItemId);
|
||||
if (drillConductedQuarterlyReportItem != null)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReportId"></param>
|
||||
public static void DeleteDrillConductedQuarterlyReportItemList(string drillConductedQuarterlyReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InformationProject_DrillConductedQuarterlyReportItem where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillConductedQuarterlyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练开展情况季报表
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReport"></param>
|
||||
public static void AddDrillConductedQuarterlyReport(Model.InformationProject_DrillConductedQuarterlyReport drillConductedQuarterlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReport newDrillConductedQuarterlyReport = new Model.InformationProject_DrillConductedQuarterlyReport
|
||||
{
|
||||
DrillConductedQuarterlyReportId = drillConductedQuarterlyReport.DrillConductedQuarterlyReportId,
|
||||
@@ -50,7 +50,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReport"></param>
|
||||
public static void UpdateDrillConductedQuarterlyReport(Model.InformationProject_DrillConductedQuarterlyReport drillConductedQuarterlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReport newDrillConductedQuarterlyReport = db.InformationProject_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == drillConductedQuarterlyReport.DrillConductedQuarterlyReportId);
|
||||
if (newDrillConductedQuarterlyReport != null)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ namespace BLL
|
||||
/// <param name="drillConductedQuarterlyReportId"></param>
|
||||
public static void DeleteDrillConductedQuarterlyReportById(string drillConductedQuarterlyReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillConductedQuarterlyReport drillConductedQuarterlyReport = db.InformationProject_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId);
|
||||
if (drillConductedQuarterlyReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillPlanHalfYearReportItemService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练工作计划半年报明细信息
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReportItem"></param>
|
||||
public static void AddDrillPlanHalfYearReportItem(Model.InformationProject_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReportItem newDrillPlanHalfYearReportItem = new Model.InformationProject_DrillPlanHalfYearReportItem
|
||||
{
|
||||
DrillPlanHalfYearReportItemId = drillPlanHalfYearReportItem.DrillPlanHalfYearReportItemId,
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReportItem"></param>
|
||||
public static void UpdateDrillPlanHalfYearReportItem(Model.InformationProject_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReportItem newDrillPlanHalfYearReportItem = db.InformationProject_DrillPlanHalfYearReportItem.FirstOrDefault(e => e.DrillPlanHalfYearReportItemId == drillPlanHalfYearReportItem.DrillPlanHalfYearReportItemId);
|
||||
if (newDrillPlanHalfYearReportItem != null)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReportItemId"></param>
|
||||
public static void DeleteDrillPlanHalfYearReportItemById(string drillPlanHalfYearReportItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem = db.InformationProject_DrillPlanHalfYearReportItem.FirstOrDefault(e => e.DrillPlanHalfYearReportItemId == drillPlanHalfYearReportItemId);
|
||||
if (drillPlanHalfYearReportItem != null)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReportId"></param>
|
||||
public static void DeleteDrillPlanHalfYearReportItemList(string drillPlanHalfYearReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.InformationProject_DrillPlanHalfYearReportItem where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectDrillPlanHalfYearReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取应急演练工作计划半年报
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReport"></param>
|
||||
public static void AddDrillPlanHalfYearReport(Model.InformationProject_DrillPlanHalfYearReport drillPlanHalfYearReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReport newDrillPlanHalfYearReport = new Model.InformationProject_DrillPlanHalfYearReport
|
||||
{
|
||||
DrillPlanHalfYearReportId = drillPlanHalfYearReport.DrillPlanHalfYearReportId,
|
||||
@@ -51,7 +51,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReport"></param>
|
||||
public static void UpdateDrillPlanHalfYearReport(Model.InformationProject_DrillPlanHalfYearReport drillPlanHalfYearReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReport newDrillPlanHalfYearReport = db.InformationProject_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == drillPlanHalfYearReport.DrillPlanHalfYearReportId);
|
||||
if (newDrillPlanHalfYearReport != null)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ namespace BLL
|
||||
/// <param name="drillPlanHalfYearReportId"></param>
|
||||
public static void DeleteDrillPlanHalfYearReportById(string drillPlanHalfYearReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_DrillPlanHalfYearReport drillPlanHalfYearReport = db.InformationProject_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == drillPlanHalfYearReportId);
|
||||
if (drillPlanHalfYearReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectMillionsMonthlyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取企业安全数据统计月报
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="millionsMonthlyReport"></param>
|
||||
public static void AddMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_MillionsMonthlyReport newMillionsMonthlyReport = new Model.InformationProject_MillionsMonthlyReport
|
||||
{
|
||||
MillionsMonthlyReportId = millionsMonthlyReport.MillionsMonthlyReportId,
|
||||
@@ -98,7 +98,7 @@ namespace BLL
|
||||
/// <param name="millionsMonthlyReport"></param>
|
||||
public static void UpdateMillionsMonthlyReport(Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_MillionsMonthlyReport newMillionsMonthlyReport = db.InformationProject_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == millionsMonthlyReport.MillionsMonthlyReportId);
|
||||
if (newMillionsMonthlyReport != null)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace BLL
|
||||
/// <param name="millionsMonthlyReportId"></param>
|
||||
public static void DeleteMillionsMonthlyReportById(string millionsMonthlyReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport = db.InformationProject_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == millionsMonthlyReportId);
|
||||
if (millionsMonthlyReport != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ProjectSafetyQuarterlyReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全生产数据季报
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="safetyQuarterlyReport"></param>
|
||||
public static void AddSafetyQuarterlyReport(Model.InformationProject_SafetyQuarterlyReport safetyQuarterlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_SafetyQuarterlyReport newSafetyQuarterlyReport = new Model.InformationProject_SafetyQuarterlyReport
|
||||
{
|
||||
SafetyQuarterlyReportId = safetyQuarterlyReport.SafetyQuarterlyReportId,
|
||||
@@ -124,7 +124,7 @@ namespace BLL
|
||||
/// <param name="safetyQuarterlyReport"></param>
|
||||
public static void UpdateSafetyQuarterlyReport(Model.InformationProject_SafetyQuarterlyReport safetyQuarterlyReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_SafetyQuarterlyReport newSafetyQuarterlyReport = db.InformationProject_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == safetyQuarterlyReport.SafetyQuarterlyReportId);
|
||||
if (newSafetyQuarterlyReport != null)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ namespace BLL
|
||||
/// <param name="safetyQuarterlyReportId"></param>
|
||||
public static void DeleteSafetyQuarterlyReportById(string safetyQuarterlyReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.InformationProject_SafetyQuarterlyReport safetyQuarterlyReport = db.InformationProject_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == safetyQuarterlyReportId);
|
||||
if (safetyQuarterlyReport != null)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace BLL
|
||||
{
|
||||
public class HSSEStandardsListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据id查询标准规范信息
|
||||
@@ -129,7 +129,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationList"></param>
|
||||
public static void UpdateHSSEStandardsListIsPass(Model.Law_HSSEStandardsList standardsList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_HSSEStandardsList newHSSEStandardsList = db.Law_HSSEStandardsList.FirstOrDefault(e => e.StandardId == standardsList.StandardId);
|
||||
if (newHSSEStandardsList != null)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ namespace BLL
|
||||
/// <param name="EDU_ID"></param>
|
||||
public static void DeleteHSSEStandardsList(string standardId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_HSSEStandardsList hSSEStandardsList = db.Law_HSSEStandardsList.FirstOrDefault(e => e.StandardId == standardId);
|
||||
if (hSSEStandardsList != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LawRegulationListService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取法律法规
|
||||
@@ -48,7 +48,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationList"></param>
|
||||
public static void AddLawRegulationList(Model.Law_LawRegulationList lawRegulationList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationList newLawRegulationList = new Model.Law_LawRegulationList
|
||||
{
|
||||
LawRegulationId = lawRegulationList.LawRegulationId,
|
||||
@@ -76,7 +76,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationList"></param>
|
||||
public static void UpdateLawRegulationList(Model.Law_LawRegulationList lawRegulationList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationList newLawRegulationList = db.Law_LawRegulationList.FirstOrDefault(e => e.LawRegulationId == lawRegulationList.LawRegulationId);
|
||||
if (newLawRegulationList != null)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationList"></param>
|
||||
public static void UpdateLawRegulationListIsPass(Model.Law_LawRegulationList lawRegulationList)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationList newLawRegulationList = db.Law_LawRegulationList.FirstOrDefault(e => e.LawRegulationId == lawRegulationList.LawRegulationId);
|
||||
if (newLawRegulationList != null)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteLawRegulationListById(string lawRegulationId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_LawRegulationList lawRegulationList = db.Law_LawRegulationList.FirstOrDefault(e => e.LawRegulationId == lawRegulationId);
|
||||
if (lawRegulationList!=null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class ManageRuleService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取管理规定
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="manageRule"></param>
|
||||
public static void AddManageRule(Model.Law_ManageRule manageRule)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_ManageRule newManageRule = new Model.Law_ManageRule
|
||||
{
|
||||
ManageRuleId = manageRule.ManageRuleId,
|
||||
@@ -65,7 +65,7 @@ namespace BLL
|
||||
/// <param name="manageRule"></param>
|
||||
public static void UpdateManageRule(Model.Law_ManageRule manageRule)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_ManageRule newManageRule = db.Law_ManageRule.FirstOrDefault(e => e.ManageRuleId == manageRule.ManageRuleId);
|
||||
if (newManageRule != null)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace BLL
|
||||
/// <param name="manageRule"></param>
|
||||
public static void UpdateManageRuleIsPass(Model.Law_ManageRule manageRule)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_ManageRule newManageRule = db.Law_ManageRule.FirstOrDefault(e => e.ManageRuleId == manageRule.ManageRuleId);
|
||||
if (newManageRule!=null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace BLL
|
||||
/// <param name="manageRuleId"></param>
|
||||
public static void DeleteManageRuleById(string manageRuleId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_ManageRule manageRule = db.Law_ManageRule.FirstOrDefault(e => e.ManageRuleId == manageRuleId);
|
||||
if (manageRule != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class RulesRegulationsService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取生产规章制度
|
||||
@@ -38,7 +38,7 @@ namespace BLL
|
||||
/// <param name="rulesRegulations"></param>
|
||||
public static void AddRulesRegulations(Model.Law_RulesRegulations rulesRegulations)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_RulesRegulations newRuleRegulations = new Model.Law_RulesRegulations
|
||||
{
|
||||
RulesRegulationsId = rulesRegulations.RulesRegulationsId,
|
||||
@@ -65,7 +65,7 @@ namespace BLL
|
||||
/// <param name="rulesRegulations"></param>
|
||||
public static void UpdateRulesRegulations(Model.Law_RulesRegulations rulesRegulations)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_RulesRegulations newRuleRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == rulesRegulations.RulesRegulationsId);
|
||||
if (newRuleRegulations != null)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ namespace BLL
|
||||
/// <param name="rulesRegulations"></param>
|
||||
public static void UpdateRulesRegulationsIsPass(Model.Law_RulesRegulations rulesRegulations)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_RulesRegulations newRuleRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == rulesRegulations.RulesRegulationsId);
|
||||
if (newRuleRegulations != null)
|
||||
{
|
||||
@@ -104,7 +104,7 @@ namespace BLL
|
||||
/// <param name="ruleRegulationsId"></param>
|
||||
public static void DeleteRuleRegulationsById(string ruleRegulationsId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Law_RulesRegulations rulesRegulations = db.Law_RulesRegulations.FirstOrDefault(e => e.RulesRegulationsId == ruleRegulationsId);
|
||||
if (rulesRegulations != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class HSETechnicalService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全技术交底
|
||||
@@ -28,7 +28,7 @@ namespace BLL
|
||||
/// <param name="hseTechnical"></param>
|
||||
public static void AddHSETechnical(Model.License_HSETechnical hseTechnical)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HSETechnical newHSETechnical = new Model.License_HSETechnical
|
||||
{
|
||||
HSETechnicalId = hseTechnical.HSETechnicalId,
|
||||
@@ -58,7 +58,7 @@ namespace BLL
|
||||
/// <param name="hSETechnical"></param>
|
||||
public static void UpdateHSETechnical(Model.License_HSETechnical hseTechnical)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HSETechnical newHSETechnical = db.License_HSETechnical.FirstOrDefault(e => e.HSETechnicalId == hseTechnical.HSETechnicalId);
|
||||
if (newHSETechnical != null)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace BLL
|
||||
/// <param name="hseTechnicalId"></param>
|
||||
public static void DeleteHSETechnicalById(string hseTechnicalId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HSETechnical hseTechnical = db.License_HSETechnical.FirstOrDefault(e => e.HSETechnicalId == hseTechnicalId);
|
||||
if (hseTechnical != null)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LicenseManagerService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取安全许可证
|
||||
@@ -40,7 +40,7 @@ namespace BLL
|
||||
/// <param name="licenseManager"></param>
|
||||
public static void AddLicenseManager(Model.License_LicenseManager licenseManager)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseManager newLicenseManager = new Model.License_LicenseManager
|
||||
{
|
||||
LicenseManagerId = licenseManager.LicenseManagerId,
|
||||
@@ -73,7 +73,7 @@ namespace BLL
|
||||
/// <param name="licenseManager"></param>
|
||||
public static void UpdateLicenseManager(Model.License_LicenseManager licenseManager)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseManager newLicenseManager = db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == licenseManager.LicenseManagerId);
|
||||
if (newLicenseManager != null)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace BLL
|
||||
/// <param name="licenseManagerId"></param>
|
||||
public static void DeleteLicenseManagerById(string licenseManagerId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseManager licenseManager = db.License_LicenseManager.FirstOrDefault(e => e.LicenseManagerId == licenseManagerId);
|
||||
if (licenseManager != null)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class LicensePublicService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 状态下拉框
|
||||
/// </summary>
|
||||
@@ -55,7 +55,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void AddFireWork(Model.License_FireWork fireWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FireWork newFireWork = new Model.License_FireWork
|
||||
{
|
||||
FireWorkId = fireWork.FireWorkId,
|
||||
@@ -91,7 +91,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void UpdateFireWork(Model.License_FireWork fireWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FireWork newFireWork = db.License_FireWork.FirstOrDefault(e => e.FireWorkId == fireWork.FireWorkId);
|
||||
if (newFireWork != null)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ namespace BLL
|
||||
/// <param name="fireWorkId"></param>
|
||||
public static void DeleteFireWorkById(string fireWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FireWork fireWork = db.License_FireWork.FirstOrDefault(e => e.FireWorkId == fireWorkId);
|
||||
if (fireWork != null)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void AddApply(Model.License_Apply fireWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_Apply newFireWork = new Model.License_Apply
|
||||
{
|
||||
LicenseApplyId = fireWork.LicenseApplyId,
|
||||
@@ -175,7 +175,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void UpdateApply(Model.License_Apply fireWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_Apply newFireWork = db.License_Apply.FirstOrDefault(e => e.LicenseApplyId == fireWork.LicenseApplyId);
|
||||
if (newFireWork != null)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ namespace BLL
|
||||
/// <param name="fireWorkId"></param>
|
||||
public static void DeleteApplyById(string licenseApplyId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_Apply fireWork = db.License_Apply.FirstOrDefault(e => e.LicenseApplyId == licenseApplyId);
|
||||
if (fireWork!=null)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ namespace BLL
|
||||
/// <param name="jiaBan"></param>
|
||||
public static void AddJiaBan(Model.License_JiaBan jiaBan)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_JiaBan newJiaBan = new Model.License_JiaBan
|
||||
{
|
||||
JiaBanId = jiaBan.JiaBanId,
|
||||
@@ -271,7 +271,7 @@ namespace BLL
|
||||
/// <param name="heightWork"></param>
|
||||
public static void UpdateJiaBan(Model.License_JiaBan jiaBan)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_JiaBan newJiaBan = db.License_JiaBan.FirstOrDefault(e => e.JiaBanId == jiaBan.JiaBanId);
|
||||
if (newJiaBan != null)
|
||||
{
|
||||
@@ -304,7 +304,7 @@ namespace BLL
|
||||
/// <param name="jiaBanId"></param>
|
||||
public static void DeleteJiaBanById(string jiaBanId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_JiaBan jiaBan = db.License_JiaBan.FirstOrDefault(e => e.JiaBanId == jiaBanId);
|
||||
if (jiaBan != null)
|
||||
{
|
||||
@@ -337,7 +337,7 @@ namespace BLL
|
||||
/// <param name="heightWork"></param>
|
||||
public static void AddHeightWork(Model.License_HeightWork heightWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HeightWork newHeightWork = new Model.License_HeightWork
|
||||
{
|
||||
HeightWorkId = heightWork.HeightWorkId,
|
||||
@@ -373,7 +373,7 @@ namespace BLL
|
||||
/// <param name="heightWork"></param>
|
||||
public static void UpdateHeightWork(Model.License_HeightWork heightWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HeightWork newHeightWork = db.License_HeightWork.FirstOrDefault(e => e.HeightWorkId == heightWork.HeightWorkId);
|
||||
if (newHeightWork != null)
|
||||
{
|
||||
@@ -401,7 +401,7 @@ namespace BLL
|
||||
/// <param name="heightWorkId"></param>
|
||||
public static void DeleteHeightWorkById(string heightWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_HeightWork heightWork = db.License_HeightWork.FirstOrDefault(e => e.HeightWorkId == heightWorkId);
|
||||
if (heightWork != null)
|
||||
{
|
||||
@@ -434,7 +434,7 @@ namespace BLL
|
||||
/// <param name="limitedSpace"></param>
|
||||
public static void AddLimitedSpace(Model.License_LimitedSpace limitedSpace)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LimitedSpace newLimitedSpace = new Model.License_LimitedSpace
|
||||
{
|
||||
LimitedSpaceId = limitedSpace.LimitedSpaceId,
|
||||
@@ -470,7 +470,7 @@ namespace BLL
|
||||
/// <param name="limitedSpace"></param>
|
||||
public static void UpdateLimitedSpace(Model.License_LimitedSpace limitedSpace)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LimitedSpace newLimitedSpace = db.License_LimitedSpace.FirstOrDefault(e => e.LimitedSpaceId == limitedSpace.LimitedSpaceId);
|
||||
if (newLimitedSpace != null)
|
||||
{
|
||||
@@ -497,7 +497,7 @@ namespace BLL
|
||||
/// <param name="limitedSpaceId"></param>
|
||||
public static void DeleteLimitedSpaceById(string limitedSpaceId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LimitedSpace limitedSpace = db.License_LimitedSpace.FirstOrDefault(e => e.LimitedSpaceId == limitedSpaceId);
|
||||
if (limitedSpace != null)
|
||||
{
|
||||
@@ -530,7 +530,7 @@ namespace BLL
|
||||
/// <param name="radialWork"></param>
|
||||
public static void AddRadialWork(Model.License_RadialWork radialWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_RadialWork newRadialWork = new Model.License_RadialWork
|
||||
{
|
||||
RadialWorkId = radialWork.RadialWorkId,
|
||||
@@ -569,7 +569,7 @@ namespace BLL
|
||||
/// <param name="radialWork"></param>
|
||||
public static void UpdateRadialWork(Model.License_RadialWork radialWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_RadialWork newRadialWork = db.License_RadialWork.FirstOrDefault(e => e.RadialWorkId == radialWork.RadialWorkId);
|
||||
if (newRadialWork != null)
|
||||
{
|
||||
@@ -606,7 +606,7 @@ namespace BLL
|
||||
/// <param name="radialWorkId"></param>
|
||||
public static void DeleteRadialWorkById(string radialWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_RadialWork radialWork = db.License_RadialWork.FirstOrDefault(e => e.RadialWorkId == radialWorkId);
|
||||
if (radialWork != null)
|
||||
{
|
||||
@@ -641,7 +641,7 @@ namespace BLL
|
||||
/// <param name="openCircuit"></param>
|
||||
public static void AddOpenCircuit(Model.License_OpenCircuit openCircuit)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_OpenCircuit newOpenCircuit = new Model.License_OpenCircuit
|
||||
{
|
||||
OpenCircuitId = openCircuit.OpenCircuitId,
|
||||
@@ -677,7 +677,7 @@ namespace BLL
|
||||
/// <param name="openCircuit"></param>
|
||||
public static void UpdateOpenCircuit(Model.License_OpenCircuit openCircuit)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_OpenCircuit newOpenCircuit = db.License_OpenCircuit.FirstOrDefault(e => e.OpenCircuitId == openCircuit.OpenCircuitId);
|
||||
if (newOpenCircuit != null)
|
||||
{
|
||||
@@ -705,7 +705,7 @@ namespace BLL
|
||||
/// <param name="openCircuitId"></param>
|
||||
public static void DeleteOpenCircuitById(string openCircuitId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_OpenCircuit openCircuit = db.License_OpenCircuit.FirstOrDefault(e => e.OpenCircuitId == openCircuitId);
|
||||
if (openCircuit != null)
|
||||
{
|
||||
@@ -738,7 +738,7 @@ namespace BLL
|
||||
/// <param name="breakGround"></param>
|
||||
public static void AddBreakGround(Model.License_BreakGround breakGround)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_BreakGround newBreakGround = new Model.License_BreakGround
|
||||
{
|
||||
BreakGroundId = breakGround.BreakGroundId,
|
||||
@@ -773,7 +773,7 @@ namespace BLL
|
||||
/// <param name="breakGround"></param>
|
||||
public static void UpdateBreakGround(Model.License_BreakGround breakGround)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_BreakGround newBreakGround = db.License_BreakGround.FirstOrDefault(e => e.BreakGroundId == breakGround.BreakGroundId);
|
||||
if (newBreakGround != null)
|
||||
{
|
||||
@@ -800,7 +800,7 @@ namespace BLL
|
||||
/// <param name="breakGroundId"></param>
|
||||
public static void DeleteBreakGroundById(string breakGroundId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_BreakGround breakGround = db.License_BreakGround.FirstOrDefault(e => e.BreakGroundId == breakGroundId);
|
||||
if (breakGround != null)
|
||||
{
|
||||
@@ -835,7 +835,7 @@ namespace BLL
|
||||
/// <param name="nightWork"></param>
|
||||
public static void AddNightWork(Model.License_NightWork nightWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_NightWork newNightWork = new Model.License_NightWork
|
||||
{
|
||||
NightWorkId = nightWork.NightWorkId,
|
||||
@@ -873,7 +873,7 @@ namespace BLL
|
||||
/// <param name="nightWork"></param>
|
||||
public static void UpdateNightWork(Model.License_NightWork nightWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_NightWork newNightWork = db.License_NightWork.FirstOrDefault(e => e.NightWorkId == nightWork.NightWorkId);
|
||||
if (newNightWork != null)
|
||||
{
|
||||
@@ -903,7 +903,7 @@ namespace BLL
|
||||
/// <param name="nightWorkId"></param>
|
||||
public static void DeleteNightWorkById(string nightWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_NightWork nightWork = db.License_NightWork.FirstOrDefault(e => e.NightWorkId == nightWorkId);
|
||||
if (nightWork != null)
|
||||
{
|
||||
@@ -936,7 +936,7 @@ namespace BLL
|
||||
/// <param name="liftingWork"></param>
|
||||
public static void AddLiftingWork(Model.License_LiftingWork liftingWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LiftingWork newLiftingWork = new Model.License_LiftingWork
|
||||
{
|
||||
LiftingWorkId = liftingWork.LiftingWorkId,
|
||||
@@ -972,7 +972,7 @@ namespace BLL
|
||||
/// <param name="liftingWork"></param>
|
||||
public static void UpdateLiftingWork(Model.License_LiftingWork liftingWork)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LiftingWork newLiftingWork = db.License_LiftingWork.FirstOrDefault(e => e.LiftingWorkId == liftingWork.LiftingWorkId);
|
||||
if (newLiftingWork != null)
|
||||
{
|
||||
@@ -1000,7 +1000,7 @@ namespace BLL
|
||||
/// <param name="liftingWorkId"></param>
|
||||
public static void DeleteLiftingWorkById(string liftingWorkId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LiftingWork liftingWork = db.License_LiftingWork.FirstOrDefault(e => e.LiftingWorkId == liftingWorkId);
|
||||
if (liftingWork != null)
|
||||
{
|
||||
@@ -1033,7 +1033,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void AddTempElectricity(Model.License_TempElectricity tempElectricity)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_TempElectricity newTempElectricity = new Model.License_TempElectricity
|
||||
{
|
||||
TempElectricityId = tempElectricity.TempElectricityId,
|
||||
@@ -1069,7 +1069,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void UpdateTempElectricity(Model.License_TempElectricity tempElectricity)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_TempElectricity newTempElectricity = db.License_TempElectricity.FirstOrDefault(e => e.TempElectricityId == tempElectricity.TempElectricityId);
|
||||
if (newTempElectricity != null)
|
||||
{
|
||||
@@ -1096,7 +1096,7 @@ namespace BLL
|
||||
/// <param name="fireWorkId"></param>
|
||||
public static void DeleteTempElectricityById(string tempElectricityId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_TempElectricity tempElectricity = db.License_TempElectricity.FirstOrDefault(e => e.TempElectricityId == tempElectricityId);
|
||||
if (tempElectricity != null)
|
||||
{
|
||||
@@ -1129,7 +1129,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void AddPressureTest(Model.License_PressureTest pressureTest)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_PressureTest newPressureTest = new Model.License_PressureTest
|
||||
{
|
||||
PressureTestId = pressureTest.PressureTestId,
|
||||
@@ -1166,7 +1166,7 @@ namespace BLL
|
||||
/// <param name="fireWork"></param>
|
||||
public static void UpdatePressureTest(Model.License_PressureTest pressureTest)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_PressureTest newPressureTest = db.License_PressureTest.FirstOrDefault(e => e.PressureTestId == pressureTest.PressureTestId);
|
||||
if (newPressureTest != null)
|
||||
{
|
||||
@@ -1193,7 +1193,7 @@ namespace BLL
|
||||
/// <param name="fireWorkId"></param>
|
||||
public static void DeletePressureTestById(string pressureTestId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_PressureTest pressureTest = db.License_PressureTest.FirstOrDefault(e => e.PressureTestId == pressureTestId);
|
||||
if (pressureTest != null)
|
||||
{
|
||||
@@ -1240,7 +1240,7 @@ namespace BLL
|
||||
/// <param name="licenseItem"></param>
|
||||
public static void AddLicenseItem(Model.License_LicenseItem licenseItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseItem newLicenseItem = new Model.License_LicenseItem
|
||||
{
|
||||
LicenseItemId = SQLHelper.GetNewID(),
|
||||
@@ -1260,7 +1260,7 @@ namespace BLL
|
||||
/// <param name="licenseItem"></param>
|
||||
public static void UpdateLicenseItem(Model.License_LicenseItem licenseItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseItem newLicenseItem = db.License_LicenseItem.FirstOrDefault(e => e.LicenseItemId == licenseItem.LicenseItemId);
|
||||
if (newLicenseItem != null)
|
||||
{
|
||||
@@ -1276,7 +1276,7 @@ namespace BLL
|
||||
/// <param name="licenseItemId"></param>
|
||||
public static void DeleteLicenseItemById(string licenseItemId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_LicenseItem licenseItem = db.License_LicenseItem.FirstOrDefault(e => e.LicenseItemId == licenseItemId);
|
||||
if (licenseItem != null)
|
||||
{
|
||||
@@ -1291,7 +1291,7 @@ namespace BLL
|
||||
/// <param name="dataId"></param>
|
||||
public static void DeleteLicenseItemByDataId(string dataId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var licenseItems = from x in db.License_LicenseItem where x.DataId == dataId select x;
|
||||
if (licenseItems.Count()>0)
|
||||
{
|
||||
@@ -1332,7 +1332,7 @@ namespace BLL
|
||||
/// <param name="flowOperate"></param>
|
||||
public static void AddFlowOperate(Model.License_FlowOperate flowOperate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FlowOperate newFlowOperate = new Model.License_FlowOperate
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(),
|
||||
@@ -1354,7 +1354,7 @@ namespace BLL
|
||||
/// <param name="flowOperate"></param>
|
||||
public static void UpdateFlowOperate(Model.License_FlowOperate flowOperate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FlowOperate newFlowOperate = db.License_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowOperate.FlowOperateId);
|
||||
if (newFlowOperate != null)
|
||||
{
|
||||
@@ -1373,7 +1373,7 @@ namespace BLL
|
||||
/// <param name="flowOperateId"></param>
|
||||
public static void DeleteFlowOperateById(string flowOperateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FlowOperate flowOperate = db.License_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowOperateId);
|
||||
if (flowOperate != null)
|
||||
{
|
||||
@@ -1389,7 +1389,7 @@ namespace BLL
|
||||
/// <param name="dataId"></param>
|
||||
public static void DeleteFlowOperateByDataId(string dataId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var flowOperates = from x in db.License_FlowOperate where x.DataId == dataId select x;
|
||||
if (flowOperates.Count() > 0)
|
||||
{
|
||||
@@ -1431,7 +1431,7 @@ namespace BLL
|
||||
/// <param name="flowOperateItem"></param>
|
||||
public static void AddFlowOperateItem(Model.License_FlowOperateItem flowOperateItem)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.License_FlowOperateItem newFlowOperateItem = new Model.License_FlowOperateItem
|
||||
{
|
||||
FlowOperateItemId = flowOperateItem.FlowOperateItemId,
|
||||
@@ -1451,7 +1451,7 @@ namespace BLL
|
||||
/// <param name="flowOperateId"></param>
|
||||
public static void DeleteFlowOperateItemByDataId(string flowOperateId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var flowOperateItems = from x in db.License_FlowOperateItem where x.FlowOperateId == flowOperateId select x;
|
||||
if (flowOperateItems.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class CompletionReportService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取完工报告
|
||||
@@ -25,7 +25,7 @@ namespace BLL
|
||||
/// <param name="completionReport"></param>
|
||||
public static void AddCompletionReport(Model.Manager_CompletionReport completionReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CompletionReport newCompletionReport = new Model.Manager_CompletionReport
|
||||
{
|
||||
CompletionReportId = completionReport.CompletionReportId,
|
||||
@@ -49,7 +49,7 @@ namespace BLL
|
||||
/// <param name="completionReport"></param>
|
||||
public static void UpdateCompletionReport(Model.Manager_CompletionReport completionReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CompletionReport newCompletionReport = db.Manager_CompletionReport.FirstOrDefault(e => e.CompletionReportId == completionReport.CompletionReportId);
|
||||
if (newCompletionReport != null)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ namespace BLL
|
||||
/// <param name="completionReportId"></param>
|
||||
public static void DeleteCompletionReportById(string completionReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CompletionReport completionReport = db.Manager_CompletionReport.FirstOrDefault(e => e.CompletionReportId == completionReportId);
|
||||
if (completionReport != null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace BLL
|
||||
{
|
||||
public class HeadMonthReportBService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据安全统计主键获取安全统计信息
|
||||
@@ -69,7 +69,7 @@ namespace BLL
|
||||
/// <param name="headMonthReport">安全统计实体</param>
|
||||
public static void AddHeadMonthReport(Model.Manager_HeadMonthReportB headMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Manager_HeadMonthReportB));
|
||||
Model.Manager_HeadMonthReportB newHeadMonthReport = new Model.Manager_HeadMonthReportB
|
||||
{
|
||||
@@ -94,7 +94,7 @@ namespace BLL
|
||||
/// <param name="headMonthReport">安全统计实体</param>
|
||||
public static void UpdateHeadMonthReport(Model.Manager_HeadMonthReportB headMonthReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_HeadMonthReportB newHeadMonthReport = db.Manager_HeadMonthReportB.First(e => e.HeadMonthReportId == headMonthReport.HeadMonthReportId);
|
||||
newHeadMonthReport.MonthReportCode = headMonthReport.MonthReportCode;
|
||||
newHeadMonthReport.Months = headMonthReport.Months;
|
||||
@@ -114,7 +114,7 @@ namespace BLL
|
||||
/// <param name="headMonthReportId">安全统计主键</param>
|
||||
public static void DeleteHeadMonthReportByHeadMonthReportId(string headMonthReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_HeadMonthReportB headMonthReport = db.Manager_HeadMonthReportB.First(e => e.HeadMonthReportId == headMonthReportId);
|
||||
db.Manager_HeadMonthReportB.DeleteOnSubmit(headMonthReport);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class AccidentReport2Service
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取事故调查报告
|
||||
@@ -355,7 +355,7 @@ namespace BLL
|
||||
/// <param name="accidentReport"></param>
|
||||
public static void AddAccidentReport(Model.Accident_AccidentReport accidentReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport newAccidentReport = new Model.Accident_AccidentReport
|
||||
{
|
||||
AccidentReportId = accidentReport.AccidentReportId,
|
||||
@@ -399,7 +399,7 @@ namespace BLL
|
||||
/// <param name="accidentReport"></param>
|
||||
public static void UpdateAccidentReport(Model.Accident_AccidentReport accidentReport)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport newAccidentReport = db.Accident_AccidentReport.FirstOrDefault(e => e.AccidentReportId == accidentReport.AccidentReportId);
|
||||
if (newAccidentReport != null)
|
||||
{
|
||||
@@ -440,7 +440,7 @@ namespace BLL
|
||||
/// <param name="accidentReportId"></param>
|
||||
public static void DeleteAccidentReportById(string accidentReportId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Accident_AccidentReport accidentReport = db.Accident_AccidentReport.FirstOrDefault(e => e.AccidentReportId == accidentReportId);
|
||||
if (accidentReport != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class AccidentSortBService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
public static Model.Manager_AccidentSortB GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ namespace BLL
|
||||
/// <param name="accidentSort">月报告事故分类实体</param>
|
||||
public static void AddAccidentSort(Model.Manager_AccidentSortB accidentSort)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Manager_AccidentSortB));
|
||||
Model.Manager_AccidentSortB newAccidentSort = new Model.Manager_AccidentSortB
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace BLL
|
||||
{
|
||||
public class CheckSortBService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键获取所有月报告HSE检查情况信息
|
||||
@@ -52,7 +52,7 @@ namespace BLL
|
||||
/// <param name="checkSort">月报告HSE检查情况实体</param>
|
||||
public static void AddCheckSort(Model.Manager_CheckSortB checkSort)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Manager_CheckSortB));
|
||||
Model.Manager_CheckSortB newCheckSort = new Model.Manager_CheckSortB
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BLL
|
||||
/// <param name="def"></param>
|
||||
public static void AddCostAnalyse(Model.Manager_CostAnalyse costAnalyse)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.Manager_CostAnalyse));
|
||||
Model.Manager_CostAnalyse newCostAnalyse = new Model.Manager_CostAnalyse
|
||||
{
|
||||
@@ -60,7 +60,7 @@ namespace BLL
|
||||
/// <param name="def"></param>
|
||||
public static void UpdateCostAnalyse(Model.Manager_CostAnalyse costAnalyse)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CostAnalyse newCostAnalyse = db.Manager_CostAnalyse.First(e => e.AnalyseId == costAnalyse.AnalyseId);
|
||||
newCostAnalyse.Months = costAnalyse.Months;
|
||||
newCostAnalyse.Analyse = costAnalyse.Analyse;
|
||||
@@ -76,7 +76,7 @@ namespace BLL
|
||||
/// <param name="costAnalyseId"></param>
|
||||
public static void DeleteCostAnalyse(string analyseId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CostAnalyse costAnalyse = db.Manager_CostAnalyse.First(e => e.AnalyseId == analyseId);
|
||||
db.Manager_CostAnalyse.DeleteOnSubmit(costAnalyse);
|
||||
db.SubmitChanges();
|
||||
@@ -88,7 +88,7 @@ namespace BLL
|
||||
/// <param name="months"></param>
|
||||
public static void DeleteCostAnalyseByMonths(DateTime? months)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Manager_CostAnalyse costAnalyse = db.Manager_CostAnalyse.First(e => e.Months == months);
|
||||
db.Manager_CostAnalyse.DeleteOnSubmit(costAnalyse);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice">费用汇总明细实体</param>
|
||||
public static void AddCostStatisticDetail(Model.TC_CostStatisticDetail detail)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
string CostStatisticDetailId = SQLHelper.GetNewID(typeof(Model.TC_CostStatisticDetail));
|
||||
Model.TC_CostStatisticDetail newtc_CostDetail = new Model.TC_CostStatisticDetail
|
||||
{
|
||||
@@ -89,7 +89,7 @@ namespace BLL
|
||||
/// <param name="actionPlanCode">施计划编号</param>
|
||||
public static void DeleteCostStatisticDetailByCostStatisticCode(string costStatisticCode)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var q = (from x in db.TC_CostStatisticDetail where x.CostStatisticCode == costStatisticCode select x).ToList();
|
||||
db.TC_CostStatisticDetail.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace BLL
|
||||
{
|
||||
public class CostStatisticService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -100,7 +100,7 @@ namespace BLL
|
||||
/// <param name="pauseNotice">费用汇总实体</param>
|
||||
public static void AddCostStatistic(Model.TC_CostStatistic tc_CostStatistic)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.TC_CostStatistic newtc_CostStatistic = new Model.TC_CostStatistic
|
||||
{
|
||||
CostStatisticCode = tc_CostStatistic.CostStatisticCode,
|
||||
@@ -119,7 +119,7 @@ namespace BLL
|
||||
/// <param name="pauseNoticeCode">费用汇总主键</param>
|
||||
public static void DeleteCostStatisticByCostStatisticCode(string costStatisticCode)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.TC_CostStatistic tc_CostStatistic = db.TC_CostStatistic.FirstOrDefault(e => e.CostStatisticCode == costStatisticCode);
|
||||
if (tc_CostStatistic != null)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user