using BLL; using System; using System.Data; using System.Linq; namespace FineUIPro.Web.HSSE.Examine { public partial class StaffHSEInfoArchives : PageBase { #region 定义项 /// /// 人员主键 /// public string PersonId { get { return (string)ViewState["PersonId"]; } set { ViewState["PersonId"] = value; } } /// /// 人员主键 /// public string UserId { get { return (string)ViewState["UserId"]; } set { ViewState["UserId"] = value; } } /// /// 项目id /// public string ProjectId { get { return (string)ViewState["ProjectId"]; } set { ViewState["ProjectId"] = value; } } /// /// 单位id /// public string UnitId { get { return (string)ViewState["UnitId"]; } set { ViewState["UnitId"] = value; } } /// /// 人员身份证 /// public string IdentityCard { get { return (string)ViewState["IdentityCard"]; } set { ViewState["IdentityCard"] = value; } } #endregion #region 加载页面 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.ProjectId = this.CurrUser.LoginProjectId; if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId) { this.ProjectId = Request.Params["projectId"]; } this.PersonId = Request.Params["PersonId"]; var lstYesr = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); this.drpYear.DataTextField = "ConstText"; this.drpYear.DataValueField = "ConstValue"; this.drpYear.DataSource = lstYesr.OrderByDescending(x => x.SortIndex); this.drpYear.DataBind(); this.drpYear.SelectedValue = DateTime.Now.Year.ToString(); var personInfo = PersonService.GetPersonInfoById(this.PersonId); if (personInfo != null) { this.txtPersonName.Text = personInfo.PersonName; this.txtIdentityCard.Text = personInfo.IdentityCard; this.txtUnitName.Text = personInfo.UnitName; //this.txtPostTrainingRoleName.Text = personInfo.PostTrainingRoleName; this.txtWorkPostName.Text = personInfo.WorkPostName; this.txtPoliticsStatusName.Text = personInfo.PoliticsStatusName; } this.BindGrid(); } } /// /// 查询 /// /// /// protected void btnSearch_Click(object sender, EventArgs e) { this.BindGrid(); } public DataTable GridTable = new DataTable(); /// /// 绑定数据 /// private void BindGrid() { } #endregion } }