using System; namespace FineUIPro.Web.PublicInfo.FileControl { public partial class DomesticLawsRegulationsView : PageBase { #region 定义变量 /// /// 主键 /// private string DomesticLawsRegulationsId { get { return (string)ViewState["DomesticLawsRegulationsId"]; } set { ViewState["DomesticLawsRegulationsId"] = value; } } #endregion #region 加载 /// ///加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.DomesticLawsRegulationsId = Request.Params["DomesticLawsRegulationsId"]; if (!string.IsNullOrEmpty(this.DomesticLawsRegulationsId)) { Model.FileControl_DomesticLawsRegulations domesticLawsRegulations = BLL.FileControl_DomesticLawsRegulationsService.GetDomesticLawsRegulationsById(this.DomesticLawsRegulationsId); if (domesticLawsRegulations != null) { this.txtDomesticLawsRegulationsCode.Text = domesticLawsRegulations.DomesticLawsRegulationsCode; this.txtDomesticLawsRegulationsName.Text = domesticLawsRegulations.DomesticLawsRegulationsName; this.txtAbstract.Text = domesticLawsRegulations.Abstract; if (!string.IsNullOrEmpty(domesticLawsRegulations.CompileMan)) { this.txtCompileManName.Text = BLL.Sys_UserService.GetUserNameByUserId(domesticLawsRegulations.CompileMan); } if (domesticLawsRegulations.CompileDate.HasValue) { this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", domesticLawsRegulations.CompileDate); } this.txtRemark.Text = domesticLawsRegulations.Remarks; } } } } #endregion #region 附件上传 /// /// 上传附件资源 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.DomesticLawsRegulationsId)) { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/FileControl/DomesticLawsRegulations&menuId={1}&edit=0", this.DomesticLawsRegulationsId, BLL.Const.DomesticLawsRegulationsMenuId))); } } #endregion } }