using BLL; using Microsoft.Office.Core; using System; using System.Web; namespace FineUIPro.Web.HSSE.OccupationHealth { public partial class PhysicalExaminationEdit : PageBase { #region 定义项 /// /// 主键 /// public string PersonId { get { return (string)ViewState["PersonId"]; } set { ViewState["PersonId"] = value; } } public string SitePersonId { get { return (string)ViewState["SitePersonId"]; } set { ViewState["SitePersonId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.SitePersonId = Request.Params["SitePersonId"]; var getPerson= SitePerson_PersonService.GetSitePersonById(this.SitePersonId); if (getPerson != null) { this.txtProjectName.Text = ProjectService.GetProjectNameByProjectId(getPerson.ProjectId); this.txtUnitName.Text = UnitService.GetUnitNameByUnitId(getPerson.UnitId); this.PersonId = getPerson.PersonId; this.txtCardNo.Text = getPerson.CardNo; this.txtPersonName.Text = getPerson.PersonName; } } } #endregion #region 附件上传 /// /// 上传附件 /// /// /// protected void btnAttachUrl_Click(object sender, EventArgs e) { string filePath = "FileUpLoad/PersonBaseInfo/" + DateTime.Now.ToString("yyyy-MM") + "/newfile/"; PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=" + filePath + "&menuId={1}&strParam=3", this.PersonId, BLL.Const.PersonListMenuId))); } #endregion } }