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