Files
xinjiang/SGGL/FineUIPro.Web/ReportManage/SafeEnvBudget/SafetyManagementDataEdit.aspx.cs
T

281 lines
25 KiB
C#
Raw Normal View History

2026-09-07 15:06:45 +08:00
using BLL;
using Model;
using NPOI.POIFS.Crypt.Dsig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.ReportManage.SafeEnvBudget
{
public partial class SafetyManagementDataEdit : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string DataId
{
get
{
return (string)ViewState["DataId"];
}
set
{
ViewState["DataId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
///单位
BLL.ProjectUnitService.InitUnitByProjectIdDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
this.DataId = Request.Params["dataId"];
if (!string.IsNullOrEmpty(this.DataId))
{
var data = BLL.SafetyManagementDataService.GetSafetyManagementDataById(this.DataId);
if (data != null)
{
if (!string.IsNullOrEmpty(data.UnitId))
{
this.drpUnitId.SelectedValue = data.UnitId;
}
txtReportDate.Text = data.ReportDate.HasValue ? string.Format("{0:yyyy-MM-dd}", data.ReportDate) : "";
txtConAndEPCCount.Text = data.ConAndEPCCount.HasValue ? data.ConAndEPCCount.ToString() : "";
txtSurveyAndDesignCount.Text = data.SurveyAndDesignCount.HasValue ? data.SurveyAndDesignCount.ToString() : "";
txtWorkingHours.Text = data.WorkingHours.HasValue ? data.WorkingHours.ToString() : "";
txtSafeDrivingMileage.Text = data.SafeDrivingMileage.HasValue ? data.SafeDrivingMileage.ToString() : "";
txtSubSupervise_InspectionItems.Text = data.SubSupervise_InspectionItems.HasValue ? data.SubSupervise_InspectionItems.ToString() : "";
txtSubSupervise_Inspections.Text = data.SubSupervise_Inspections.HasValue ? data.SubSupervise_Inspections.ToString() : "";
txtSubSupervise_HSE_Total.Text = data.SubSupervise_HSE_Total.HasValue ? data.SubSupervise_HSE_Total.ToString() : "";
txtSubSupervise_HSE_Larger.Text = data.SubSupervise_HSE_Larger.HasValue ? data.SubSupervise_HSE_Larger.ToString() : "";
txtSubSupervise_HSE_Generally.Text = data.SubSupervise_HSE_Generally.HasValue ? data.SubSupervise_HSE_Generally.ToString() : "";
txtSubSupervise_HSE_Slight.Text = data.SubSupervise_HSE_Slight.HasValue ? data.SubSupervise_HSE_Slight.ToString() : "";
txtSubSupervise_Quality_Total.Text = data.SubSupervise_Quality_Total.HasValue ? data.SubSupervise_Quality_Total.ToString() : "";
txtSubSupervise_Quality_Larger.Text = data.SubSupervise_Quality_Larger.HasValue ? data.SubSupervise_Quality_Larger.ToString() : "";
txtSubSupervise_Quality_Generally.Text = data.SubSupervise_Quality_Generally.HasValue ? data.SubSupervise_Quality_Generally.ToString() : "";
txtSubSupervise_Quality_Slight.Text = data.SubSupervise_Quality_Slight.HasValue ? data.SubSupervise_Quality_Slight.ToString() : "";
txtSubVideo_InspectionItems.Text = data.SubVideo_InspectionItems.HasValue ? data.SubVideo_InspectionItems.ToString() : "";
txtSubVideo_InspectionsMin.Text = data.SubVideo_InspectionsMin.HasValue ? data.SubVideo_InspectionsMin.ToString() : "";
txtSubVideo_HSE_Total.Text = data.SubVideo_HSE_Total.HasValue ? data.SubVideo_HSE_Total.ToString() : "";
txtSubVideo_HSE_Larger.Text = data.SubVideo_HSE_Larger.HasValue ? data.SubVideo_HSE_Larger.ToString() : "";
txtSubVideo_HSE_Generally.Text = data.SubVideo_HSE_Generally.HasValue ? data.SubVideo_HSE_Generally.ToString() : "";
txtSubVideo_HSE_Slight.Text = data.SubVideo_HSE_Slight.HasValue ? data.SubVideo_HSE_Slight.ToString() : "";
txtSubVideo_Quality_Total.Text = data.SubVideo_Quality_Total.HasValue ? data.SubVideo_Quality_Total.ToString() : "";
txtSubVideo_Quality_Larger.Text = data.SubVideo_Quality_Larger.HasValue ? data.SubVideo_Quality_Larger.ToString() : "";
txtSubVideo_Quality_Generally.Text = data.SubVideo_Quality_Generally.HasValue ? data.SubVideo_Quality_Generally.ToString() : "";
txtSubVideo_Quality_Slight.Text = data.SubVideo_Quality_Slight.HasValue ? data.SubVideo_Quality_Slight.ToString() : "";
txtHQ_InspectionItems.Text = data.HQ_InspectionItems.HasValue ? data.HQ_InspectionItems.ToString() : "";
txtHQ_Inspections.Text = data.HQ_Inspections.HasValue ? data.HQ_Inspections.ToString() : "";
txtHQ_HSE_Total.Text = data.HQ_HSE_Total.HasValue ? data.HQ_HSE_Total.ToString() : "";
txtHQ_HSE_Larger.Text = data.HQ_HSE_Larger.HasValue ? data.HQ_HSE_Larger.ToString() : "";
txtHQ_HSE_Generally.Text = data.HQ_HSE_Generally.HasValue ? data.HQ_HSE_Generally.ToString() : "";
txtHQ_HSE_Slight.Text = data.HQ_HSE_Slight.HasValue ? data.HQ_HSE_Slight.ToString() : "";
txtHQ_Quality_Total.Text = data.HQ_Quality_Total.HasValue ? data.HQ_Quality_Total.ToString() : "";
txtHQ_Quality_Larger.Text = data.HQ_Quality_Larger.HasValue ? data.HQ_Quality_Larger.ToString() : "";
txtHQ_Quality_Generally.Text = data.HQ_Quality_Generally.HasValue ? data.HQ_Quality_Generally.ToString() : "";
txtHQ_Quality_Slight.Text = data.HQ_Quality_Slight.HasValue ? data.HQ_Quality_Slight.ToString() : "";
txtQuality_Employee_Count.Text = data.Quality_Employee_Count.HasValue ? data.Quality_Employee_Count.ToString() : "";
txtQuality_Employee_Score.Text = data.Quality_Employee_Score.HasValue ? data.Quality_Employee_Score.ToString() : "";
txtQuality_Contractor_Count.Text = data.Quality_Contractor_Count.HasValue ? data.Quality_Contractor_Count.ToString() : "";
txtQuality_Contractor_Score.Text = data.Quality_Contractor_Score.HasValue ? data.Quality_Contractor_Score.ToString() : "";
txtQuality_Employee_Fine.Text = data.Quality_Employee_Fine.HasValue ? data.Quality_Employee_Fine.ToString() : "";
txtQuality_Employee_FineAmount.Text = data.Quality_Employee_FineAmount.HasValue ? data.Quality_Employee_FineAmount.ToString() : "";
txtQuality_Contractor_Fine.Text = data.Quality_Contractor_Fine.HasValue ? data.Quality_Contractor_Fine.ToString() : "";
txtQuality_Contractor_FineAmount.Text = data.Quality_Contractor_FineAmount.HasValue ? data.Quality_Contractor_FineAmount.ToString() : "";
txtQuality_Contractor_Deduction.Text = data.Quality_Contractor_Deduction.HasValue ? data.Quality_Contractor_Deduction.ToString() : "";
txtQuality_Contractor_DeductionAmount.Text = data.Quality_Contractor_DeductionAmount.HasValue ? data.Quality_Contractor_DeductionAmount.ToString() : "";
txtQuality_ProjectDepartment_Fine.Text = data.Quality_ProjectDepartment_Fine.HasValue ? data.Quality_ProjectDepartment_Fine.ToString() : "";
txtQuality_ProjectDepartment_FineAmount.Text = data.Quality_ProjectDepartment_FineAmount.HasValue ? data.Quality_ProjectDepartment_FineAmount.ToString() : "";
txtHSE_Employee_Count.Text = data.HSE_Employee_Count.HasValue ? data.HSE_Employee_Count.ToString() : "";
txtHSE_Employee_Score.Text = data.HSE_Employee_Score.HasValue ? data.HSE_Employee_Score.ToString() : "";
txtHSE_Contractor_Count.Text = data.HSE_Contractor_Count.HasValue ? data.HSE_Contractor_Count.ToString() : "";
txtHSE_Contractor_Score.Text = data.HSE_Contractor_Score.HasValue ? data.HSE_Contractor_Score.ToString() : "";
txtHSE_Employee_Fine.Text = data.HSE_Employee_Fine.HasValue ? data.HSE_Employee_Fine.ToString() : "";
txtHSE_Employee_FineAmount.Text = data.HSE_Employee_FineAmount.HasValue ? data.HSE_Employee_FineAmount.ToString() : "";
txtHSE_Contractor_Fine.Text = data.HSE_Contractor_Fine.HasValue ? data.HSE_Contractor_Fine.ToString() : "";
txtHSE_Contractor_FineAmount.Text = data.HSE_Contractor_FineAmount.HasValue ? data.HSE_Contractor_FineAmount.ToString() : "";
txtHSE_Contractor_Deduction.Text = data.HSE_Contractor_Deduction.HasValue ? data.HSE_Contractor_Deduction.ToString() : "";
txtHSE_Contractor_DeductionAmount.Text = data.HSE_Contractor_DeductionAmount.HasValue ? data.HSE_Contractor_DeductionAmount.ToString() : "";
txtHSE_ProjectDepartment_Fine.Text = data.HSE_ProjectDepartment_Fine.HasValue ? data.HSE_ProjectDepartment_Fine.ToString() : "";
txtHSE_ProjectDepartment_FineAmount.Text = data.HSE_ProjectDepartment_FineAmount.HasValue ? data.HSE_ProjectDepartment_FineAmount.ToString() : "";
txtLeaderSupervision_HSECheck_Leaders.Text = data.LeaderSupervision_HSECheck_Leaders.HasValue ? data.LeaderSupervision_HSECheck_Leaders.ToString() : "";
txtLeaderSupervision_HSECheck_Count.Text = data.LeaderSupervision_HSECheck_Count.HasValue ? data.LeaderSupervision_HSECheck_Count.ToString() : "";
txtLeaderSupervision_HSECheck_Hazards.Text = data.LeaderSupervision_HSECheck_Hazards.HasValue ? data.LeaderSupervision_HSECheck_Hazards.ToString() : "";
txtLeaderSupervision_SafetyLectures_Leaders.Text = data.LeaderSupervision_SafetyLectures_Leaders.HasValue ? data.LeaderSupervision_SafetyLectures_Leaders.ToString() : "";
txtLeaderSupervision_SafetyLectures_Count.Text = data.LeaderSupervision_SafetyLectures_Count.HasValue ? data.LeaderSupervision_SafetyLectures_Count.ToString() : "";
txtLeaderSupervision_SafetyLectures_Attendees.Text = data.LeaderSupervision_SafetyLectures_Attendees.HasValue ? data.LeaderSupervision_SafetyLectures_Attendees.ToString() : "";
txtLeaderSupervision_Activities_Leaders.Text = data.LeaderSupervision_Activities_Leaders.HasValue ? data.LeaderSupervision_Activities_Leaders.ToString() : "";
txtLeaderSupervision_Activities_Count.Text = data.LeaderSupervision_Activities_Count.HasValue ? data.LeaderSupervision_Activities_Count.ToString() : "";
txtHSEMeasures_OfficesCount.Text = data.HSEMeasures_OfficesCount.HasValue ? data.HSEMeasures_OfficesCount.ToString() : "";
txtHSEMeasures_TrainingBooths.Text = data.HSEMeasures_TrainingBooths.HasValue ? data.HSEMeasures_TrainingBooths.ToString() : "";
txtHSEMeasures_Toolboxs.Text = data.HSEMeasures_Toolboxs.HasValue ? data.HSEMeasures_Toolboxs.ToString() : "";
txtHSEMeasures_Consultant_Projects.Text = data.HSEMeasures_Consultant_Projects.HasValue ? data.HSEMeasures_Consultant_Projects.ToString() : "";
txtHSEMeasures_Consultant_Count.Text = data.HSEMeasures_Consultant_Count.HasValue ? data.HSEMeasures_Consultant_Count.ToString() : "";
txtHSEMeasures_FiveStar_Star2.Text = data.HSEMeasures_FiveStar_Star2.HasValue ? data.HSEMeasures_FiveStar_Star2.ToString() : "";
txtHSEMeasures_FiveStar_Star3.Text = data.HSEMeasures_FiveStar_Star3.HasValue ? data.HSEMeasures_FiveStar_Star3.ToString() : "";
txtHSEMeasures_FiveStar_Star4.Text = data.HSEMeasures_FiveStar_Star4.HasValue ? data.HSEMeasures_FiveStar_Star4.ToString() : "";
txtHSEMeasures_FiveStar_Star5.Text = data.HSEMeasures_FiveStar_Star5.HasValue ? data.HSEMeasures_FiveStar_Star5.ToString() : "";
txtHSEMeasures_Contractor_Interviewees.Text = data.HSEMeasures_Contractor_Interviewees.HasValue ? data.HSEMeasures_Contractor_Interviewees.ToString() : "";
txtHSEMeasures_PilotProject_Headquarters.Text = data.HSEMeasures_PilotProject_Headquarters.HasValue ? data.HSEMeasures_PilotProject_Headquarters.ToString() : "";
txtHSEMeasures_PilotProject_Branch.Text = data.HSEMeasures_PilotProject_Branch.HasValue ? data.HSEMeasures_PilotProject_Branch.ToString() : "";
txtConstruction_Teams_Totals.Text = data.Construction_Teams_Totals.HasValue ? data.Construction_Teams_Totals.ToString() : "";
txtConstruction_Teams_Compliant.Text = data.Construction_Teams_Compliant.HasValue ? data.Construction_Teams_Compliant.ToString() : "";
txtConstruction_ModelTeams_Headquarters.Text = data.Construction_ModelTeams_Headquarters.HasValue ? data.Construction_ModelTeams_Headquarters.ToString() : "";
txtConstruction_ModelTeams_CPECC.Text = data.Construction_ModelTeams_CPECC.HasValue ? data.Construction_ModelTeams_CPECC.ToString() : "";
txtConstruction_ModelTeams_Group.Text = data.Construction_ModelTeams_Group.HasValue ? data.Construction_ModelTeams_Group.ToString() : "";
txtHSETraining_ThreeCategory.Text = data.HSETraining_ThreeCategory.HasValue ? data.HSETraining_ThreeCategory.ToString() : "";
txtHSETraining_TrainingPersons.Text = data.HSETraining_TrainingPersons.HasValue ? data.HSETraining_TrainingPersons.ToString() : "";
txtHSETraining_ContractorTraining.Text = data.HSETraining_ContractorTraining.HasValue ? data.HSETraining_ContractorTraining.ToString() : "";
}
}
else
{
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
}
}
}
#endregion
#region
/// <summary>
/// 保存数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
DateTime? reportDate = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
var data = BLL.SafetyManagementDataService.GetSafetyManagementDataByReportDate(this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, reportDate);
if (data != null)
{
Alert.ShowInTop("本月安全管理数据已上报!", MessageBoxIcon.Warning);
return;
}
if (this.drpUnitId.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.drpUnitId.SelectedValue))
{
Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
return;
}
Model.SafetyManagementData newData = new Model.SafetyManagementData();
newData.UnitId = this.drpUnitId.SelectedValue;
newData.ReportDate = reportDate;
newData.ConAndEPCCount = Funs.GetNewInt(txtConAndEPCCount.Text);
newData.SurveyAndDesignCount = Funs.GetNewInt(txtSurveyAndDesignCount.Text);
newData.WorkingHours = Funs.GetNewInt(txtWorkingHours.Text);
newData.SafeDrivingMileage = Funs.GetNewInt(txtSafeDrivingMileage.Text);
newData.SubSupervise_InspectionItems = Funs.GetNewInt(txtSubSupervise_InspectionItems.Text);
newData.SubSupervise_Inspections = Funs.GetNewInt(txtSubSupervise_Inspections.Text);
newData.SubSupervise_HSE_Total = Funs.GetNewInt(txtSubSupervise_HSE_Total.Text);
newData.SubSupervise_HSE_Larger = Funs.GetNewInt(txtSubSupervise_HSE_Larger.Text);
newData.SubSupervise_HSE_Generally = Funs.GetNewInt(txtSubSupervise_HSE_Generally.Text);
newData.SubSupervise_HSE_Slight = Funs.GetNewInt(txtSubSupervise_HSE_Slight.Text);
newData.SubSupervise_Quality_Total = Funs.GetNewInt(txtSubSupervise_Quality_Total.Text);
newData.SubSupervise_Quality_Larger = Funs.GetNewInt(txtSubSupervise_Quality_Larger.Text);
newData.SubSupervise_Quality_Generally = Funs.GetNewInt(txtSubSupervise_Quality_Generally.Text);
newData.SubSupervise_Quality_Slight = Funs.GetNewInt(txtSubSupervise_Quality_Slight.Text);
newData.SubVideo_InspectionItems = Funs.GetNewInt(txtSubVideo_InspectionItems.Text);
newData.SubVideo_InspectionsMin = Funs.GetNewInt(txtSubVideo_InspectionsMin.Text);
newData.SubVideo_HSE_Total = Funs.GetNewInt(txtSubVideo_HSE_Total.Text);
newData.SubVideo_HSE_Larger = Funs.GetNewInt(txtSubVideo_HSE_Larger.Text);
newData.SubVideo_HSE_Generally = Funs.GetNewInt(txtSubVideo_HSE_Generally.Text);
newData.SubVideo_HSE_Slight = Funs.GetNewInt(txtSubVideo_HSE_Slight.Text);
newData.SubVideo_Quality_Total = Funs.GetNewInt(txtSubVideo_Quality_Total.Text);
newData.SubVideo_Quality_Larger = Funs.GetNewInt(txtSubVideo_Quality_Larger.Text);
newData.SubVideo_Quality_Generally = Funs.GetNewInt(txtSubVideo_Quality_Generally.Text);
newData.SubVideo_Quality_Slight = Funs.GetNewInt(txtSubVideo_Quality_Slight.Text);
newData.HQ_InspectionItems = Funs.GetNewInt(txtHQ_InspectionItems.Text);
newData.HQ_Inspections = Funs.GetNewInt(txtHQ_Inspections.Text);
newData.HQ_HSE_Total = Funs.GetNewInt(txtHQ_HSE_Total.Text);
newData.HQ_HSE_Larger = Funs.GetNewInt(txtHQ_HSE_Larger.Text);
newData.HQ_HSE_Generally = Funs.GetNewInt(txtHQ_HSE_Generally.Text);
newData.HQ_HSE_Slight = Funs.GetNewInt(txtHQ_HSE_Slight.Text);
newData.HQ_Quality_Total = Funs.GetNewInt(txtHQ_Quality_Total.Text);
newData.HQ_Quality_Larger = Funs.GetNewInt(txtHQ_Quality_Larger.Text);
newData.HQ_Quality_Generally = Funs.GetNewInt(txtHQ_Quality_Generally.Text);
newData.HQ_Quality_Slight = Funs.GetNewInt(txtHQ_Quality_Slight.Text);
newData.Quality_Employee_Count = Funs.GetNewInt(txtQuality_Employee_Count.Text);
newData.Quality_Employee_Score = Funs.GetNewInt(txtQuality_Employee_Score.Text);
newData.Quality_Contractor_Count = Funs.GetNewInt(txtQuality_Contractor_Count.Text);
newData.Quality_Contractor_Score = Funs.GetNewInt(txtQuality_Contractor_Score.Text);
newData.Quality_Employee_Fine = Funs.GetNewInt(txtQuality_Employee_Fine.Text);
newData.Quality_Employee_FineAmount = Funs.GetNewInt(txtQuality_Employee_FineAmount.Text);
newData.Quality_Contractor_Fine = Funs.GetNewInt(txtQuality_Contractor_Fine.Text);
newData.Quality_Contractor_FineAmount = Funs.GetNewInt(txtQuality_Contractor_FineAmount.Text);
newData.Quality_Contractor_Deduction = Funs.GetNewInt(txtQuality_Contractor_Deduction.Text);
newData.Quality_Contractor_DeductionAmount = Funs.GetNewInt(txtQuality_Contractor_DeductionAmount.Text);
newData.Quality_ProjectDepartment_Fine = Funs.GetNewInt(txtQuality_ProjectDepartment_Fine.Text);
newData.Quality_ProjectDepartment_FineAmount = Funs.GetNewInt(txtQuality_ProjectDepartment_FineAmount.Text);
newData.HSE_Employee_Count = Funs.GetNewInt(txtHSE_Employee_Count.Text);
newData.HSE_Employee_Score = Funs.GetNewInt(txtHSE_Employee_Score.Text);
newData.HSE_Contractor_Count = Funs.GetNewInt(txtHSE_Contractor_Count.Text);
newData.HSE_Contractor_Score = Funs.GetNewInt(txtHSE_Contractor_Score.Text);
newData.HSE_Employee_Fine = Funs.GetNewInt(txtHSE_Employee_Fine.Text);
newData.HSE_Employee_FineAmount = Funs.GetNewInt(txtHSE_Employee_FineAmount.Text);
newData.HSE_Contractor_Fine = Funs.GetNewInt(txtHSE_Contractor_Fine.Text);
newData.HSE_Contractor_FineAmount = Funs.GetNewInt(txtHSE_Contractor_FineAmount.Text);
newData.HSE_Contractor_Deduction = Funs.GetNewInt(txtHSE_Contractor_Deduction.Text);
newData.HSE_Contractor_DeductionAmount = Funs.GetNewInt(txtHSE_Contractor_DeductionAmount.Text);
newData.HSE_ProjectDepartment_Fine = Funs.GetNewInt(txtHSE_ProjectDepartment_Fine.Text);
newData.HSE_ProjectDepartment_FineAmount = Funs.GetNewInt(txtHSE_ProjectDepartment_FineAmount.Text);
newData.LeaderSupervision_HSECheck_Leaders = Funs.GetNewInt(txtLeaderSupervision_HSECheck_Leaders.Text);
newData.LeaderSupervision_HSECheck_Count = Funs.GetNewInt(txtLeaderSupervision_HSECheck_Count.Text);
newData.LeaderSupervision_HSECheck_Hazards = Funs.GetNewInt(txtLeaderSupervision_HSECheck_Hazards.Text);
newData.LeaderSupervision_SafetyLectures_Leaders = Funs.GetNewInt(txtLeaderSupervision_SafetyLectures_Leaders.Text);
newData.LeaderSupervision_SafetyLectures_Count = Funs.GetNewInt(txtLeaderSupervision_SafetyLectures_Count.Text);
newData.LeaderSupervision_SafetyLectures_Attendees = Funs.GetNewInt(txtLeaderSupervision_SafetyLectures_Attendees.Text);
newData.LeaderSupervision_Activities_Leaders = Funs.GetNewInt(txtLeaderSupervision_Activities_Leaders.Text);
newData.LeaderSupervision_Activities_Count = Funs.GetNewInt(txtLeaderSupervision_Activities_Count.Text);
newData.HSEMeasures_OfficesCount = Funs.GetNewInt(txtHSEMeasures_OfficesCount.Text);
newData.HSEMeasures_TrainingBooths = Funs.GetNewInt(txtHSEMeasures_TrainingBooths.Text);
newData.HSEMeasures_Toolboxs = Funs.GetNewInt(txtHSEMeasures_Toolboxs.Text);
newData.HSEMeasures_Consultant_Projects = Funs.GetNewInt(txtHSEMeasures_Consultant_Projects.Text);
newData.HSEMeasures_Consultant_Count = Funs.GetNewInt(txtHSEMeasures_Consultant_Count.Text);
newData.HSEMeasures_FiveStar_Star2 = Funs.GetNewInt(txtHSEMeasures_FiveStar_Star2.Text);
newData.HSEMeasures_FiveStar_Star3 = Funs.GetNewInt(txtHSEMeasures_FiveStar_Star3.Text);
newData.HSEMeasures_FiveStar_Star4 = Funs.GetNewInt(txtHSEMeasures_FiveStar_Star4.Text);
newData.HSEMeasures_FiveStar_Star5 = Funs.GetNewInt(txtHSEMeasures_FiveStar_Star5.Text);
newData.HSEMeasures_Contractor_Interviewees = Funs.GetNewInt(txtHSEMeasures_Contractor_Interviewees.Text);
newData.HSEMeasures_PilotProject_Headquarters = Funs.GetNewInt(txtHSEMeasures_PilotProject_Headquarters.Text);
newData.HSEMeasures_PilotProject_Branch = Funs.GetNewInt(txtHSEMeasures_PilotProject_Branch.Text);
newData.Construction_Teams_Totals = Funs.GetNewInt(txtConstruction_Teams_Totals.Text);
newData.Construction_Teams_Compliant = Funs.GetNewInt(txtConstruction_Teams_Compliant.Text);
newData.Construction_ModelTeams_Headquarters = Funs.GetNewInt(txtConstruction_ModelTeams_Headquarters.Text);
newData.Construction_ModelTeams_CPECC = Funs.GetNewInt(txtConstruction_ModelTeams_CPECC.Text);
newData.Construction_ModelTeams_Group = Funs.GetNewInt(txtConstruction_ModelTeams_Group.Text);
newData.HSETraining_ThreeCategory = Funs.GetNewInt(txtHSETraining_ThreeCategory.Text);
newData.HSETraining_TrainingPersons = Funs.GetNewInt(txtHSETraining_TrainingPersons.Text);
newData.HSETraining_ContractorTraining = Funs.GetNewInt(txtHSETraining_ContractorTraining.Text);
if (!string.IsNullOrEmpty(this.DataId))
{
newData.DataId = this.DataId;
BLL.SafetyManagementDataService.UpdateSafetyManagementData(newData);
BLL.LogService.AddSys_Log(this.CurrUser, newData.DataId, newData.DataId, BLL.Const.ProjectSafetyManagementDataMenuId, BLL.Const.BtnModify);
ShowNotify("修改成功!", MessageBoxIcon.Success);
}
else
{
newData.ProjectId = this.CurrUser.LoginProjectId;
newData.CompileMan = this.CurrUser.UserId;
newData.CompileDate = DateTime.Now;
newData.DataId = SQLHelper.GetNewID();
BLL.SafetyManagementDataService.AddSafetyManagementData(newData);
BLL.LogService.AddSys_Log(this.CurrUser, newData.DataId, newData.DataId, BLL.Const.ProjectSafetyManagementDataMenuId, BLL.Const.BtnAdd);
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
#endregion
}
}