using System; namespace FineUIPro.Web.ZHGL.ProjectAccident { public partial class AccidentStatisticsView :PageBase { /// /// 主键 /// public string AccidentStatisticsId { get { return (string)ViewState["AccidentStatisticsId"]; } set { ViewState["AccidentStatisticsId"] = value; } } /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.AccidentStatisticsId = Request.Params["AccidentStatisticsId"]; var accidentStatistics = BLL.AccidentStatisticsService.GetAccidentStatisticsById(this.AccidentStatisticsId); if (accidentStatistics != null) { this.txtPerson.Text = accidentStatistics.Person; if (accidentStatistics.CompileDate != null) { this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", accidentStatistics.CompileDate); } this.ddlUnitId.Text = BLL.UnitService.GetUnitNameByUnitId(accidentStatistics.UnitId); this.ddlProjectId.Text = BLL.ProjectService.GetProjectNameByProjectId(accidentStatistics.ProjectId); this.txtTreatment.Text = accidentStatistics.Treatment; } ///初始化审核菜单 this.ctlAuditFlow.MenuId = BLL.Const.ServerAccidentStatisticsMenuId; this.ctlAuditFlow.DataId = this.AccidentStatisticsId; this.ctlAuditFlow.ProjectId = this.CurrUser.LoginProjectId; this.ctlAuditFlow.UnitId = this.CurrUser.UnitId; } } /// /// 上传附件资源 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/ProjectAccident&type= -1", this.AccidentStatisticsId))); } } }