Basf_TCC7/HJGL/FineUIPro.Web/PublicInfo/FileControl/DomesticLawsRegulationsView...

74 lines
3.0 KiB
C#

using System;
namespace FineUIPro.Web.PublicInfo.FileControl
{
public partial class DomesticLawsRegulationsView : PageBase
{
#region
/// <summary>
/// 主键
/// </summary>
private string DomesticLawsRegulationsId
{
get
{
return (string)ViewState["DomesticLawsRegulationsId"];
}
set
{
ViewState["DomesticLawsRegulationsId"] = 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.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
/// <summary>
/// 上传附件资源
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
}
}