SGGL_JT/SUBQHSE/FineUIPro.Web/HSSE/SafetyActivities/ThreeYearsOfTacklingTheRoot...

73 lines
3.0 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.HSSE.SafetyActivities
{
public partial class ThreeYearsOfTacklingTheRootCauseView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string ThreeYearsOfTacklingTheRootCauseId
{
get
{
return (string)ViewState["ThreeYearsOfTacklingTheRootCauseId"];
}
set
{
ViewState["ThreeYearsOfTacklingTheRootCauseId"] = 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.ThreeYearsOfTacklingTheRootCauseId = Request.Params["ThreeYearsOfTacklingTheRootCauseId"];
if (!string.IsNullOrEmpty(this.ThreeYearsOfTacklingTheRootCauseId))
{
Model.SafetyActivities_ThreeYearsOfTacklingTheRootCause ThreeYearsOfTacklingTheRootCause = BLL.ThreeYearsOfTacklingTheRootCauseService.GetThreeYearsOfTacklingTheRootCauseById(this.ThreeYearsOfTacklingTheRootCauseId);
if (ThreeYearsOfTacklingTheRootCause != null)
{
this.txtTitle.Text = ThreeYearsOfTacklingTheRootCause.Title;
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", ThreeYearsOfTacklingTheRootCause.CompileDate);
this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", ThreeYearsOfTacklingTheRootCause.EndTime);
this.txtRemark.Text = ThreeYearsOfTacklingTheRootCause.Remark;
this.txtSeeFile.Text = HttpUtility.HtmlDecode(ThreeYearsOfTacklingTheRootCause.SeeFile);
this.txtCompileMan.Text = BLL.UserService.GetUserNameByUserId(ThreeYearsOfTacklingTheRootCause.CompileMan);
}
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.ThreeYearsOfTacklingTheRootCauseId))
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ThreeYearsOfTacklingTheRootCauseAttachUrl&menuId={1}&type=-1", ThreeYearsOfTacklingTheRootCauseId, BLL.Const.ProjectThreeYearsOfTacklingTheRootCauseMenuId)));
}
}
#endregion
}
}