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

65 lines
2.5 KiB
C#
Raw Normal View History

2024-05-08 17:17:11 +08:00
using System;
using BLL;
namespace FineUIPro.Web.HJGL.FileControl
{
public partial class CompanyStandardsViewEdit : PageBase
{
/// <summary>
/// 主键
/// </summary>
public string CompanyStandardsId
{
get
{
return (string)ViewState["CompanyStandardsId"];
}
set
{
ViewState["CompanyStandardsId"] = 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.CompanyStandardsId = Request.Params["CompanyStandardsId"];
var CompanyStandards = BLL.HJGL_FileControl_CompanyStandardsService.GetCompanyStandardsById(this.CompanyStandardsId);
if (CompanyStandards != null)
{
this.txtCompanyStandardsCode.Text = CompanyStandards.CompanyStandardsCode;
this.txtCompanyStandardsName.Text = CompanyStandards.CompanyStandardsName;
this.txtAbstract.Text = CompanyStandards.Summary;
this.txtCompileMan.Text = CompanyStandards.CompileMan;
this.txtRemarks.Text = CompanyStandards.Remarks;
if (CompanyStandards.CompileDate != null)
{
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", CompanyStandards.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/CompanyStandards&menuId={1}&edit=0", this.CompanyStandardsId, BLL.Const.HJGLServer_CompanyStandardsMenuId)));
}
}
}