SGGL_JT/SUBQHSE/FineUIPro.Web/HSSE/SafetyActivities/MonthlyRatingView.aspx.cs

73 lines
2.5 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 MonthlyRatingView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
public string MonthlyRatingId
{
get
{
return (string)ViewState["MonthlyRatingId"];
}
set
{
ViewState["MonthlyRatingId"] = 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.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
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}