ZHJA_HJGL/HJGL_ZH/FineUIPro.Web/HJGL/FileControl/DomesticLawsRegulationsView...

65 lines
2.7 KiB
C#

using System;
using BLL;
namespace FineUIPro.Web.HJGL.FileControl
{
public partial class DomesticLawsRegulationsEdit : PageBase
{
/// <summary>
/// 主键
/// </summary>
public string DomesticLawsRegulationsId
{
get
{
return (string)ViewState["DomesticLawsRegulationsId"];
}
set
{
ViewState["DomesticLawsRegulationsId"] = value;
}
}
/// <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.DomesticLawsRegulationsId = Request.Params["DomesticLawsRegulationsId"];
var domesticLawsRegulations = BLL.HJGL_FileControl_DomesticLawsRegulationsService.GetDomesticLawsRegulationsById(this.DomesticLawsRegulationsId);
if (domesticLawsRegulations != null)
{
this.txtDomesticLawsRegulationsCode.Text = domesticLawsRegulations.DomesticLawsRegulationsCode;
this.txtDomesticLawsRegulationsName.Text = domesticLawsRegulations.DomesticLawsRegulationsName;
this.txtAbstract.Text = domesticLawsRegulations.Summary;
this.txtCompileMan.Text = domesticLawsRegulations.CompileMan;
this.txtRemarks.Text = domesticLawsRegulations.Remarks;
if (domesticLawsRegulations.CompileDate != null)
{
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", domesticLawsRegulations.CompileDate);
}
}
else
{
this.txtCompileMan.Text = this.CurrUser.UserName;
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
}
}
}
/// <summary>
/// 上传附件资源
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/FileControl/DomesticLawsRegulations&menuId={1}&edit=0", this.DomesticLawsRegulationsId, BLL.Const.HJGLServer_DomesticLawsRegulationsMenuId)));
}
}
}