ZHJA_HJGL/HJGL_ZH/FineUIPro.Web/HJGL/FileControl/ForeignStandardsViewEdit.as...

64 lines
2.5 KiB
C#

using System;
using BLL;
namespace FineUIPro.Web.HJGL.FileControl
{
public partial class ForeignStandardsViewEdit : PageBase
{
/// <summary>
/// 主键
/// </summary>
public string ForeignStandardsId
{
get
{
return (string)ViewState["ForeignStandardsId"];
}
set
{
ViewState["ForeignStandardsId"] = 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.ForeignStandardsId = Request.Params["ForeignStandardsId"];
var ForeignStandards = BLL.HJGL_FileControl_ForeignStandardsService.GetForeignStandardsById(this.ForeignStandardsId);
if (ForeignStandards != null)
{
this.txtForeignStandardsCode.Text = ForeignStandards.ForeignStandardsCode;
this.txtForeignStandardsName.Text = ForeignStandards.ForeignStandardsName;
this.txtAbstract.Text = ForeignStandards.Summary;
this.txtCompileMan.Text = ForeignStandards.CompileMan;
this.txtRemarks.Text = ForeignStandards.Remarks;
if (ForeignStandards.CompileDate != null)
{
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ForeignStandards.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/ForeignStandards&menuId={1}&edit=0", this.ForeignStandardsId, BLL.Const.HJGLServer_ForeignStandardsMenuId)));
}
}
}