/// <summary> /// 初始化 /// </summary> private void DataInit(string id) { EyouSoft.BLL.GovStructure.BArchives BLL = new EyouSoft.BLL.GovStructure.BArchives(); EyouSoft.Model.GovStructure.MGovFile Model = BLL.GetArchivesModel(id); if (null == Model) { return; } /*1.基本信息*/ this.lbName.Text = Model.Name; //头部姓名 this.lbName_.Text = Model.Name; //姓名 this.lbNum.Text = Model.FileNumber; //档案编号 this.lbSex.Text = Convert.ToString(Model.Sex); //性别 if (!string.IsNullOrEmpty(Model.StaffPhoto)) { this.lbImg.Text = String.Format("<img src='{0}' width='100' heigth='150'/>", Model.StaffPhoto);//照片 } else { this.lbImg.Text = " 暂无照片"; } this.lbIDCard.Text = Model.IDNumber; //身份证号 this.lbBirth.Text = string.Format("{0:yyyy-MM-dd}", Model.BirthDate); //出生年月 //部门 this.lbSection.Text = Model.DepartName; //职务信息 IList <MGovFilePosition> postionLst = Model.GovFilePositionList; if (null != postionLst && postionLst.Count > 0) { StringBuilder strPositionName = new StringBuilder(); StringBuilder strPositionId = new StringBuilder(); foreach (MGovFilePosition m in postionLst) { strPositionName.Append(m.Title + ","); } this.lbDuty.Text = strPositionName.Length > 0 ? strPositionName.ToString().Substring(0, strPositionName.Length - 1) : ""; //职务名 } this.lbType.Text = Convert.ToString(Model.StaffType); //类型 this.lbState.Text = Convert.ToString(Model.StaffStatus); //员工状态 this.lbJoinTime.Text = string.Format("{0:yyyy-MM-dd}", Model.EntryTime); //入职时间 this.lbWorkAge.Text = Convert.ToString(Model.LengthService); //工龄 this.lbNation.Text = Model.Nation; //民族 this.lbNativePlace.Text = Model.Birthplace; //籍贯 this.lbFace.Text = Model.PoliticalFace; //政治面貌 this.lbWedState.Text = Model.IsMarriage ? "已婚" : "未婚"; //婚姻状态 this.lbTel.Text = Model.Contact; //电话 this.lbMobile.Text = Model.Mobile; //手机 if (Model.StaffStatus == EyouSoft.Model.EnumType.GovStructure.StaffStatus.离职) { EyouSoft.BLL.GovStructure.BGovFilePersonnel leaveBLL = new EyouSoft.BLL.GovStructure.BGovFilePersonnel(); EyouSoft.Model.GovStructure.MGovFilePersonnel leaveModel = leaveBLL.GetGovFilePersonnelModelByFileId(id); if (null != leaveModel) { this.lbLeave.Text = String.Format("离职时间:{0:yyyy-MM-dd}", leaveModel.DepartureTime); } } this.lbQQ.Text = Model.qq; //qq this.lbMsn.Text = Model.Msn; //msn this.lbEmail.Text = Model.Email; //email this.lbPlace.Text = Model.Address; //住 址 this.lbRemark.Text = Model.Remarks; //备注 /*2.家庭关系*/ IList <MGovFilehome> homeLst = Model.GovFilehomeList; if (null != homeLst && homeLst.Count > 0) { this.RepRation.DataSource = homeLst; this.RepRation.DataBind(); } else { this.RepRation.Controls.Add(new Label() { Text = "<tr><td colspan='5' align='center'>暂无相关数据!</td></tr>" }); } /*3.学历信息*/ IList <MGovFileEducation> schoolLst = Model.GovFileEducationList; if (null != schoolLst && schoolLst.Count > 0) { this.RepSchool.DataSource = schoolLst; this.RepSchool.DataBind(); } else { this.RepSchool.Controls.Add(new Label() { Text = "<tr><td colspan='7' align='center'>暂无相关数据!</td></tr>" }); } /*4.履历信息*/ IList <MGovFileCurriculum> workLst = Model.GovFileCurriculumList; if (null != workLst && workLst.Count > 0) { this.RepWork.DataSource = workLst; this.RepWork.DataBind(); } else { this.RepWork.Controls.Add(new Label() { Text = "<tr><td colspan='6' align='center'>暂无相关数据!</td></tr>" }); } /*5.劳动合同*/ IList <MGovFileContract> packLst = Model.GovFileContractList; if (null != packLst && packLst.Count > 0) { this.rpt_Contact.DataSource = packLst; this.rpt_Contact.DataBind(); } else { this.rpt_Contact.Controls.Add(new Label() { Text = "<tr><td colspan='6' align='center'>暂无相关数据!</td></tr>" }); } }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id, string doType) { #region 用户控件初始化 this.HrSelect1.ParentIframeID = Utils.GetQueryStringValue("iframeId"); this.HrSelect1.SetTitle = "部门主管"; this.uc_Head.CompanyID = this.SiteUserInfo.CompanyId; this.uc_Foot.CompanyID = this.SiteUserInfo.CompanyId; this.uc_Temp.CompanyID = this.SiteUserInfo.CompanyId; this.uc_Seal.CompanyID = this.SiteUserInfo.CompanyId; #endregion BComDepartment BLL = new BComDepartment(); //根据编辑传过来的编号获取部门信息实体 MComDepartment Model = BLL.GetModel(Utils.GetInt(id), this.SiteUserInfo.CompanyId); if (doType == "update") { if (null != Model) { //部门名称 this.txtDepartName.Text = Model.DepartName; //部门编号 this.hidDepartId.Value = Model.DepartId.ToString(); //联系电话 this.txtContact.Text = Model.Contact; //传真 this.txtFaxa.Text = Model.Fax; //备注 this.txtRemark.Text = Model.Remarks; string strDel = "<span class='upload_filename'><a href='{0}' target='_blank'>查看</a><a href=\"javascript:void(0)\" onclick=\"PageJsData.DelFile(this)\" title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hide_{1}\" value=\"{0}\"/></span>"; if (!string.IsNullOrEmpty(Model.PrintHeader)) { //页眉 this.lbTxtHead.Text = string.Format(strDel, Model.PrintHeader, "head"); } if (!string.IsNullOrEmpty(Model.PrintFooter)) { //页脚 this.lbTxtFoot.Text = string.Format(strDel, Model.PrintFooter, "foot"); } if (!string.IsNullOrEmpty(Model.PrintTemplates)) { //模板 this.lbTxtTemp.Text = string.Format(strDel, Model.PrintTemplates, "temp"); } if (!string.IsNullOrEmpty(Model.Seal)) { //公章 this.lbTxtSeal.Text = string.Format(strDel, Model.Seal, "seal"); } //部门主管编号 this.HrSelect1.HrSelectID = Model.DepartHead; //this.HrSelect1.HrSelectName = Model.DepartHead; MComDepartment ModelPart = BLL.GetModel(Model.PrevDepartId, Model.CompanyId); if (ModelPart != null) { //上级部门名称和编号 this.txtUpSection.Text = ModelPart.DepartName; this.hidupsectionId.Value = ModelPart.DepartId.ToString(); } else { this.txtUpSection.Text = "股东会"; } //通过部门主管编号获取人事档案信息实体 EyouSoft.BLL.GovStructure.BArchives BLLManager = new EyouSoft.BLL.GovStructure.BArchives(); EyouSoft.Model.GovStructure.MGovFile ModelManager; ModelManager = BLLManager.GetArchivesModel(Model.DepartHead); if (ModelManager != null) { this.HrSelect1.HrSelectName = ModelManager.Name; this.HrSelect1.HrSelectID = ModelManager.ID; } } else { this.txtUpSection.Text = "股东会"; } } else { if (Model != null) { this.txtUpSection.Text = Model.DepartName; this.hidupsectionId.Value = Model.DepartId.ToString(); } else { this.txtUpSection.Text = "股东会"; this.hidupsectionId.Value = "0"; } } }