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 MonthlyRatingView : PageBase { #region 定义项 /// /// 主键 /// public string MonthlyRatingId { get { return (string)ViewState["MonthlyRatingId"]; } set { ViewState["MonthlyRatingId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.MonthlyRatingId = Request.Params["MonthlyRatingId"]; if (!string.IsNullOrEmpty(this.MonthlyRatingId)) { var MonthlyRating = BLL.MonthlyRatingService.GetMonthlyRatingById(this.MonthlyRatingId); if (MonthlyRating != null) { this.txtTitle.Text = MonthlyRating.Title; this.txtActivitiesDate.Text = string.Format("{0:yyyy-MM-dd HH:mm}", MonthlyRating.ActivitiesDate); this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", MonthlyRating.EndTime); // this.txtRemark.Text = MonthlyRating.Remark; this.txtSeeFile.Text = HttpUtility.HtmlDecode(MonthlyRating.SeeFile); this.txtPersonCount.Text = MonthlyRating.PersonCount.ToString(); } } } } #endregion #region 附件上传 /// /// 上传附件 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.MonthlyRatingId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/MonthlyRatingAttachUrl&menuId={1}&type=-1", MonthlyRatingId, BLL.Const.ProjectMonthlyRatingMenuId))); } } #endregion } }