public void bindjob() { DataTable dt; WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + WX.Request.rUserId + "'"); if (intojob != null) { dt = WX.Model.DutyDetail.GetTableDepartent(ddlDepartment.SelectedValue); } else { WX.Model.User.MODEL user = WX.Request.rUser; dt = WX.Model.DutyDetail.GetTablenullDepartent(this.ddlDepartment.SelectedValue, user.RealName.ToString()); } this.ui_jobname.DataSource = dt; this.ui_jobname.DataTextField = "Name"; this.ui_jobname.DataValueField = "ID"; this.ui_jobname.DataBind(); if (this.ui_jobname.Items.Count == 0) { Button1.Enabled = false; } else { Button1.Enabled = true; } }
private void pageinit() { WX.HR.LeaveJob.MODEL LeaveJob = null; string userId = WX.Request.rUserId; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); LeaveJob = WX.HR.LeaveJob.GetModel("select top 1 * from HR_LeaveJobs where UserID='" + userId + "' order by Addtime desc"); if (LeaveJob != null) { ui_reason.Text = LeaveJob.reason.ToString(); ui_days.Text = LeaveJob.days.ToString(); ui_lasttime.Text = Convert.ToDateTime(LeaveJob.lasttime.ToString()).ToString("yyyy-MM-dd"); ui_dempop.Text = LeaveJob.dempOpinion.ToString(); ui_dempuser.Value = LeaveJob.dempManager.ToString(); li_dempname.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.dempManager.ToString()); ui_adminop.Text = LeaveJob.financialOpinion.ToString(); ui_financialHandleManager.Value = LeaveJob.financialHandleManager.ToString(); li_financialHandleManagername.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.financialHandleManager.ToString()); ui_adminuser.Value = LeaveJob.financialManager.ToString(); li_adminname.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.financialManager.ToString()); ui_hrop.Text = LeaveJob.hrOpinion.ToString(); ui_hruser.Value = LeaveJob.hrManager.ToString(); li_hrname.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.hrManager.ToString()); ui_bossop.Text = LeaveJob.bossOpinion.ToString(); ui_bossuser.Value = LeaveJob.bossManager.ToString(); li_bossname.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.bossManager.ToString()); li_addtime.Text = ((DateTime)LeaveJob.Addtime.value).ToString("yyyy-MM-dd"); } else { li_addtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); } Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; MenuBar1.Param2 = employee.LoadSucceed || true?usermodel.State.ToString() : "0"; if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); ui_demp.SelectedValue = usermodel.DepartmentID.ToString(); bindjob(); ui_duty.SelectedValue = usermodel.DutyId.ToString(); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + userId + "'"); if (intojob == null) { Response.Redirect("HR_AddIntojobs.aspx?UserID=" + WX.Request.rUserId); } li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_sqrname.Text = usermodel.RealName.ToString(); if (usermodel.State.ToString() == "40" && LeaveJob != null) { Button1.Enabled = false; } } }
private void pageinit() { string userId = WX.Request.rUserId; WX.HR.TransferKong.MODEL tfk = null; Literal1.Text = Request["type"] == "1" ? "调岗" : "升职"; li_center.Text = Request["type"] == "1" ? "调动" : "提升"; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp2, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList1, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList2, null, null, null); if (Request["id"] != null && Request["id"] != "") { tfk = WX.HR.TransferKong.GetModel("select * from HR_TransferKong where id='" + Request["id"] + "'"); if (tfk != null) { ui_demp.SelectedValue = tfk.BackDempID.ToString(); ui_demp2.SelectedValue = tfk.NowDempID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = tfk.BackDutyID.ToString(); ui_duty2.SelectedValue = tfk.NowDutyID.ToString(); DropDownList1.SelectedValue = tfk.BackGrade.ToString(); DropDownList2.SelectedValue = tfk.NowGrade.ToString(); ui_dempop.Text = tfk.dempOpinion.ToString(); ui_dempuser.Value = tfk.dempManager.ToString(); li_dempname.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.dempManager.ToString()); ui_hrop.Text = tfk.hrOpinion.ToString(); ui_hruser.Value = tfk.hrManager.ToString(); li_hrname.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.hrManager.ToString()); ui_bossop.Text = tfk.bossOpinion.ToString(); ui_bossuser.Value = tfk.bossManager.ToString(); li_bossname.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.bossManager.ToString()); li_addtime.Text = ((DateTime)tfk.Addtime.value).ToString("yyyy-MM-dd"); Button1.Enabled = false; Literal1.Text = tfk.type.ToString() == "1" ? "调岗" : "升职"; li_center.Text = tfk.type.ToString() == "1" ? "调动" : "提升"; } } else { li_addtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); } Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; MenuBar1.Param2 = employee.LoadSucceed || true?usermodel.State.ToString() : "0"; if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); } catch { } li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); if (tfk == null) { ui_demp.SelectedValue = ui_demp2.SelectedValue = usermodel.DepartmentID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = ui_duty2.SelectedValue = usermodel.DutyId.ToString(); DropDownList1.SelectedValue = DropDownList2.SelectedValue = usermodel.Grade.ToString(); } WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + userId + "'"); if (intojob == null) { Response.Redirect("HR_AddIntojobs.aspx?uid=" + Request["uid"]); } li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_Prof.Text = employee.Prof.ToString(); li_fl.Text = employee.ForeignL.ToString(); } }
private void pageinit() { WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp2, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList1, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList2, null, null, null); WX.HR.TransferKong.MODEL tfk = WX.HR.TransferKong.NewDataModel(Request["TFID"]); if (tfk != null) { ui_dempop.Text = ""; ui_demp.SelectedValue = tfk.BackDempID.ToString(); ui_demp2.SelectedValue = tfk.NowDempID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = tfk.BackDutyID.ToString(); ui_duty2.SelectedValue = tfk.NowDutyID.ToString(); DropDownList1.SelectedValue = tfk.BackGrade.ToString(); DropDownList2.SelectedValue = tfk.NowGrade.ToString(); li_addtime.Text = ((DateTime)tfk.Addtime.value).ToString("yyyy-MM-dd"); li_center.Text = tfk.type.ToString() == "1" ? "调动" : "提升"; li_dept.Text = tfk.dempOpinion.ToString(); Text_dept.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.dempManager.ToString()); li_hr.Text = tfk.hrOpinion.ToString(); Text_hr.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.hrManager.ToString()); li_boss.Text = tfk.bossOpinion.ToString(); Text_boss.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.bossManager.ToString()); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + tfk.UserID.ToString() + "'"); try { li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); } catch { } Employee.MODEL employee = WX.Model.Employee.GetModelToID(tfk.UserID.ToString()); WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(tfk.UserID.ToString()); if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); } catch { } li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); if (tfk == null) { ui_demp.SelectedValue = ui_demp2.SelectedValue = usermodel.DepartmentID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = ui_duty2.SelectedValue = usermodel.DutyId.ToString(); DropDownList1.SelectedValue = DropDownList2.SelectedValue = usermodel.Grade.ToString(); } li_Prof.Text = employee.Prof.ToString(); li_fl.Text = employee.ForeignL.ToString(); } if (tfk.bossManager.value == null) { bool flag = false; if (tfk.dempManager.ToString() == "") { li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32())); if (WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32()) == WX.Main.CurUser.UserID) //部门主管 { flag = true; } Literal1.Text = "部门"; } else if (tfk.hrManager.ToString() == "")//人力资源部 { tr_dept.Visible = true; li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetHRUserID); if (WX.CommonUtils.GetHRUserID == WX.Main.CurUser.UserID) { ui_demp2.Enabled = ui_duty2.Enabled = DropDownList2.Enabled = flag = true; } Literal1.Text = "人资(行政)部"; } else if (tfk.bossManager.ToString() == "")//中心领导 { tr_dept.Visible = tr_HR.Visible = true; li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetBossUserID); if (WX.CommonUtils.GetBossUserID == WX.Main.CurUser.UserID) { flag = true; } Literal1.Text = "中心领导"; } Button1.Enabled = flag; } else { tr_dept.Visible = tr_HR.Visible = tr_boss.Visible = true; tr_sub.Visible = tr_sub2.Visible = false; } if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%HR_SignTransferKong.aspx?TFID={1}%'", WX.Main.CurUser.UserID, Request["TFID"])); } } }
private void pageinit() { //1.validate user data string userId = WX.Request.rUserId; //2.init controls WX.Data.Dict.BindListCtrl_DeptList(this.ddlDepartment, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList1, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList2, null, null, null); //3.如果已经入职,则不能再入职 //4.显示用户档案信息 Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; MenuBar1.Param2 = usermodel.State.ToString() != "" ? usermodel.State.ToString() : "0"; if (employee != null) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = (DateTime.Now.Year - ((DateTime)employee.Birthday.value).Year).ToString(); } catch { } li_edu.Text = employee.Edu.ToString(); li_ForeignL.Text = employee.ForeignL.ToString(); li_Rating.Text = employee.Rating.ToString(); li_Ethnic.Text = employee.Ethnic.ToString(); li_Marital.Text = employee.Marital.ToString() == "0" ? "未婚" : "已婚"; li_Health.Text = employee.Health.ToString(); string[] addarry = employee.Address.ToString().Split('|'); if (addarry.Length > 1) { li_jg.Text = addarry[1]; li_hjd.Text = addarry[2]; } li_IDCard.Text = employee.IDCard.ToString(); li_Mobile.Text = employee.Mobile.ToString(); if (!employee.UserFace.isEmpty) { this.li_face.Text = "<img id=\"preZoomImage\" src=\"" + (employee.UserFace.ToString()) + "\" alt=\"\" style=\"width: 100%; height: 100%; \" />"; } else { this.li_face.Text = "<img id=\"preZoomImage\" src=\"/Images/nophoto.gif\" alt=\"\" style=\"width: 99%; height: 99%;\" />"; } li_left.Text = getxmlString("Priv-Skill", employee.Skill.ToString(), "个人技能") + getxmlString("Priv-Edu", employee.Education.ToString(), "教育经历") + getxmlString("Priv-Work", employee.Work.ToString(), "工作经历") + getxmlString("Priv-Family", employee.Family.ToString(), "家庭成员"); li_linkman.Text = getxmlString("Priv-UrgentLink", employee.UrgentLink.ToString(), "紧急联系人"); ListItem li = ddlDepartment.Items.FindByValue(employee.DepartmentID.ToString()); li_dept.Text = li != null ? li.Text : ""; WX.Model.DutyDetail.MODEL dutydetail; if (!employee.DutyId.isEmpty) { dutydetail = WX.Model.DutyDetail.GetModel("select * from TE_DutyDetail where ID=" + employee.DutyId.ToString()); li_duty.Text = dutydetail != null?dutydetail.Name.ToString() : ""; } li_salary.Text = employee.Salary.ToString(); } WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + userId + "'"); ui_addtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); if (intojob != null) { ddlDepartment.SelectedValue = intojob.deptid.ToString(); bindjob(); userId = intojob.UserID.ToString(); ui_jobname.SelectedValue = intojob.jobsname.ToString(); DropDownList1.SelectedValue = intojob.salary.ToString(); DropDownList2.SelectedValue = intojob.PSalary.ToString(); ui_content.Text = intojob.dempOpinion.ToString(); ui_addtime.Text = Convert.ToDateTime(intojob.Addtime.value).ToString("yyyy-MM-dd"); li_SignUserID.Text = WX.CommonUtils.GetRealNameListByUserIdList(intojob.SignUserID.ToString()); } else { ddlDepartment.SelectedValue = employee.DepartmentID.ToString(); li_SignUserID.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.Main.CurUser.UserID); bindjob(); } Button1.Enabled = ddlDepartment.Enabled = FileUpload1.Visible = ImageButton1.Visible = GridView1.Columns[1].Visible = usermodel.State.ToInt32() >= 10 ? false : true; try { if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%HR_AddIntojobs.aspx?UserID={1}%'", WX.Main.CurUser.UserID, WX.Request.rUserId)); } } catch { } ContractBind(); }
protected void Button1_Click(object sender, EventArgs e) { //1.validate user data string userId = WX.Request.rUserId; //2.入职手续 WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.NewDataModel(); intojob.UserID.value = userId; intojob.Addtime.value = DateTime.Now; try { intojob.Addtime.value = ui_addtime.Text.Trim(); } catch { } intojob.jobsname.value = ui_jobname.SelectedValue; intojob.deptid.value = ddlDepartment.SelectedValue; intojob.salary.value = DropDownList1.SelectedValue; intojob.PSalary.value = DropDownList2.SelectedValue; intojob.dempOpinion.value = ui_content.Text + "(" + DateTime.Now + ")"; //intojob.GradeID.value = ui_grade.SelectedValue; intojob.SignUserID.value = WX.Main.CurUser.UserID; int jobid = intojob.Insert(true); WX.Model.User.MODEL usermodel = WX.Request.rUser; WX.Model.DutyDetail.MODEL dutydetail = WX.Model.DutyDetail.GetModel(Convert.ToInt32(ui_jobname.SelectedValue)); //3.更新用户职务状态 usermodel.State.value = 10; usermodel.CompanyID.value = WX.Main.DefaultCompanyId; usermodel.DepartmentID.set(ddlDepartment.SelectedValue); usermodel.DutyId.set(ui_jobname.SelectedValue); usermodel.ArchiveBySelf.value = 0; usermodel.Grade.value = DropDownList1.SelectedValue; usermodel.Update(); WX.Main.ExcuteUpdate("aspnet_Membership", "IsLockedOut=0", "UserID='" + usermodel.UserID.ToString() + "'"); ULCode.QDA.XDataTable xdt = ULCode.QDA.XSql.GetXDataTable("select RealName from TU_Users where DutyId=" + dutydetail.ID.ToString() + " and State>6 and State<40"); dutydetail.UsersName.value = xdt.ToColValueList(",", 0); if (dutydetail.UsersName.ToString() != "") { dutydetail.UsersName.value = dutydetail.UsersName.ToString() + ","; dutydetail.Update(); } //4.入职日志 WX.HR.DutyLog.MODEL log = WX.HR.DutyLog.NewDataModel(); log.UserID.value = userId; log.NowDutyID.value = usermodel.DutyId.value; log.NowDempID.value = usermodel.DepartmentID.value; log.Backtableid.value = 0; log.Backcolumid.value = jobid; log.Starttime.value = DateTime.Now; log.GradeID.value = dutydetail.GradeID.value; log.Content.value = "新员工入职"; WX.HR.DutyLog.MODEL backlog = WX.HR.DutyLog.GetModel("select top 1 * from HR_DutyLogs where UserID='" + userId + "' order by Starttime desc"); if (backlog != null) { backlog.stoptime.value = DateTime.Now; backlog.Nowtableid.value = 0; backlog.Nowcolumid.value = jobid; backlog.Update(); } log.Insert(); //办理完入职1、向部门发送人员入职通知 WX.Main.MessageSend(usermodel.RealName.ToString() + "已办理入职," + WX.CommonUtils.GetDeptNameListByDeptIdList(usermodel.DepartmentID.ToString()) + "接收——入职通知", "/Manage/Main/messagelist.aspx", WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32()), WX.Main.CurUser.UserID, 8, 0); //2、向人资发送入职通知并提醒签合同、办保险 WX.Main.MessageSend(usermodel.RealName.ToString() + "已办理入职——入职通知", "/Manage/Main/messagelist.aspx", WX.CommonUtils.GetHRUserID, WX.Main.CurUser.UserID, 8, 0); //3、向综管发送通知提示配备办公用品 WX.Main.MessageSend("<a href=/Manage/Assets/Ass_AddConsuming.aspx?UserID=" + usermodel.UserID.ToString() + "&mes=1>" + WX.CommonUtils.GetDeptNameListByDeptIdList(usermodel.DepartmentID.ToString()) + "新来同事" + usermodel.RealName.ToString() + ",请配备办公用品——入职通知</a>", "/Manage/Main/messagelist.aspx", WX.CommonUtils.GetCAUserID, WX.Main.CurUser.UserID, 8, 0); //4、向财务发送通知提示办理工资卡 WX.Main.MessageSend("<a href=/Manage/Finance/FD_NewUserList.aspx?mes=1>" + WX.CommonUtils.GetDeptNameListByDeptIdList(usermodel.DepartmentID.ToString()) + "新来同事" + usermodel.RealName.ToString() + ",请办理工资卡等相关工作——入职通知</a>", "/Manage/Main/messagelist.aspx", WX.CommonUtils.GetFDUserID, WX.Main.CurUser.UserID, 8, 0); //5、向入职人员发送入职办理清单 WX.Main.MessageSend("<a href=/Manage/Private/IntoJobList.aspx?mes=1>欢迎加入我行大家庭!入职相关事宜请查看新人入职附表——入职通知</a>", "/Manage/Main/messagelist.aspx", usermodel.UserID.ToString(), WX.Main.CurUser.UserID, 8, 0); Response.Redirect("HR_Intojobs.aspx?state=10"); }
private void pageinit() { WX.HR.TransferKong.MODEL tfk = null; li_center.Text = Request["type"] == "1" ? "调动" : "提升"; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp2, null, null, null); WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList1, null, null, null); if (Request["TFID"] != null && Request["TFID"] != "") { tfk = WX.HR.TransferKong.NewDataModel(Request["TFID"]); if (tfk != null) { ui_demp.SelectedValue = tfk.BackDempID.ToString(); ui_demp2.SelectedValue = tfk.NowDempID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = tfk.BackDutyID.ToString(); ui_duty2.SelectedValue = tfk.NowDutyID.ToString(); DropDownList1.SelectedValue = tfk.BackGrade.ToString(); li_addtime.Text = ((DateTime)tfk.Addtime.value).ToString("yyyy-MM-dd"); // Button1.Enabled = false; li_center.Text = tfk.type.ToString() == "1" ? "调动" : "提升"; li_dept.Text = tfk.dempOpinion.ToString(); Text_dept.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.dempManager.ToString()); li_hr.Text = tfk.hrOpinion.ToString(); Text_hr.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.hrManager.ToString()); li_boss.Text = tfk.bossOpinion.ToString(); Text_boss.Text = WX.CommonUtils.GetRealNameListByUserIdList(tfk.bossManager.ToString()); tr_dept.Visible = tr_HR.Visible = tr_boss.Visible = true; tr_sub.Visible = false; } } else { li_addtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); } WX.Main.CurUser.LoadEmployeeUser(); WX.Main.CurUser.LoadUserModel(true); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; WX.Model.User.MODEL usermodel = WX.Main.CurUser.UserModel; MenuBar1.Param2 = employee.LoadSucceed || true?usermodel.State.ToString() : "0"; if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); } catch { } li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); if (tfk == null) { ui_demp.SelectedValue = ui_demp2.SelectedValue = usermodel.DepartmentID.ToString(); bindjob1(); bindjob(); ui_duty.SelectedValue = ui_duty2.SelectedValue = usermodel.DutyId.ToString(); DropDownList1.SelectedValue = usermodel.Grade.ToString(); } WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + WX.Main.CurUser.UserID + "'"); if (intojob == null) { ULCode.Debug.Alert("您还没有入职,请选办理入职!", "Work_Apply.aspx"); } li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_Prof.Text = employee.Prof.ToString(); li_fl.Text = employee.ForeignL.ToString(); } if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%Work_ApplyTransferKong.aspx?TFID={1}%'", WX.Main.CurUser.UserID, Request["TFID"])); } }
private void pageinit() { string userId = WX.Request.rUserId; bool flag = false; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; MenuBar1.Param2 = employee.LoadSucceed || true?usermodel.State.ToString() : "0"; if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); } catch { } li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); ui_demp.SelectedValue = usermodel.DepartmentID.ToString(); this.bindjob(); ui_duty.SelectedValue = usermodel.DutyId.ToString(); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + userId + "'"); if (intojob == null) { Response.Redirect("HR_AddIntojobs.aspx?UserID=" + userId); } WX.Data.Dict.BindListCtrl_GradeList(this.DropDownList1, null, null, intojob.PSalary.ToString()); li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_sqrname.Text = usermodel.RealName.ToString(); CheckBox1.Checked = employee.IsInsurance.ToInt32() == 1 ? true : false; } else { this.bindjob(); } WX.HR.Official.MODEL Official = WX.HR.Official.GetModel("select * from HR_Official where UserID='" + userId + "'"); if (Official != null) { ui_imagine.Text = Official.imagine.ToString(); try { li_time.Text = ((DateTime)Official.Addtime.value).ToString("yyyy-MM-dd"); } catch { } if (Official.EndTime.value == null && Convert.ToInt32(usermodel.State.value) < 20) { if (Official.demptype.ToInt32() == 0) { li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32())); if (WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32()) == WX.Main.CurUser.UserID) //部门主管 { flag = true; } Literal1.Text = "部门"; } else if (Official.HRtype.ToInt32() == 0 && Official.demptype.ToInt32() > 0)//人力资源部 { li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetHRUserID); if (WX.CommonUtils.GetHRUserID == WX.Main.CurUser.UserID) { flag = true; } Literal1.Text = "人资"; } else if (Official.admintype.ToInt32() == 0 && Official.HRtype.ToInt32() > 0)//综管 { li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetCAUserID); if (WX.CommonUtils.GetCAUserID == WX.Main.CurUser.UserID) { flag = true; } Literal1.Text = "综管"; } else if (Official.bosstype.ToInt32() == 0 && Official.admintype.ToInt32() > 0)//中心领导 { li_sqname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetBossUserID); if (WX.CommonUtils.GetBossUserID == WX.Main.CurUser.UserID) { flag = true; } Literal1.Text = "中心"; } } //ui_demptype.SelectedValue = Official.demptype.ToString(); // ui_dempuser.Value = Official.dempUserID.ToString(); DropDownList1.SelectedValue = Official.salary.ToString(); li_dept.Text = Official.dempOpinion.ToString(); Check_dept.SelectedValue = Official.demptype.ToString(); Text_dept.Text = WX.CommonUtils.GetRealNameListByUserIdList(Official.dempUserID.ToString()); li_hr.Text = Official.HROpinion.ToString(); Check_hr.SelectedValue = Official.HRtype.ToString(); Text_hr.Text = WX.CommonUtils.GetRealNameListByUserIdList(Official.HRUserID.ToString()); li_ca.Text = Official.adminOpinion.ToString(); Check_ca.SelectedValue = Official.admintype.ToString(); Text_ca.Text = WX.CommonUtils.GetRealNameListByUserIdList(Official.adminUserID.ToString()); li_boss.Text = Official.bossOpinion.ToString(); Check_boss.SelectedValue = Official.bosstype.ToString(); Text_boss.Text = WX.CommonUtils.GetRealNameListByUserIdList(Official.bossUserID.ToString()); tr_dept.Visible = Official.dempUserID.value != null; tr_HR.Visible = Official.HRUserID.value != null; tr_CA.Visible = Official.adminUserID.value != null; tr_boss.Visible = Official.bossUserID.value != null; tr_sub.Visible = tr_sub2.Visible = Official.EndTime.value == null; ContractBind(); } if (usermodel.State.ToInt32() == 20) { tr_ht.Visible = true; tr_sub.Visible = tr_sub2.Visible = flag; if (employee.IsInsurance.ToInt32() == 0 && WX.CommonUtils.GetHRUserID == WX.Main.CurUser.UserID) { div_ht.Visible = GridView1.Columns[1].Visible = Button3.Visible = true; } } Button1.Enabled = Button2.Enabled = flag; }
private void pageinit() { WX.Main.CurUser.LoadEmployeeUser(false); WX.Main.CurUser.LoadUserModel(false); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; WX.Model.User.MODEL usermodel = WX.Main.CurUser.UserModel; if (employee.LoadSucceed || true) { li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); try { li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); } catch { } li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); ui_demp.Text = WX.CommonUtils.GetDeptNameListByDeptIdList(usermodel.DepartmentID.ToString()); ui_duty.Text = WX.CommonUtils.GetDutyNameListByDutyIdList(usermodel.DutyId.ToString()); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + WX.Main.CurUser.UserID + "'"); if (intojob == null && usermodel.State.ToInt32() < 10) { Response.Redirect("Work_Apply.aspx"); } li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_sqrname.Text = usermodel.RealName.ToString(); } li_endtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); WX.HR.Official.MODEL Official = WX.HR.Official.GetModel("select top 1 * from HR_Official where UserID='" + WX.Main.CurUser.UserID + "' order by Addtime desc"); if (Official != null) { ui_imagine.Text = Official.imagine.ToString(); li_dept.Text = Official.dempOpinion.ToString(); li_HR.Text = Official.HROpinion.ToString(); li_CA.Text = Official.adminOpinion.ToString(); li_boss.Text = Official.bossOpinion.ToString(); tr_dept.Visible = Official.dempUserID.value != null; tr_hr.Visible = Official.HRUserID.value != null; tr_ca.Visible = Official.adminUserID.value != null; tr_boss.Visible = Official.bossUserID.value != null; } divstr.InnerHtml = ""; if (usermodel.State.ToInt32() < 10) { divstr.InnerHtml = "请先办理入职然后再申请转正!"; } else if (usermodel.State.ToInt32() == 20) { divstr.InnerHtml = "您已转正请不要重复申请!"; } else if (Official != null && DateTime.Now < Official.Addtime.ToDateTime().AddMonths(1)) { divstr.InnerHtml = "请于" + Official.Addtime.ToDateTime().AddMonths(1).ToString("yyyy-MM-dd") + "后申请,1个月内请不要重复申请!"; } if (Request["mes"] != null) { divstr.InnerHtml = " "; WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%Work_ApplyOfficial.aspx%'", WX.Main.CurUser.UserID)); } Button1.Visible = divstr.InnerHtml == ""; }
private void pageinit() { WX.HR.LeaveJob.MODEL LeaveJob = null; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); LeaveJob = WX.HR.LeaveJob.NewDataModel(Request["LJID"]); if (LeaveJob != null) { li_reason.Text = LeaveJob.reason.ToString(); ui_days.Text = LeaveJob.days.ToString(); ui_lasttime.Text = LeaveJob.lasttime.ToDateTime().ToString("yyyy-MM-dd"); li_addtime.Text = ((DateTime)LeaveJob.Addtime.value).ToString("yyyy-MM-dd"); li_dept.Text = LeaveJob.dempOpinion.ToString(); Text_dept.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.dempManager.ToString()); li_hr.Text = LeaveJob.hrOpinion.ToString(); Text_hr.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.hrManager.ToString()); li_boss.Text = LeaveJob.bossOpinion.ToString(); Text_boss.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.bossManager.ToString()); Employee.MODEL employee = WX.Model.Employee.NewDataModel(LeaveJob.UserID.ToString()); WX.Model.User.MODEL usermodel = WX.Model.User.NewDataModel(LeaveJob.UserID.ToString()); li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); ui_demp.SelectedValue = usermodel.DepartmentID.ToString(); bindjob(); ui_duty.SelectedValue = usermodel.DutyId.ToString(); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + usermodel.UserID.ToString() + "'"); if (intojob != null) { li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); } li_sqrname.Text = usermodel.RealName.ToString(); if (LeaveJob.dempManager.value == null) { tr_sub.Visible = tr_sub2.Visible = WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32()) == WX.Main.CurUser.UserID; Literal1.Text = "部门"; li_dempname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetDeptUserID(1, "[Host]", usermodel.DepartmentID.ToInt32())); } else if (LeaveJob.hrManager.value == null) { tr_sub.Visible = tr_sub2.Visible = WX.CommonUtils.GetHRUserID == WX.Main.CurUser.UserID; Literal1.Text = "人资"; li_dempname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetHRUserID); tr_dept.Visible = true; } else if (LeaveJob.bossManager.value == null) { tr_sub.Visible = tr_sub2.Visible = WX.CommonUtils.GetBossUserID == WX.Main.CurUser.UserID; Literal1.Text = "中心"; li_dempname.Text = WX.CommonUtils.GetRealNameListByUserIdList(WX.CommonUtils.GetBossUserID); tr_dept.Visible = tr_HR.Visible = true; } else { tr_dept.Visible = tr_HR.Visible = tr_boss.Visible = div_rece.Visible = true; tr_sub.Visible = tr_sub2.Visible = false; li_rece.Text = LeaveJob.ReceiveContent.ToString().Replace("\r\n", "<br/>"); try { li_annex.Text = "<a style='color:#666;' href='" + LeaveJob.ReceiveAnnex.ToString().Split('|')[1] + "' target='_blank'>点击下载:" + LeaveJob.ReceiveAnnex.ToString().Split('|')[0] + "</a>"; } catch { } tr_receshow.Visible = LeaveJob.ReceiveContent.value != null; BindRECE(LeaveJob.UserID.ToString()); div_rece.Visible = usermodel.State.ToInt32() != 40; } } if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%HR_Leavejobs.aspx?LJID={1}%'", WX.Main.CurUser.UserID, Request["LJID"])); } }
private void pageinit() { WX.HR.LeaveJob.MODEL LeaveJob = null; WX.Model.Employee.MODEL employee; WX.Model.User.MODEL usermodel; WX.Data.Dict.BindListCtrl_DeptList(this.ui_demp, null, null, null); bool flag = true; if (Request["LJID"] != null) { LeaveJob = WX.HR.LeaveJob.NewDataModel(Request["LJID"]); } else { flag = false; LeaveJob = WX.HR.LeaveJob.GetModel("select top 1 * from HR_LeaveJobs where UserID='" + WX.Main.CurUser.UserID + "' order by Addtime desc"); } if ((flag && LeaveJob != null) || (LeaveJob != null && flag == false && LeaveJob.EndTime.value == null)) { li_dept.Text = LeaveJob.dempOpinion.ToString(); Text_dept.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.dempManager.ToString()); tr_dept.Visible = LeaveJob.dempManager.value != null; li_hr.Text = LeaveJob.hrOpinion.ToString(); Text_hr.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.hrManager.ToString()); tr_HR.Visible = LeaveJob.hrManager.value != null; li_boss.Text = LeaveJob.bossOpinion.ToString(); Text_boss.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.bossManager.ToString()); tr_boss.Visible = LeaveJob.bossManager.value != null; li_sqrname.Text = WX.CommonUtils.GetRealNameListByUserIdList(LeaveJob.UserID.ToString()); ui_reason.Text = LeaveJob.reason.ToString(); ui_days.Text = LeaveJob.days.ToString(); try { ui_lasttime.Text = LeaveJob.lasttime.ToDateTime().ToString("yyyy-MM-dd"); } catch { } if (LeaveJob.EndTime.value == null) { ui_reason.Text = LeaveJob.reason.ToString(); ui_days.Text = LeaveJob.days.ToString(); li_addtime.Text = LeaveJob.Addtime.ToDateTime().ToString("yyyy-MM-dd"); try { ui_lasttime.Text = LeaveJob.lasttime.ToDateTime().ToString("yyyy-MM-dd"); } catch { } if (LeaveJob.bossManager.value == null) { divstr.InnerHtml = "您提交的申请正在审核中,请耐心等待结果!"; } else { divstr.InnerHtml = "正在交接中,请协助各部门办理离职交接事宜!"; //tr_rece.Visible = true; li_rece.Text = Text_RECE.Text = LeaveJob.ReceiveContent.ToString(); li_rece.Text = li_rece.Text.Replace("\r\n", "<br/>"); try { Literal1.Text = li_annex.Text = "<a style='color:#666;' href='" + LeaveJob.ReceiveAnnex.ToString().Split('|')[1] + "' target='_blank'>点击下载:" + LeaveJob.ReceiveAnnex.ToString().Split('|')[0] + "</a>"; } catch { } tr_receshow.Visible = LeaveJob.ReceiveContent.value != null; } } else { divstr.InnerHtml = "您提交的申请被驳回!"; } tr_sub.Visible = radio_reason.Visible = false; BindRECE(LeaveJob.UserID.ToString()); //div_rece.Visible = Gv_Receive.Rows.Count > 0; employee = WX.Model.Employee.NewDataModel(LeaveJob.UserID.ToString()); usermodel = WX.Model.User.NewDataModel(LeaveJob.UserID.ToString()); HiddenID.Value = LeaveJob.ID.ToString(); } else { li_addtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); WX.Main.CurUser.LoadEmployeeUser(); WX.Main.CurUser.LoadUserModel(true); employee = WX.Main.CurUser.EmployeeUser; usermodel = WX.Main.CurUser.UserModel; } li_name.Text = usermodel.RealName.ToString(); li_sex.Text = ((bool)employee.Sex.value ? "男" : "女"); li_age.Text = ((DateTime)employee.Birthday.value).ToString("yyyy-MM-dd"); li_edu.Text = employee.Edu.ToString(); li_Mobile.Text = employee.Mobile.ToString(); ui_demp.SelectedValue = usermodel.DepartmentID.ToString(); bindjob(); ui_duty.SelectedValue = usermodel.DutyId.ToString(); WX.HR.IntoJob.MODEL intojob = WX.HR.IntoJob.GetModel("select * from HR_Intojobs where UserID='" + WX.Main.CurUser.UserID + "'"); if (intojob == null) { Response.Redirect("HR_AddIntojobs.aspx?UserID=" + WX.Request.rUserId); } li_intotime.Text = ((DateTime)intojob.Addtime.value).ToString("yyyy-MM-dd"); li_sqrname.Text = usermodel.RealName.ToString(); if (usermodel.State.ToString() == "40" && LeaveJob != null) { Button1.Enabled = false; } if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%Work_ApplyLeavejobs.aspx%'", WX.Main.CurUser.UserID, Request["LJID"])); } }