修改安全月报
This commit is contained in:
@@ -90,8 +90,12 @@ namespace BLL
|
||||
public static void DeleteAccidentSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_AccidentSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_AccidentSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_AccidentSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,12 @@ namespace BLL
|
||||
public static void DeleteCheckDetailSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_CheckDetailSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_CheckDetailSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_CheckDetailSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,10 @@ namespace BLL
|
||||
public static void DeleteDrillSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_DrillSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_DrillSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count > 0) {
|
||||
db.Manager_DrillSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,9 @@ namespace BLL
|
||||
public static void DeleteEmergencySortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_EmergencySortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_EmergencySortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count > 0) {
|
||||
db.Manager_EmergencySortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,13 @@ namespace BLL
|
||||
public static void DeleteHazardSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_HazardSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_HazardSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_HazardSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +78,11 @@ namespace BLL
|
||||
public static void DeleteHseCostsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_HseCostC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_HseCostC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_HseCostC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +68,11 @@ namespace BLL
|
||||
public static void DeleteIncentiveSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_IncentiveSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_IncentiveSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
db.Manager_IncentiveSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,12 @@ namespace BLL
|
||||
public static void DeleteMeetingSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_MeetingSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_MeetingSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_MeetingSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,9 @@ namespace BLL
|
||||
|
||||
StartDate=monthReport.StartDate,
|
||||
EndDate=monthReport.EndDate,
|
||||
TotalHseManhoursYear = monthReport.TotalHseManhoursYear
|
||||
TotalHseManhoursYear = monthReport.TotalHseManhoursYear,
|
||||
|
||||
EmergencyManagementWorkDef=monthReport.EmergencyManagementWorkDef,
|
||||
};
|
||||
|
||||
db.Manager_MonthReportC.InsertOnSubmit(newMonthReport);
|
||||
@@ -305,6 +307,8 @@ namespace BLL
|
||||
newMonthReport.StartDate = monthReport.StartDate;
|
||||
newMonthReport.EndDate = monthReport.EndDate;
|
||||
newMonthReport.TotalHseManhoursYear = monthReport.TotalHseManhoursYear;
|
||||
|
||||
newMonthReport.EmergencyManagementWorkDef = monthReport.EmergencyManagementWorkDef;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace BLL
|
||||
public static void DeleteOtherActiveSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_OtherActiveSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_OtherActiveSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
db.Manager_OtherActiveSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,8 +49,12 @@ namespace BLL
|
||||
public static void DeletePromotionalActiviteSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_PromotionalActiviteSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_PromotionalActiviteSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_PromotionalActiviteSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,12 @@ namespace BLL
|
||||
public static void DeleteTrainActivitySortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_TrainActivitySortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_TrainActivitySortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_TrainActivitySortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user