1
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.Check
|
||||
{
|
||||
public partial class HSECertificateView : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string HSECertificateId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["HSECertificateId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["HSECertificateId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
private string AttachUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["AttachUrl"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["AttachUrl"] = 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();
|
||||
UnitService.InitUnitNameByProjectIdUnitTypeDropDownList(this.dpObtainUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
|
||||
|
||||
this.HSECertificateId = Request.Params["HSECertificateId"];
|
||||
if (!string.IsNullOrEmpty(this.HSECertificateId))
|
||||
{
|
||||
Model.Check_HSECertificate hseCertificate = BLL.HSECertificateService.GetHSECertificateById(this.HSECertificateId);
|
||||
if (hseCertificate != null)
|
||||
{
|
||||
this.txtHSECertificateCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.HSECertificateId);
|
||||
this.txtHSECertificateName.Text = hseCertificate.HSECertificateName;
|
||||
this.AttachUrl = hseCertificate.AttachUrl;
|
||||
this.txtHSECertificateContent.Text = hseCertificate.HSECertificateContent;
|
||||
this.txtObtainMan.Text = hseCertificate.ObtainMan;
|
||||
this.dpObtainUnit.SelectedValue = hseCertificate.ObtainUnit;
|
||||
//this.divFile.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.AttachUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件上传
|
||||
/// <summary>
|
||||
/// 上传附件资源
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUploadResources_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.HSECertificateId))
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HSECertificate&menuId=9A034CAD-C7D5-4DE4-9FF5-828D35FFEE28", this.HSECertificateId)));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user