196 lines
8.3 KiB
C#
196 lines
8.3 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace FineUIPro.Web.HSSE.Solution
|
|
{
|
|
public partial class LargerHazardView : PageBase
|
|
{
|
|
#region 定义变量
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public string HazardId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["HazardId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["HazardId"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 加载页面
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
this.HazardId = Request.Params["HazardId"];
|
|
var largerHazard = BLL.LargerHazardService.GetLargerHazardByHazardId(this.HazardId);
|
|
if (largerHazard != null)
|
|
{
|
|
this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.HazardId);
|
|
this.drpApprovalState.SelectedValue = largerHazard.ApprovalState;
|
|
if (!string.IsNullOrEmpty(largerHazard.HazardType))
|
|
{
|
|
this.txtHazardType.Text = ConstValue.drpConstItemList(ConstValue.Group_LargerHazardType).FirstOrDefault(x => x.ConstValue == largerHazard.HazardType).ConstText;
|
|
}
|
|
this.txtAddress.Text = largerHazard.Address;
|
|
if (largerHazard.ExpectedTime != null)
|
|
{
|
|
this.txtExpectedTime.Text = string.Format("{0:yyyy-MM-dd}", largerHazard.ExpectedTime);
|
|
}
|
|
if (largerHazard.RecordTime != null)
|
|
{
|
|
this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}", largerHazard.RecordTime);
|
|
}
|
|
if (largerHazard.IsArgument == true)
|
|
{
|
|
this.txtIsArgument.Text = "是";
|
|
}
|
|
else
|
|
{
|
|
this.txtIsArgument.Text = "否";
|
|
}
|
|
if (largerHazard.IsSuperLargerHazard == true)
|
|
{
|
|
this.txtIsSuperLargerHazard.Text = "是";
|
|
}
|
|
else
|
|
{
|
|
this.txtIsSuperLargerHazard.Text = "否";
|
|
}
|
|
if (largerHazard.TrainPersonNum != null)
|
|
{
|
|
this.txtTrainPersonNum.Text = largerHazard.TrainPersonNum.ToString();
|
|
}
|
|
this.drpStates.SelectedValue = largerHazard.States;
|
|
this.txtDescriptions.Text = largerHazard.Descriptions;
|
|
this.txtRemark.Text = HttpUtility.HtmlDecode(largerHazard.Remark);
|
|
txtHazardName.Text = largerHazard.HazardName;
|
|
}
|
|
///初始化审核菜单
|
|
this.ctlAuditFlow.MenuId = BLL.Const.ProjectLargerHazardListMenuId;
|
|
this.ctlAuditFlow.DataId = this.HazardId;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 附件上传
|
|
|
|
///// <summary>
|
|
///// 上传附件
|
|
///// </summary>
|
|
///// <param name="sender"></param>
|
|
///// <param name="e"></param>
|
|
//protected void btnAttachUrl_Click(object sender, EventArgs e)
|
|
//{
|
|
// if (!string.IsNullOrEmpty(this.HazardId))
|
|
// {
|
|
// PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId, BLL.Const.ProjectLargerHazardListMenuId)));
|
|
// }
|
|
//}
|
|
|
|
/// <summary>
|
|
/// 上传审批页
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl1_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "1", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传会签页
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl2_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "2", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传方案内容
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl3_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazardWord&menuId={1}&type=-1", this.HazardId + "3", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传专项培训
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl4_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "4", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传安全技术交底
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl5_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "5", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传旁站
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl6_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "6", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传验收
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl7_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "7", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传监测
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl8_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "8", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
|
|
/// <summary>
|
|
/// 上传隐患
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl9_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/LargerHazard&menuId={1}&type=-1", this.HazardId + "9", BLL.Const.ProjectLargerHazardListMenuId)));
|
|
}
|
|
#endregion
|
|
|
|
}
|
|
} |