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 QualityMonthView : PageBase { #region 定义项 /// /// 主键 /// public string QualityMonthId { get { return (string)ViewState["QualityMonthId"]; } set { ViewState["QualityMonthId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.QualityMonthId = Request.Params["QualityMonthId"]; if (!string.IsNullOrEmpty(this.QualityMonthId)) { Model.SafetyActivities_QualityMonth QualityMonth = BLL.QualityMonthService.GetQualityMonthById(this.QualityMonthId); if (QualityMonth != null) { this.txtTitle.Text = QualityMonth.Title; this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", QualityMonth.CompileDate); this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", QualityMonth.EndTime); this.txtRemark.Text = QualityMonth.Remark; this.txtSeeFile.Text = HttpUtility.HtmlDecode(QualityMonth.SeeFile); this.txtCompileMan.Text = BLL.UserService.GetUserNameByUserId(QualityMonth.CompileMan); } } } } #endregion #region 附件上传 /// /// 上传附件 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.QualityMonthId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/QualityMonthAttachUrl&menuId={1}&type=-1", QualityMonthId, BLL.Const.ProjectQualityMonthMenuId))); } } #endregion } }