Basf_TCC11/HJGL/FineUIPro.Web/PublicInfo/FileControl/DomesticStandardsView.aspx.cs

75 lines
2.8 KiB
C#

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