protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string content = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 string userId = WX.Request.rUserId; Employee.MODEL employee = Employee.GetModelToID(userId); //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + Request.QueryString["UserID"] + "'"); employee.Family.value = content; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { //if (employee.UserID.ToString() == WX.Main.CurUser.UserID.ToString()) //{ // WX.Main.CurUser.LoadEmployeeUser(true); //} } //6.登记日志 if (iR > 0) { WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(userId); WX.Model.Company.AddLogs(Convert.ToInt32(usermodel.CompanyID.ToString()), 6, usermodel.RealName.ToString() + "的档案修改了家庭成员!" + "[" + ui_logcontent.Text + "]", WX.Main.CurUser.UserID, ui_logmanage.Value, Request.UserHostAddress); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "家庭成员信息修改成功!", "User_UrgentLink.aspx?UserID=" + employee.UserID.ToString() + "&companyid=" + usermodel.CompanyID.ToString()); } }
protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string urgentlink = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 WX.Main.CurUser.LoadEmployeeUser(false); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + Request.QueryString["UserID"] + "'"); employee.UrgentLink.value = urgentlink; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { //6.登记日志 WX.Main.AddLog(WX.LogType.Default, "紧急联络人修改成功!", ""); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "紧急联络人修改成功!", "Priv_UserInfo.aspx"); } else { ULCode.Debug.Alert(Page, "紧急联络人修改成功!"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string skill = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 WX.Main.CurUser.LoadEmployeeUser(false); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); employee.Skill.value = skill; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { //if (employee.UserID.ToString() == WX.Main.CurUser.UserID.ToString()) //{ // WX.Main.CurUser.LoadEmployeeUser(true); //} } if (iR > 0) { //6.登记日志 WX.Main.AddLog(WX.LogType.Default, "个人技能修改成功!", ""); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "个人技能修改成功!请完善下一步“教育经历”", "Priv_Education.aspx"); } else { ULCode.Debug.Alert(Page, "个人技能修改失败!"); } }
protected void Page_Load(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { string userId = WX.Request.rUserId; Employee.MODEL employee = Employee.GetModel("select * from [TU_Employees] where UserID='" + userId + "'"); //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); if (employee.LoadSucceed || true) { if (employee.Family.ToString().Trim() == "") { ui_content.Value = "<table class='table3' style=\"text-align:center;line-height:200%;\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\">\n<tr style=\"font-weight:bold;\">\n<td rowspan=\"4\" width=\"80\">家庭成员</td>\n<td width=\"80\">称呼</td>\n<td width=\"80\">姓名</td>\n<td>联系地址</td>\n<td width=\"100\">邮政编码</td>\n<td width=\"120\">联系电话</td>\n</tr>\n<tr>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n</tr>\n<tr>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n</tr>\n<tr>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n<td> </td>\n</tr>\n</table>"; } else { ui_content.Value = employee.Family.ToString(); } } } }
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; } } }
protected void Page_Load(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { t3.Visible = !WX.Main.Priv_IsTemp; t1.Visible = WX.Main.Priv_IsTemp; if (t1.Visible) { string userId = WX.Request.rUserId; Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); Text_Template.MODEL ttM = Text_Template.NewDataModel(1); if (!ttM.Apply.ToBoolean()) { this.t1.Visible = true; this.t2.Visible = false; this.ui_content.Value = employee.Skill.isEmpty ? ttM.Template.ToString() : employee.Skill.ToString(); } else { this.t1.Visible = false; this.t2.Visible = true; this.lblContent.Text = employee.Skill.ToString(); this.ui_content1.Value = ttM.Template.ToString(); } } } }
protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string education = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 WX.Main.CurUser.LoadEmployeeUser(); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); employee.Education.value = education; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { //6.登记日志 WX.Main.AddLog(WX.LogType.Default, "用户教育经历修改成功!", ""); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "教育经历修改成功!请完善下一步“家庭成员”", "Priv_Family.aspx"); } else { ULCode.Debug.Alert(this, "教育经历修改失败!"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { t3.Visible = !WX.Main.Priv_IsTemp; t1.Visible = WX.Main.Priv_IsTemp; if (t1.Visible) { //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Main.CurUser.LoadEmployeeUser(); WX.Main.CurUser.LoadUserModel(false); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Model.User.MODEL usermodel = WX.Main.CurUser.UserModel; Text_Template.MODEL ttM = Text_Template.NewDataModel(2); if (!ttM.Apply.ToBoolean()) { this.t1.Visible = true; this.t2.Visible = false; this.trSubmit.Visible = usermodel.ArchiveBySelf.ToBoolean(); this.ui_content.Value = employee.Education.isEmpty ? ttM.Template.ToString() : employee.Education.ToString(); } else { this.t1.Visible = false; this.t2.Visible = true; this.lblContent.Text = employee.Education.ToString(); this.ui_content1.Value = ttM.Template.ToString(); } } } }
protected void Button3_Click(object sender, EventArgs e) { Employee.MODEL employee = WX.Request.rEmpolyee; employee.IsInsurance.value = CheckBox1.Checked ? 1 : 0; employee.Update(); div_ht.Visible = GridView1.Columns[1].Visible = Button3.Visible = false; }
protected void btnSubmit1_Click(object sender, EventArgs e) { //2.取得用户变量 string content = this.ui_content1.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 WX.Main.CurUser.LoadEmployeeUser(); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); employee.Work.value = content; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { } //6.登记日志 if (iR > 0) { WX.Main.AddLog(WX.LogType.Default, "用户工作经历修改成功!", ""); } //7.返回处理结果或返回其它页面。 if (iR > 0) { ULCode.Debug.Alert(this, "个人工作经历修改成功!"); } else { ULCode.Debug.Alert(Page, "个人工作经历修改成功!"); } }
protected void RegisterUser(object sender, EventArgs e) { Employee.MODEL employee = WX.Request.rEmpolyee; employee.DepartmentID.value = ddlDepartment.SelectedValue; employee.DutyId.value = ui_jobname.SelectedValue; employee.Salary.value = ui_salary.Text; employee.Update(); WX.Model.Audition.MODEL auditionmodel = WX.Model.Audition.GetModel(employee.UserID.ToString()); if (auditionmodel == null) { auditionmodel = WX.Model.Audition.NewDataModel(); auditionmodel.UserID.value = employee.UserID.value; auditionmodel.FirstUser.value = WX.Main.CurUser.UserID; auditionmodel.FirstOpinion.value = TextBox1.Text; auditionmodel.FirstTime.value = DateTime.Now; auditionmodel.Insert(); } else { auditionmodel.FirstUser.value = WX.Main.CurUser.UserID; auditionmodel.FirstOpinion.value = TextBox1.Text; auditionmodel.FirstTime.value = DateTime.Now; auditionmodel.Update(); } WX.Model.User.MODEL usermodel = WX.Request.rUser; string SendUserID = WX.CommonUtils.GetUserIDListByWhereStr(1, "DepartmentID=" + employee.DepartmentID.ToString() + " and State in(10,20) order by Grade desc"); WX.Main.MessageSend("<a href=/Manage/HR/User_Resume.aspx?UserID=" + employee.UserID.ToString() + "&mes=1>" + usermodel.RealName.ToString() + "——面试通知</a>", "/Manage/Main/messagelist.aspx", SendUserID, WX.Main.CurUser.UserID, 7, 0); Response.Redirect("HR_NewIntojobs.aspx?All=1"); }
private void FillDataCtrl() { string userId = Convert.ToString(Request.QueryString["id"]); //Employee.MODEL employee = Employee.NewDataModel(userId); Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(userId); if (employee.LoadSucceed || true) { WX.Data.Dict.BindListCtrl_Companys(this.ddlCompany, null, null, usermodel.CompanyID.ToString()); for (int i = 0; i < Employee.eduarray.Length; i++) { ui_edu.Items.Add(new ListItem(Employee.eduarray[i], Employee.eduarray[i])); } ui_edu.SelectedValue = "大专"; //this.ddlCompany.SelectedItem.Value = employee.CompanyID.ToString(); this.txtRealName.Text = usermodel.RealName.ToString(); this.txtIDCard.Text = employee.IDCard.ToString(); //this.ddlPosition.SelectedItem.Value = employee.DutyId.ToString(); this.txtBirthday.Text = employee.Birthday.ToString(); this.txtMobile.Text = employee.Mobile.ToString(); if (Convert.ToBoolean(employee.Sex.ToString())) { this.rblSex.SelectedValue = "1"; } else { this.rblSex.SelectedValue = "0"; } this.txtQQNumber.Text = employee.QQ.ToString(); this.txtEmail.Text = employee.Email.ToString(); this.txtTelephone.Text = employee.Tel.ToString(); this.ui_Titles.Text = employee.Titles.ToString(); this.ui_Ethnic.Text = employee.Ethnic.ToString(); this.ui_edu.SelectedValue = employee.Edu.ToString(); this.ui_Prof.Text = employee.Prof.ToString(); this.ui_ForeignL.Text = employee.ForeignL.ToString(); this.ui_Rating.Text = employee.Rating.ToString(); this.ui_Marital.Text = employee.Marital.ToString(); this.ui_Health.Text = employee.Health.ToString(); string[] addrarry = employee.Address.ToString().Split('|'); if (addrarry.Length > 1) { this.ui_jg.Text = addrarry[1]; this.ui_hkd.Text = addrarry[2]; } this.txtAddress.Text = addrarry[0]; if (employee.UserFace.isEmpty) { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"\" alt=\"\" style=\"width: 100%; height: 100%; display: none;\" />"; } else { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"" + (employee.UserFace.ToString()) + "\" alt=\"\" style=\"width: 100%; height: 100%; \" />"; } this.txtSort.Text = employee.Sort.ToString(); this.txtContent.Text = employee.Introduction.ToString(); } }
private void Edit() { ULCode.KeyXmlString kxs10 = new ULCode.KeyXmlString(); int iR = 0; if (Request["table"] == "TU_Employees") { string userId = Request["keyvalue"]; Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); try { kxs10.LoadData(employee.DFields[Request["column"]].ToString()); } catch { } employee.DFields[Request["column"]].value = getnew(kxs10).GetSavedData(); iR = employee.Update(); } //5.(用户及业务对象)统计与状态 //7.返回处理结果或返回其它页面。 string pagename = ""; string nexturl = ""; switch (Request["column"]) { case "Education": pagename = "员工教育经历"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Skill": pagename = "员工个人技能"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Family": pagename = "员工家庭成员"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Work": pagename = "员工工作经历"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "UrgentLink": pagename = "员工紧急联络人"; nexturl = "User_UserList.aspx?CompanyID=11"; break; default: break; } if (iR > 0) {//6.登记日志 WX.Main.AddLog(WX.LogType.Default, pagename + "编辑成功!", ""); ULCode.Debug.Alert(this, pagename + "编辑成功!"); } else { ULCode.Debug.Alert(Page, pagename + "编辑失败!"); } }
protected void RegisterUser(object sender, EventArgs e) { //获取用户变量 string name = this.UserName.Value; string pwd = this.PassWord.Value; string code = this.GetCode.Value; //验证用户变量 if (HttpContext.Current.Session["CheckCode"] != null && Convert.ToString(HttpContext.Current.Session["CheckCode"]) != code) { ULCode.Debug.Alert(this, "验证码不对!"); return; } if (Membership.GetUser(name) != null) { ULCode.Debug.Alert(this, "此用户已经存在!"); return; } //注册账户 MembershipUser mu = Membership.CreateUser(name, pwd); //添加员工 Roles.AddUserToRole(name, Convert.ToString(WX.RoleType.Employees)); //登录到浏览器 WX.Authentication.LoginIn(name); //注册员工默认信息 WX.Model.User.MODEL usermodel = WX.Model.User.NewDataModel(); usermodel.UserID.set(mu.ProviderUserKey.ToString()); usermodel.CompanyID.set(11); usermodel.DutyId.set(1000); usermodel.DepartmentID.set(0); usermodel.RealName.set(name); usermodel.ArchiveBySelf.set(true); usermodel.State.set(5); usermodel.Insert(); Employee.MODEL employeeNew = Employee.NewDataModel(); employeeNew.UserID.set(usermodel.UserID.value); employeeNew.Insert(); Session.Clear(); usermodel.SaveIntoCaches(); ULCode.Debug.Alert("注册成功!请牢记用户名密码,继续完善档案资料!", "/SubResume.aspx"); }
protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string urgentlink = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 string userId = WX.Request.rUserId; Employee.MODEL employee = Employee.GetModelToID(userId); //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(userId); //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + Request.QueryString["UserID"] + "'"); employee.UrgentLink.value = urgentlink; int iR = employee.Update(); //6.登记日志 if (iR > 0) { WX.Model.Company.AddLogs(Convert.ToInt32(usermodel.CompanyID.ToString()), 6, usermodel.RealName.ToString() + "的档案修改了紧急联络人!" + "[" + ui_logcontent.Text + "]", WX.Main.CurUser.UserID, ui_logmanage.Value, Request.UserHostAddress); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "紧急联络人信息修改成功!", "Dept_Companyslicense.aspx?companyID=" + usermodel.CompanyID.ToString() + "&type=3"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { //2.取得用户变量 string education = this.ui_content.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 string userId = WX.Request.rUserId; Employee.MODEL employee = Employee.GetModel("select * from [TU_Employees] where UserID='" + userId + "'"); //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + Request.QueryString["UserID"] + "'"); employee.Education.value = education; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 //6.登记日志 if (iR > 0) { WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(userId); WX.Model.Company.AddLogs(Convert.ToInt32(usermodel.CompanyID.ToString()), 6, usermodel.RealName.ToString() + "的档案修改了教育经历!" + "[" + ui_logcontent.Text + "]", WX.Main.CurUser.UserID, ui_logmanage.Value, Request.UserHostAddress); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "教育经历信息修改成功!", "User_Work.aspx?UserID=" + usermodel.UserID.ToString() + "&companyid=" + usermodel.CompanyID.ToString()); } }
protected void btnSubmit1_Click(object sender, EventArgs e) { //2.取得用户变量 string education = this.ui_content1.Value; //3.验证用户变量,包含Request.QueryString及Request.Form //4.业务处理过程 string userId = WX.Request.rUserId; Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + Request.QueryString["UserID"] + "'"); employee.Education.value = education; int iR = employee.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { //if (employee.UserID.ToString() == WX.Main.CurUser.UserID.ToString()) //{ // WX.Main.CurUser.LoadEmployeeUser(true); //} } //6.登记日志 if (iR > 0) { WX.Main.AddLog(WX.LogType.Default, "用户教育经历修改成功!", ""); } //7.返回处理结果或返回其它页面。 if (iR > 0) { ULCode.Debug.Confirm(this, "员工教育经历修改成功!是否返回员工列表页?", "User_UserList.aspx?CompanyID=11", this.Request.RawUrl); } else { ULCode.Debug.Alert(Page, "员工教育经历修改成功!"); } }
protected void Page_Load(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { string userId = WX.Request.rUserId; //if (!ULCode.Validation.IsGuid(userId)) //{ // ULCode.Debug.we("你没有权限访问此页面!"); // return; //} Employee.MODEL employee = Employee.GetModel("select * from [TU_Employees] where UserID='" + userId + "'"); //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); if (employee.LoadSucceed || true) { ui_content.Value = employee.Skill.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } if (!IsPostBack) { t3.Visible = !WX.Main.Priv_IsTemp; t1.Visible = WX.Main.Priv_IsTemp; if (t1.Visible) { WX.Main.CurUser.LoadEmployeeUser(); WX.Main.CurUser.LoadUserModel(false); Employee.MODEL employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); Text_Template.MODEL ttM = Text_Template.NewDataModel(3); if (!ttM.Apply.ToBoolean()) { this.t1.Visible = true; this.t2.Visible = false; this.trSubmit.Visible = WX.Main.CurUser.UserModel.ArchiveBySelf.ToBoolean(); this.ui_content.Value = employee.Work.isEmpty ? ttM.Template.ToString() : employee.Work.ToString(); } else { this.t1.Visible = false; this.t2.Visible = true; this.lblContent.Text = employee.Work.ToString(); this.ui_content1.Value = ttM.Template.ToString(); } } } }
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.ddlDepartment, null, null, null); for (int i = 0; i < Employee.eduarray.Length; i++) { ui_edu.Items.Add(new ListItem(Employee.eduarray[i], Employee.eduarray[i])); } ui_edu.SelectedValue = "大专"; Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; txtRealName.Text = usermodel.RealName.ToString(); txtIDCard.Text = employee.IDCard.ToString(); txtEmail.Text = employee.Email.ToString(); ddlDepartment.SelectedValue = employee.DepartmentID.ToString(); bindjob(); ui_jobname.SelectedValue = employee.DutyId.ToString(); ui_salary.Text = employee.Salary.ToString(); rblSex.SelectedValue = employee.Sex.ToString(); ui_Ethnic.Text = employee.Ethnic.ToString(); txtBirthday.Text = employee.Birthday.f("{0:yyyy-MM-dd}"); this.txtMobile.Text = employee.Mobile.ToString(); if (Convert.ToBoolean(employee.Sex.ToString())) { this.rblSex.SelectedValue = "1"; } else { this.rblSex.SelectedValue = "0"; } this.txtTelephone.Text = employee.Tel.ToString(); this.ui_Titles.Text = employee.Titles.ToString(); this.ui_edu.SelectedValue = employee.Edu.ToString(); this.ui_Prof.Text = employee.Prof.ToString(); this.ui_ForeignL.Text = employee.ForeignL.ToString(); this.ui_Rating.Text = employee.Rating.ToString(); this.ui_Marital.Text = employee.Marital.ToString(); this.ui_Health.Text = employee.Health.ToString(); string[] addrarry = employee.Address.ToString().Split('|'); li_Skill.Text = getxmlString("Priv-Skill", employee.Skill.ToString(), "个人技能"); li_edu.Text = getxmlString("Priv-Edu", employee.Education.ToString(), "教育经历"); li_work.Text = getxmlString("Priv-Work", employee.Work.ToString(), "工作经历"); WX.Model.Audition.MODEL auditionmodel = WX.Model.Audition.GetModel(employee.UserID.ToString()); if (auditionmodel != null) { TextBox1.Text = WX.Main.CurUser.UserModel.DepartmentID.ToInt32() != 801 ? (WX.CommonUtils.GetRealNameListByUserIdList(auditionmodel.FirstUser.ToString()) + ":" + auditionmodel.FirstOpinion.ToString() + "(" + auditionmodel.FirstTime.ToString() + ")") : auditionmodel.FirstOpinion.ToString(); WX.Main.CurUser.LoadUserModel(false); } if (usermodel.State.ToInt32() >= 10) { Submit1.Visible = Submit2.Visible = Submit3.Visible = false; } else if (WX.Main.CurUser.UserModel.DepartmentID.ToInt32() != 801) { Submit3.Visible = false; Submit1.Visible = Submit2.Visible = true;// auditionmodel.AuditionState.ToInt32() == 0; } else { Submit3.Visible = auditionmodel.AuditionState.ToInt32() == 0; } if (addrarry.Length > 1) { this.txtAddress.Text = addrarry[0]; this.ui_hkd.Text = addrarry[2]; } this.txtAddress.Text = addrarry[0]; if (employee.UserFace.isEmpty) { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"/Images/nophoto.gif\" alt=\"\" style=\"width: 99%; height: 99%;\" />"; } else { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"" + (employee.UserFace.ToString()) + "\" alt=\"\" style=\"width: 99%; height: 99%; \" />"; } this.txtContent.Text = employee.Introduction.ToString(); try { if (Request["mes"] != null) { WX.Main.MessageToHistory_where(String.Format("SendToUserId='{0}' and Title like'%User_Resume.aspx?UserID={1}%'", WX.Main.CurUser.UserID, WX.Request.rUserId)); } } catch { } }
private void FillDataCtrl() { string userId = WX.Request.rUserId; Employee.MODEL employee = WX.Request.rEmpolyee; WX.Model.User.MODEL usermodel = WX.Request.rUser; if (employee.LoadSucceed || true) { for (int i = 0; i < Employee.eduarray.Length; i++) { ui_edu.Items.Add(new ListItem(Employee.eduarray[i], Employee.eduarray[i])); } ui_edu.SelectedValue = "大专"; //this.ddlCompany.SelectedItem.Value = employee.CompanyID.ToString(); deptId = usermodel.DepartmentID.ToString(); this.txtRealName.Text = usermodel.RealName.ToString(); this.txtIDCard.Text = employee.IDCard.ToString(); //this.ddlPosition.SelectedItem.Value = employee.DutyId.ToString(); this.txtBirthday.Text = employee.Birthday.f("{0:yyyy-MM-dd}"); this.txtMobile.Text = employee.Mobile.ToString(); if (Convert.ToBoolean(employee.Sex.ToString())) { this.rblSex.SelectedValue = "1"; } else { this.rblSex.SelectedValue = "0"; } this.txtQQNumber.Text = employee.QQ.ToString(); this.txtEmail.Text = employee.Email.ToString(); this.txtTelephone.Text = employee.Tel.ToString(); this.ui_Titles.Text = employee.Titles.ToString(); this.ui_Ethnic.Text = employee.Ethnic.ToString(); this.ui_edu.SelectedValue = employee.Edu.ToString(); this.ui_Prof.Text = employee.Prof.ToString(); this.ui_ForeignL.Text = employee.ForeignL.ToString(); this.ui_Rating.Text = employee.Rating.ToString(); this.ui_Marital.Text = employee.Marital.ToString(); this.ui_Health.Text = employee.Health.ToString(); string[] addrarry = employee.Address.ToString().Split('|'); CheckBox1.Checked = employee.IsInsurance.ToString() == "1"; if (addrarry.Length > 1) { this.ui_jg.Text = addrarry[1].Split(':')[0]; this.ui_hkd.Text = addrarry[2].Split(':')[0]; this.txtAddress.Text = addrarry[0].Split(':')[0]; try { this.txtaddresscode.Text = addrarry[0].Split(':')[1]; } catch { } this.txtaddress2.Text = addrarry[1].Split(':')[0]; try { this.txtaddress2code.Text = addrarry[1].Split(':')[1]; } catch { } } if (employee.UserFace.isEmpty) { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"/Images/nophoto.gif\" alt=\"\" style=\"width: 99%; height: 99%;\" />"; } else { this.liPreZoomImage.Text = "<img id=\"preZoomImage\" src=\"" + (employee.UserFace.ToString()) + "\" alt=\"\" style=\"width: 99%; height: 99%; \" />"; } this.txtSort.Text = employee.Sort.ToString(); this.txtContent.Text = employee.Introduction.ToString(); WX.Model.EmployeeCredential.MODEL model = WX.Model.EmployeeCredential.GetModel("Select top 1 * from [TU_Employees_Credentials] where Name='身份证扫描件' and UserID='" + employee.UserID.ToString() + "'"); if (model != null) { cardannex.Text = "<a href=\"javascript:PopupIFrame('/Manage/Private/Priv_CredentialsDetail.aspx?Id=" + model.Id.ToString() + "','查看详细','','',1000,800)\">查看扫描件</a>"; } } }
protected void btnSubmit_Click(object sender, EventArgs e) { //1.验证当前用户页面权限 if (!this.Master.A_Edit) { Response.Write("你没有权限访问此功能!"); Response.End(); return; } //2.取得用户变量 string realName = this.txtRealName.Text.Trim(); string idCard = this.txtIDCard.Text.Trim(); string birthday = this.txtBirthday.Text; string mobile = this.txtMobile.Text.Trim(); bool sex = rblSex.SelectedValue == "1"? true:false; string qq = this.txtQQNumber.Text.Trim(); string email = this.txtEmail.Text.Trim(); string telephone = this.txtTelephone.Text.Trim(); string address = this.txtAddress.Text.Trim() + ":" + this.txtaddresscode.Text.Trim() + "|" + this.txtaddress2.Text.Trim() + ":" + this.txtaddress2code.Text.Trim(); string sort = this.txtSort.Text.Trim(); string content = this.txtContent.Text.Trim(); string userId = WX.Request.rUserId; //3.验证用户变量,包含Request.QueryString及Request.Form string fileExtension = null; if (this.FileUpload1.HasFile) { fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); if (!".gif.png.bmp.jpg".Contains(fileExtension)) { ULCode.Debug.Alert(this, "照片格式必须为图片格式!"); return; } } //4.业务处理过程 if (FileUpload2.HasFile) { WX.Main.ExecuteDelete("TU_Employees_Credentials", "UserId='" + WX.Request.rUserId + "' and Name", "身份证扫描件"); WX.Model.EmployeeCredential.MODEL model = WX.Model.EmployeeCredential.NewDataModel(); model.Name.value = "身份证扫描件"; model.Unit.value = "公安局"; model.Ctime.value = (Convert.ToInt32(idCard.Substring(6, 4)) + 18) + "-01-01"; string filepath = "/UploadFiles/cmp/" + DateTime.Now.ToString("yyyyMMddhhmmssfff") + System.IO.Path.GetExtension(FileUpload2.FileName); FileUpload2.SaveAs(Server.MapPath(filepath)); model.Annex.value = filepath; model.UserId.value = WX.Request.rUserId; model.Save(); } Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Model.User.MODEL usermodel = WX.Request.rUser; usermodel.RealName.value = realName; #region string filePath=.. string filePath = null; if (FileUpload1.HasFile) { if (employee.UserFace.isEmpty) { string fileDir = "/UploadFiles/UserPhotos/"; string fileName = usermodel.RealName.ToString(); //DateTime.Now.ToString("yyyyMMddHHmmss"); filePath = String.Format("{0}{1}{2}", fileDir, fileName, fileExtension); } else { //如果原文件有则覆盖原文件 filePath = employee.UserFace.ToString(); } try { FileUpload1.SaveAs(Server.MapPath(filePath)); } catch { ULCode.Debug.Alert(this, "照片上传失败,可能是没有写的权限,请与管理员联系!"); filePath = null; } } #endregion //employee.CompanyID.value = companyId; //employee.DepartmentID.value = departmentId; //employee.DutyId.value = position; employee.IDCard.value = idCard; employee.Sex.value = sex; employee.Birthday.value = birthday; employee.Mobile.value = mobile; employee.QQ.value = qq; employee.Email.value = email; employee.Tel.value = telephone; if (!String.IsNullOrEmpty(filePath)) { employee.UserFace.value = filePath; } employee.Sort.value = sort; employee.Introduction.value = content; employee.Titles.value = this.ui_Titles.Text; employee.Ethnic.value = this.ui_Ethnic.Text; employee.Edu.value = ui_edu.SelectedValue; employee.Prof.value = ui_Prof.Text; employee.ForeignL.value = ui_ForeignL.Text; employee.Rating.value = ui_Rating.Text; employee.Marital.value = ui_Marital.Text; employee.Health.value = ui_Health.Text; employee.Address.value = address + "|" + ui_jg.Text + "|" + ui_hkd.Text; employee.IsInsurance.value = CheckBox1.Checked ? 1 : 0; int iR = usermodel.Update(); //5.(用户及业务对象)统计与状态 if (iR != 0) { employee.Update(); //if (employee.UserID.ToString() == WX.Main.CurUser.UserID.ToString()) //{ // WX.Main.CurUser.LoadEmployeeUser(true); //} } else { employee.RestoreInitial(); } //6.登记日志 if (iR > 0) { WX.Main.AddLog(WX.LogType.Default, "添加用户信息成功!", ""); } //7.返回处理结果或返回其它页面。 if (iR > 0) { ULCode.Debug.Confirm(this, "员工信息修改成功!是否返回员工列表页?", "User_UserList.aspx?CompanyID=11", this.Request.RawUrl); } else { ULCode.Debug.Alert(Page, "员工信息修改成功!"); } //Response.Redirect("User_UserList.aspx?CompanyID=11"); }
protected void btnSubmit_Click(object sender, EventArgs e) { //1.验证当前用户页面权限 //if (!this.Master.A_Edit) //{ // Response.Write("你没有权限访问此功能!"); // Response.End(); // return; //} //2.取得用户变量 string companyId = this.ddlCompany.SelectedItem.Value; string realName = this.txtRealName.Text.Trim(); string idCard = this.txtIDCard.Text.Trim(); string birthday = this.txtBirthday.Text; string mobile = this.txtMobile.Text.Trim(); bool sex = rblSex.SelectedValue == "1" ? true : false; //if (this.rblSex.SelectedItem.Value == "1") //{ // sex = false; //} string qq = this.txtQQNumber.Text.Trim(); string email = this.txtEmail.Text.Trim(); string telephone = this.txtTelephone.Text.Trim(); string address = this.txtAddress.Text.Trim(); string sort = this.txtSort.Text.Trim(); string content = this.txtContent.Text.Trim(); string userId = Request.QueryString["id"]; //3.验证用户变量,包含Request.QueryString及Request.Form string fileExtension = null; if (this.FileUpload1.HasFile) { fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower(); if (!".gif.png.bmp.jpg".Contains(fileExtension)) { ULCode.Debug.Alert(this, "照片格式必须为图片格式!"); return; } } //4.业务处理过程 Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); WX.Model.User.MODEL usermodel = WX.Model.User.GetCache(userId); #region string filePath=.. string filePath = null; if (FileUpload1.HasFile) { if (employee.UserFace.isEmpty) { string fileDir = "/UploadFiles/UserPhotos/"; string fileName = usermodel.RealName.ToString(); //DateTime.Now.ToString("yyyyMMddHHmmss"); filePath = String.Format("{0}{1}{2}", fileDir, fileName, fileExtension); } else { //如果原文件有则覆盖原文件 filePath = employee.UserFace.ToString(); } try { FileUpload1.SaveAs(Server.MapPath(filePath)); } catch { ULCode.Debug.Alert(this, "照片上传失败,可能是没有写的权限,请与管理员联系!"); filePath = null; } } #endregion usermodel.CompanyID.value = companyId; usermodel.RealName.value = realName; int iR = usermodel.Update(); //5.(用户及业务对象)统计与状态 if (iR > 0) { employee.IDCard.value = idCard; employee.Sex.value = sex; employee.Birthday.value = birthday; employee.Mobile.value = mobile; employee.QQ.value = qq; employee.Email.value = email; employee.Tel.value = telephone; if (!String.IsNullOrEmpty(filePath)) { employee.UserFace.value = filePath; } employee.Sort.value = sort; employee.Introduction.value = content; employee.Titles.value = this.ui_Titles.Text; employee.Ethnic.value = this.ui_Ethnic.Text; employee.Edu.value = ui_edu.SelectedValue; employee.Prof.value = ui_Prof.Text; employee.ForeignL.value = ui_ForeignL.Text; employee.Rating.value = ui_Rating.Text; employee.Marital.value = ui_Marital.Text; employee.Health.value = ui_Health.Text; employee.Address.value = address + "|" + ui_jg.Text + "|" + ui_hkd.Text; employee.Update(); //6.登记日志 WX.Model.Company.AddLogs(Convert.ToInt32(usermodel.CompanyID.ToString()), 6, usermodel.RealName.ToString() + "的档案信息修改成功!" + "[" + ui_logcontent.Text + "]", WX.Main.CurUser.UserID, ui_logmanage.Value, Request.UserHostAddress); //7.返回处理结果或返回其它页面。 ULCode.Debug.Alert(this, "档案信息修改成功!", "User_Skill.aspx?UserID=" + usermodel.UserID.ToString() + "&companyid=" + usermodel.CompanyID.ToString()); } else { usermodel.RestoreInitial(); } }
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.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() { //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(); }
private void Delete() { string[] items = System.Configuration.ConfigurationManager.AppSettings[Request["appid"]].ToString().Split('|'); ULCode.KeyXmlString kxs10 = new ULCode.KeyXmlString(); int iR = 0; if (Request["table"] == "TU_Employees") { string userId = Request["keyvalue"]; Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); try { kxs10.LoadData(employee.DFields[Request["column"]].ToString()); } catch { } ULCode.KeyXmlString kxsnew = new ULCode.KeyXmlString(); int n = 0; foreach (String s in kxs10.GetItemValues("Node")) { if (Request["bu_submitdel" + n] == null) { ULCode.KeyXmlString kxs9 = new ULCode.KeyXmlString(); //kxs9.LoadData(s); for (int i = 0; i < items.Length; i++) { string[] item_2 = items[i].Split(';'); string uiname = ""; if (item_2[0].IndexOf("{") > -1) { uiname = item_2[0].Substring(0, item_2[0].IndexOf("{")); } else { uiname = item_2[0]; } kxs9.SetItemValue(uiname, Request["ui_" + uiname + n]); } kxsnew.AddItem("Node", kxs9.GetSavedData()); } n++; } employee.DFields[Request["column"]].value = kxsnew.GetSavedData(); iR = employee.Update(); } //5.(用户及业务对象)统计与状态 //7.返回处理结果或返回其它页面。 string pagename = ""; string nexturl = ""; switch (Request["column"]) { case "Education": pagename = "员工教育经历"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Skill": pagename = "员工个人技能"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Family": pagename = "员工家庭成员"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "Work": pagename = "员工工作经历"; nexturl = "User_UserList.aspx?CompanyID=11"; break; case "UrgentLink": pagename = "员工紧急联络人"; nexturl = "User_UserList.aspx?CompanyID=11"; break; default: break; } if (iR > 0) {//6.登记日志 WX.Main.AddLog(WX.LogType.Default, pagename + "删除成功!", ""); ULCode.Debug.Alert(this, pagename + "删除成功!"); } else { ULCode.Debug.Alert(Page, pagename + "删除失败!"); } }
private void PageInit() { string[] items = System.Configuration.ConfigurationManager.AppSettings[Request["appid"]].ToString().Split('|'); pagetitle = "<tr>"; if (!rReadOnly) { pagestr += "<tr>"; } for (int i = 0; i < items.Length; i++) { string[] item_2 = items[i].Split(';'); if (item_2[0].IndexOf("{") > -1) { pagetitle += "<td width='" + item_2[1] + "'>" + item_2[0].Substring(0, item_2[0].IndexOf("{")) + "</td>"; if (!rReadOnly) { string[] item_2_1 = item_2[0].Substring(item_2[0].IndexOf("{") + 1).Replace("}", "").Split(','); pagestr += "<td width='" + item_2[1] + "'><select name='ui_" + item_2[0].Substring(0, item_2[0].IndexOf("{")) + "' style='width:99%;'>"; for (int j = 0; j < item_2_1.Length; j++) { pagestr += "<option value='" + item_2_1[j] + "'>" + item_2_1[j] + "</option>"; } pagestr += "</select></td>"; } } else { pagetitle += "<td width='" + item_2[1] + "'>" + item_2[0] + "</td>"; if (!rReadOnly) { pagestr += "<td width='" + item_2[1] + "'><input type='text' style='width:99%;' name='ui_" + item_2[0] + "'></td>"; } } } if (!rReadOnly) { pagetitle += "<td style='width:90px;'>操作</td></tr>"; pagestr += "<td><input type='submit' value='添加' name='bu_submit' class='button'></td></tr>"; } //装载 ULCode.KeyXmlString kxs10 = new ULCode.KeyXmlString(); if (Request["table"] == "TU_Employees") { string userId = Request["keyvalue"]; Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'"); if (employee.DFields[Request["column"]].ToString().IndexOf("<KeyXmlString>") > -1) { kxs10.LoadData(employee.DFields[Request["column"]].ToString().Replace(" ", "")); } } int n = 0; foreach (String s in kxs10.GetItemValues("Node")) { pagestr += "<tr>"; ULCode.KeyXmlString kxs9 = new ULCode.KeyXmlString(); kxs9.LoadData(s); for (int i = 0; i < items.Length; i++) { string[] item_2 = items[i].Split(';'); if (item_2[0].IndexOf("{") > -1) { pagestr += "<td width='" + item_2[1] + "'><select name='ui_" + item_2[0].Substring(0, item_2[0].IndexOf("{")) + n + "' " + (rReadOnly ? "disabled='disabled'" : "") + " style='width:99%;' >"; string[] item_2_1 = item_2[0].Substring(item_2[0].IndexOf("{") + 1).Replace("}", "").Split(','); for (int j = 0; j < item_2_1.Length; j++) { pagestr += "<option value='" + item_2_1[j] + "' " + (kxs9.GetItemValue(item_2[0].Substring(0, item_2[0].IndexOf("{"))) == item_2_1[j] ? "selected" : "") + ">" + item_2_1[j] + "</option>"; } pagestr += "</select></td>"; } else { pagestr += "<td width='" + item_2[1] + "'><input type='text' style='width:99%;' name='ui_" + item_2[0] + n + "' " + (rReadOnly?"disabled='disabled'":"") + " value='" + kxs9.GetItemValue(item_2[0]) + "'></td>"; } } if (!rReadOnly) { pagestr += "<td><input type='submit' value='修改' name='bu_submiteidt' class='button'> <input type='submit' value='删除' name='bu_submitdel" + n + "' class='button'></td>"; } pagestr += "</tr>"; n++; } }
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"])); } } }