xinjiang/SGGL/FineUIPro.Web/HSSE/InformationProject/MillionsMonthlyReportView.a...

276 lines
14 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.InformationProject
{
public partial class MillionsMonthlyReportView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string MillionsMonthlyReportId
{
get
{
return (string)ViewState["MillionsMonthlyReportId"];
}
set
{
ViewState["MillionsMonthlyReportId"] = value;
}
}
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.MillionsMonthlyReportId = Request.Params["MillionsMonthlyReportId"];
if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId))
{
Model.InformationProject_MillionsMonthlyReport millionsMonthlyReport = BLL.ProjectMillionsMonthlyReportService.GetMillionsMonthlyReportById(this.MillionsMonthlyReportId);
if (millionsMonthlyReport != null)
{
this.ProjectId = millionsMonthlyReport.ProjectId;
this.txtProjectName.Text = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
if (millionsMonthlyReport.Year != null)
{
var constValue = BLL.ConstValue.GetConstByConstValueAndGroupId(millionsMonthlyReport.Year.ToString(), BLL.ConstValue.Group_0008);
if (constValue!=null)
{
this.txtYear.Text = constValue.ConstText;
}
}
if (millionsMonthlyReport.Month != null)
{
var constValue = BLL.ConstValue.GetConstByConstValueAndGroupId(millionsMonthlyReport.Month.ToString(), BLL.ConstValue.Group_0009);
if (constValue != null)
{
this.txtMonth.Text = constValue.ConstText;
}
}
//this.txtAffiliation.Text = millionsMonthlyReport.Affiliation;
//this.txtName.Text = millionsMonthlyReport.Name;
if (millionsMonthlyReport.TotalWorkNum != null)
{
this.txtTotalWorkNum.Text = Convert.ToString(millionsMonthlyReport.TotalWorkNum);
}
if (millionsMonthlyReport.PostPersonNum != null)
{
this.txtPostPersonNum.Text = Convert.ToString(millionsMonthlyReport.PostPersonNum);
}
if (millionsMonthlyReport.SnapPersonNum != null)
{
this.txtSnapPersonNum.Text = Convert.ToString(millionsMonthlyReport.SnapPersonNum);
}
if (millionsMonthlyReport.ContractorNum != null)
{
this.txtContractorNum.Text = Convert.ToString(millionsMonthlyReport.ContractorNum);
}
if (millionsMonthlyReport.SeriousInjuriesNum != null)
{
this.txtSeriousInjuriesNum.Text = Convert.ToString(millionsMonthlyReport.SeriousInjuriesNum);
}
if (millionsMonthlyReport.SeriousInjuriesPersonNum != null)
{
this.txtSeriousInjuriesPersonNum.Text = Convert.ToString(millionsMonthlyReport.SeriousInjuriesPersonNum);
}
if (millionsMonthlyReport.SeriousInjuriesLossHour != null)
{
this.txtSeriousInjuriesLossHour.Text = Convert.ToString(millionsMonthlyReport.SeriousInjuriesLossHour);
}
if (millionsMonthlyReport.MinorAccidentNum != null)
{
this.txtMinorAccidentNum.Text = Convert.ToString(millionsMonthlyReport.MinorAccidentNum);
}
if (millionsMonthlyReport.MinorAccidentPersonNum != null)
{
this.txtMinorAccidentPersonNum.Text = Convert.ToString(millionsMonthlyReport.MinorAccidentPersonNum);
}
if (millionsMonthlyReport.MinorAccidentLossHour != null)
{
this.txtMinorAccidentLossHour.Text = Convert.ToString(millionsMonthlyReport.MinorAccidentLossHour);
}
if (millionsMonthlyReport.DeathAccidentNum != null)
{
this.txtDeathAccidentNum.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentNum);
}
if (millionsMonthlyReport.DeathAccidentPersonNum != null)
{
this.txtDeathAccidentPersonNum.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentPersonNum);
}
if (millionsMonthlyReport.DeathAccidentLossHour!= null)
{
this.txtDeathAccidentLossHour.Text = Convert.ToString(millionsMonthlyReport.DeathAccidentLossHour);
}
if (millionsMonthlyReport.RestrictedWorkPersonNum != null)
{
this.txtRestrictedWorkPersonNum.Text = Convert.ToString(millionsMonthlyReport.RestrictedWorkPersonNum);
}
if (millionsMonthlyReport.RestrictedWorkLossHour != null)
{
this.txtRestrictedWorkLossHour.Text = Convert.ToString(millionsMonthlyReport.RestrictedWorkLossHour);
}
if (millionsMonthlyReport.MedicalTreatmentPersonNum != null)
{
this.txtMedicalTreatmentPersonNum.Text = Convert.ToString(millionsMonthlyReport.MedicalTreatmentPersonNum);
}
if (millionsMonthlyReport.MedicalTreatmentLossHour != null)
{
this.txtMedicalTreatmentLossHour.Text = Convert.ToString(millionsMonthlyReport.MedicalTreatmentLossHour);
}
if (millionsMonthlyReport.FireNum != null)
{
this.txtFireNum.Text = Convert.ToString(millionsMonthlyReport.FireNum);
}
if (millionsMonthlyReport.EnvironmenNum != null)
{
this.txtEnvironmenNum.Text = Convert.ToString(millionsMonthlyReport.EnvironmenNum);
}
if (millionsMonthlyReport.TrafficNum != null)
{
this.txtTrafficNum.Text = Convert.ToString(millionsMonthlyReport.TrafficNum);
}
if (millionsMonthlyReport.EquipmentNum != null)
{
this.txtEquipmentNum.Text = Convert.ToString(millionsMonthlyReport.EquipmentNum);
}
if (millionsMonthlyReport.QualityNum != null)
{
this.txtQualityNum.Text = Convert.ToString(millionsMonthlyReport.QualityNum);
}
if (millionsMonthlyReport.OtherNum != null)
{
this.txtOtherNum.Text = Convert.ToString(millionsMonthlyReport.OtherNum);
}
if (millionsMonthlyReport.FirstAidDressingsNum != null)
{
this.txtFirstAidDressingsNum.Text = Convert.ToString(millionsMonthlyReport.FirstAidDressingsNum);
}
if (millionsMonthlyReport.AttemptedEventNum != null)
{
this.txtAttemptedEventNum.Text = Convert.ToString(millionsMonthlyReport.AttemptedEventNum);
}
if (millionsMonthlyReport.LossDayNum != null)
{
this.txtLossDayNum.Text = Convert.ToString(millionsMonthlyReport.LossDayNum);
}
if (millionsMonthlyReport.InputCosts != null)
{
this.txtInputCosts.Text = Convert.ToString(millionsMonthlyReport.InputCosts);
}
if (millionsMonthlyReport.TrainNum != null)
{
this.txtTrainNum.Text = Convert.ToString(millionsMonthlyReport.TrainNum);
}
if (millionsMonthlyReport.GeneralHazardNum != null)
{
this.txtGeneralHazardNum.Text = Convert.ToString(millionsMonthlyReport.GeneralHazardNum);
}
if (millionsMonthlyReport.MajorHazardNum != null)
{
this.txtMajorHazardNum.Text = Convert.ToString(millionsMonthlyReport.MajorHazardNum);
}
if (millionsMonthlyReport.NotProofLargeProjectNum != null)
{
this.txtNotProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReport.NotProofLargeProjectNum);
}
if (millionsMonthlyReport.ProofLargeProjectNum != null)
{
this.txtProofLargeProjectNum.Text = Convert.ToString(millionsMonthlyReport.ProofLargeProjectNum);
}
if (millionsMonthlyReport.FireLicenseNum != null)
{
this.txtFireLicenseNum.Text = Convert.ToString(millionsMonthlyReport.FireLicenseNum);
}
if (millionsMonthlyReport.LimitLicenseNum != null)
{
this.txtLimitLicenseNum.Text = Convert.ToString(millionsMonthlyReport.LimitLicenseNum);
}
if (millionsMonthlyReport.HighLicenseNum != null)
{
this.txtHighLicenseNum.Text = Convert.ToString(millionsMonthlyReport.HighLicenseNum);
}
if (millionsMonthlyReport.HoistingLicenseNum != null)
{
this.txtHoistingLicenseNum.Text = Convert.ToString(millionsMonthlyReport.HoistingLicenseNum);
}
if (millionsMonthlyReport.BreakGroundLicenseNum != null)
{
this.txtBreakGroundLicenseNum.Text = Convert.ToString(millionsMonthlyReport.BreakGroundLicenseNum);
}
if (millionsMonthlyReport.ElectricityLicenseNum != null)
{
this.txtElectricityLicenseNum.Text = Convert.ToString(millionsMonthlyReport.ElectricityLicenseNum);
}
if (millionsMonthlyReport.RTLicenseNum != null)
{
this.txtRTLicenseNum.Text = Convert.ToString(millionsMonthlyReport.RTLicenseNum);
}
if (millionsMonthlyReport.NightLicenseNum != null)
{
this.txtNightLicenseNum.Text = Convert.ToString(millionsMonthlyReport.NightLicenseNum);
}
if (millionsMonthlyReport.CommissionerNum != null)
{
this.txtCommissionerNum.Text = Convert.ToString(millionsMonthlyReport.CommissionerNum);
}
if (millionsMonthlyReport.SoleDutyNum != null)
{
this.txtSoleDutyNum.Text = Convert.ToString(millionsMonthlyReport.SoleDutyNum);
}
if (!string.IsNullOrEmpty(millionsMonthlyReport.CompileMan))
{
var user = BLL.UserService.GetUserByUserId(millionsMonthlyReport.CompileMan);
if (user!=null)
{
this.txtCompileManName.Text = user.UserName;
}
}
if (millionsMonthlyReport.CompileDate != null)
{
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", millionsMonthlyReport.CompileDate);
}
}
}
///初始化审核菜单
this.ctlAuditFlow.MenuId = BLL.Const.ProjectMillionsMonthlyReportMenuId;
this.ctlAuditFlow.DataId = this.MillionsMonthlyReportId;
this.ctlAuditFlow.ProjectId = this.ProjectId;
}
}
#endregion
}
}