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

This commit is contained in:
2026-04-23 11:36:49 +08:00
parent 5a38880a14
commit 746cb57619
315 changed files with 641 additions and 449 deletions
@@ -7,7 +7,7 @@ namespace BLL
{
public class AccidentSortCService
{
public static Model.SGGLDB db = Funs.DB;
public static Model.Manager_AccidentSortC GetAccidentSortsByMonthReportIdAndAccidentType(string monthReportId, string accidentType)
{
@@ -89,6 +89,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteAccidentSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_AccidentSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class ActivityDesCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报Id获取相关所有活动情况说明信息
@@ -7,7 +7,7 @@ namespace BLL
{
public class CheckDetailSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE检查明细情况信息
@@ -53,6 +53,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteCheckDetailSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_CheckDetailSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class CheckSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE检查情况信息
@@ -7,7 +7,7 @@ namespace BLL
{
public class DrillSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告应急演练信息
@@ -48,6 +48,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteDrillSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_DrillSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0) {
db.Manager_DrillSortC.DeleteAllOnSubmit(q);
@@ -7,7 +7,7 @@ namespace BLL
{
public class EmergencySortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告应急预案信息
@@ -48,6 +48,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteEmergencySortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_EmergencySortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0) {
db.Manager_EmergencySortC.DeleteAllOnSubmit(q);
@@ -7,7 +7,7 @@ namespace BLL
{
public class HazardSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告危险源信息
@@ -48,6 +48,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteHazardSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_HazardSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -8,7 +8,7 @@ namespace BLL
{
public class HseCostCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 获取分页列表
@@ -16,6 +16,7 @@ namespace BLL
/// <returns></returns>
public static IEnumerable getListData(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
return from x in db.Manager_HseCostC
where x.MonthReportId == monthReportId
orderby x.UnitId
@@ -77,6 +78,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteHseCostsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_HseCostC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class IncentiveSortCService
{
public static Model.SGGLDB db = Funs.DB;
public static List<Model.Manager_IncentiveSortC> GetIncentiveSortsByMonthReportIdAndBigType(string monthReportId, string bigType)
{
@@ -67,6 +67,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteIncentiveSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_IncentiveSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class MeetingSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE会议情况信息
@@ -55,6 +55,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteMeetingSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_MeetingSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class OtherActiveSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告其他HSE管理活动信息
@@ -47,6 +47,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteOtherActiveSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_OtherActiveSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class OtherManagementCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报Id获取HSE现场其他管理情况信息
@@ -7,7 +7,7 @@ namespace BLL
{
public class PersonSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE人力投入信息
@@ -54,6 +54,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeletePersonSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_PersonSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -68,6 +69,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteManager_HiddenDanger(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_HiddenDanger where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -82,6 +84,7 @@ namespace BLL
/// <param name="monthReportId"></param>
public static void DeleteManager_ProjectAssignment(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_ProjectAssignment where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -96,6 +99,7 @@ namespace BLL
/// <param name="monthReportId"></param>
public static void DeleteManager_EmergencyPlan(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_EmergencyPlan where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -110,6 +114,7 @@ namespace BLL
/// <param name="monthReportId"></param>
public static void DeleteManager_DrillRecordList(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_DrillRecordList where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -124,6 +129,7 @@ namespace BLL
/// <param name="monthReportId"></param>
public static void DeleteManager_Attempted(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_Attempted where x.MonthReportId == monthReportId select x).ToList();
if (q.Count > 0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class PlanCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报Id获取本月文件、方案修编情况说明
@@ -7,7 +7,7 @@ namespace BLL
{
public class PromotionalActiviteSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE宣传活动信息
@@ -48,6 +48,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeletePromotionalActiviteSortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_PromotionalActiviteSortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class TrainActivitySortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE培训活动信息
@@ -47,6 +47,7 @@ namespace BLL
/// <param name="monthReportId">月报告主键</param>
public static void DeleteTrainActivitySortsByMonthReportId(string monthReportId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.Manager_TrainActivitySortC where x.MonthReportId == monthReportId select x).ToList();
if (q.Count>0)
{
@@ -7,7 +7,7 @@ namespace BLL
{
public class TrainSortCService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据月报告主键获取所有月报告HSE培训情况信息