void orgClient_GetDepartmentActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { //loadbar.Stop();//有错误停止转圈 SMT.SAAS.Application.ExceptionManager.SendException("用户管理", "Views/SysUserManagement--GetDepartmentActived"); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result == null) { return; } ObservableCollection <SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT> entTemps = e.Result; allDepartments = new List <SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allDepartments.Add(item); }); UICache.CreateCache("SYS_DepartmentInfo", allDepartments); BindCompany(); } }
void client_GetDepartmentAllCompleted(object sender, GetDepartmentAllCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (e.Result == null) { return; } ObservableCollection <T_HR_DEPARTMENT> entTemps = e.Result; allDepartments = new List <T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allDepartments.Add(item); }); UICache.CreateCache("ORGTREESYSDepartmentInfoALL", allDepartments); // BindDepartment(); BindCompany(); client.GetPostAllAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } }
void orgClient_GetDepartmentActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { if (e.Result == null) { return; } ObservableCollection <SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT> entTemps = e.Result; allDepartments = new List <SMT.Saas.Tools.OrganizationWS.T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allDepartments.Add(item); }); UICache.CreateCache("SYS_DepartmentInfo", allDepartments); BindCompany(); orgClient.GetPostActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } }
void client_GetDepartmentByEntityPermCompleted(object sender, GetDepartmentByEntityPermCompletedEventArgs e) { if (e.Error == null) { if (e.Result == null) { return; } ObservableCollection <T_HR_DEPARTMENT> entTemps = e.Result; allDepartments = new List <T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allDepartments.Add(item); }); UICache.CreateCache("SYS_DepartmentInfo", allDepartments); BindCompany(); client.GetPostByEntityPermAsync(CurrentUserID, Perm, Entity); } }
void orgClient_GetCompanyActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { loadbar.Stop();//有错误停止转圈 SMT.SAAS.Main.CurrentContext.AppContext.logAndShow("Views/SysUserManagement--GetCompanyActived"); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result == null) { return; } ObservableCollection <SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY> entTemps = e.Result; allCompanys = new List <SMT.Saas.Tools.OrganizationWS.T_HR_COMPANY>(); allCompanys.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allCompanys.Add(item); }); UICache.CreateCache("SYS_CompanyInfo", allCompanys); orgClient.GetDepartmentActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } }
void client_GetPostByEntityPermCompleted(object sender, GetPostByEntityPermCompletedEventArgs e) { if (e.Result != null) { List <T_HR_POST> entlist = e.Result.ToList(); UICache.CreateCache("SYS_PostInfo", entlist); } BindPosition(); }
/// <summary> /// 获取岗位 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetAllPostViewCompleted(object sender, GetAllPostViewCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { List <V_POST> vpostList = e.Result.ToList(); List <T_HR_POST> entlist = new List <T_HR_POST>(); foreach (var ent in vpostList) { T_HR_POST pt = new T_HR_POST(); pt.POSTID = ent.POSTID; pt.FATHERPOSTID = ent.FATHERPOSTID; pt.CHECKSTATE = ent.CHECKSTATE; pt.EDITSTATE = ent.EDITSTATE; pt.T_HR_POSTDICTIONARY = new T_HR_POSTDICTIONARY(); // pt.T_HR_POSTDICTIONARY.POSTDICTIONARYID = ent.POSTDICTIONARYID; pt.T_HR_POSTDICTIONARY.POSTNAME = ent.POSTNAME; // pt.T_HR_DEPARTMENT = new T_HR_DEPARTMENT(); pt.T_HR_DEPARTMENT = allDepartments.Where(s => s.DEPARTMENTID == ent.DEPARTMENTID).FirstOrDefault(); //pt.T_HR_DEPARTMENT = new T_HR_DEPARTMENT(); //pt.T_HR_DEPARTMENT.DEPARTMENTID = ent.DEPARTMENTID; //pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY = new T_HR_DEPARTMENTDICTIONARY(); //pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID = Guid.NewGuid().ToString(); // pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = ent.DEPARTMENTNAME; // pt.T_HR_DEPARTMENT.T_HR_COMPANY = new T_HR_COMPANY(); // pt.T_HR_DEPARTMENT.T_HR_COMPANY.COMPANYID = ent.COMPANYID; // pt.T_HR_DEPARTMENT.T_HR_COMPANY.CNAME = ent.CNAME; entlist.Add(pt); } UICache.CreateCache("ORGTREESYSPostInfo", entlist); } // BindPosition(); } else { loadbar.Stop(); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } } catch (Exception ex) { } }
/// <summary> /// 获取正常的公司 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetALLCompanyViewCompleted(object sender, GetALLCompanyViewCompletedEventArgs e) { if (e.Error == null) { if (e.Result == null) { return; } ObservableCollection <V_COMPANY> entTemps = e.Result; allCompanys = new List <T_HR_COMPANY>(); allCompanys.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); foreach (var ent in ents) { T_HR_COMPANY company = new T_HR_COMPANY(); company.COMPANYID = ent.COMPANYID; company.CNAME = ent.CNAME; company.ENAME = ent.ENAME; if (!string.IsNullOrEmpty(ent.BRIEFNAME)) { company.BRIEFNAME = ent.BRIEFNAME; } else { company.BRIEFNAME = ent.CNAME; } company.COMPANRYCODE = ent.COMPANRYCODE; company.SORTINDEX = ent.SORTINDEX; company.T_HR_COMPANY2 = new T_HR_COMPANY(); company.T_HR_COMPANY2.COMPANYID = ent.FATHERCOMPANYID; company.FATHERID = ent.FATHERID; company.FATHERTYPE = ent.FATHERTYPE; company.CHECKSTATE = ent.CHECKSTATE; company.EDITSTATE = ent.EDITSTATE; company.COMPANYTYPE = ent.COMPANYTYPE; allCompanys.Add(company); } UICache.CreateCache("ORGTREESYSCompanyInfo", allCompanys); client.GetAllDepartmentViewAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } else { loadbar.Stop(); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } }
void client_GetCompanyViewCompleted(object sender, GetCompanyViewCompletedEventArgs e) { if (e.Error == null) { if (e.Result == null) { return; } ObservableCollection <V_COMPANY> entTemps = e.Result; allCompanys = new List <T_HR_COMPANY>(); allCompanys.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); foreach (var ent in ents) { T_HR_COMPANY company = new T_HR_COMPANY(); company.COMPANYID = ent.COMPANYID; company.CNAME = ent.CNAME; company.ENAME = ent.ENAME; if (!string.IsNullOrEmpty(ent.BRIEFNAME)) { company.BRIEFNAME = ent.BRIEFNAME; } else { company.BRIEFNAME = ent.CNAME; } company.COMPANRYCODE = ent.COMPANRYCODE; company.SORTINDEX = ent.SORTINDEX; company.T_HR_COMPANY2 = new T_HR_COMPANY(); company.T_HR_COMPANY2.COMPANYID = ent.FATHERCOMPANYID; company.FATHERID = ent.FATHERID; company.FATHERTYPE = ent.FATHERTYPE; company.CHECKSTATE = ent.CHECKSTATE; company.EDITSTATE = ent.EDITSTATE; allCompanys.Add(company); } UICache.CreateCache("ORGTREESYSCompanyInfo" + Perm + Entity, allCompanys); client.GetDepartmentViewAsync(CurrentUserID, Perm, Entity); } else { loadbar.Stop(); } }
void client_GetPostViewCompleted(object sender, GetPostViewCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { List <V_POST> vpostList = e.Result.ToList(); List <T_HR_POST> entlist = new List <T_HR_POST>(); foreach (var ent in vpostList) { T_HR_POST pt = new T_HR_POST(); pt.POSTID = ent.POSTID; pt.FATHERPOSTID = ent.FATHERPOSTID; pt.CHECKSTATE = ent.CHECKSTATE; pt.EDITSTATE = ent.EDITSTATE; pt.T_HR_POSTDICTIONARY = new T_HR_POSTDICTIONARY(); // pt.T_HR_POSTDICTIONARY.POSTDICTIONARYID = ent.POSTDICTIONARYID; pt.T_HR_POSTDICTIONARY.POSTNAME = ent.POSTNAME; // pt.T_HR_DEPARTMENT = new T_HR_DEPARTMENT(); pt.T_HR_DEPARTMENT = allDepartments.Where(s => s.DEPARTMENTID == ent.DEPARTMENTID).FirstOrDefault(); //pt.T_HR_DEPARTMENT = new T_HR_DEPARTMENT(); //pt.T_HR_DEPARTMENT.DEPARTMENTID = ent.DEPARTMENTID; //pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY = new T_HR_DEPARTMENTDICTIONARY(); //pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID = Guid.NewGuid().ToString(); // pt.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = ent.DEPARTMENTNAME; // pt.T_HR_DEPARTMENT.T_HR_COMPANY = new T_HR_COMPANY(); // pt.T_HR_DEPARTMENT.T_HR_COMPANY.COMPANYID = ent.COMPANYID; // pt.T_HR_DEPARTMENT.T_HR_COMPANY.CNAME = ent.CNAME; entlist.Add(pt); } UICache.CreateCache("ORGTREESYSPostInfo" + Perm + Entity, entlist); } // BindPosition(); } } catch (Exception ex) { } loadbar.Stop(); }
void orgClient_GetPostActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } else { if (e.Result != null) { allPositions = e.Result.ToList(); } UICache.CreateCache("SYS_PostInfo", allPositions); BindPosition(); } }
/// <summary> /// 获取正常可用的部门 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void client_GetAllDepartmentViewCompleted(object sender, GetAllDepartmentViewCompletedEventArgs e) { if (e.Error == null) { if (e.Result == null) { return; } ObservableCollection <V_DEPARTMENT> entTemps = e.Result; allDepartments = new List <T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); foreach (var ent in ents) { T_HR_DEPARTMENT dep = new T_HR_DEPARTMENT(); dep.DEPARTMENTID = ent.DEPARTMENTID; dep.FATHERID = ent.FATHERID; dep.FATHERTYPE = ent.FATHERTYPE; dep.T_HR_DEPARTMENTDICTIONARY = new T_HR_DEPARTMENTDICTIONARY(); dep.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID = ent.DEPARTMENTDICTIONARYID; dep.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = ent.DEPARTMENTNAME; //dep.T_HR_COMPANY = new T_HR_COMPANY(); //dep.T_HR_COMPANY.COMPANYID = ent.COMPANYID; //dep.T_HR_COMPANY.CNAME = ent.CNAME; dep.T_HR_COMPANY = new T_HR_COMPANY(); dep.T_HR_COMPANY = allCompanys.Where(s => s.COMPANYID == ent.COMPANYID).FirstOrDefault(); dep.DEPARTMENTBOSSHEAD = ent.DEPARTMENTBOSSHEAD; dep.SORTINDEX = ent.SORTINDEX; dep.CHECKSTATE = ent.CHECKSTATE; dep.EDITSTATE = ent.EDITSTATE; allDepartments.Add(dep); } UICache.CreateCache("ORGTREESYSDepartmentInfo", allDepartments); BindCompany(); client.GetAllPostViewAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } else { loadbar.Stop(); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } }
void client_GetPostAllCompleted(object sender, GetPostAllCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { if (e.Result != null) { allPositions = e.Result.ToList(); } UICache.CreateCache("ORGTREESYSPostInfoALL", allPositions); BindPosition(); } }
void client_GetDepartmentViewCompleted(object sender, GetDepartmentViewCompletedEventArgs e) { if (e.Error == null) { if (e.Result == null) { return; } ObservableCollection <V_DEPARTMENT> entTemps = e.Result; allDepartments = new List <T_HR_DEPARTMENT>(); allDepartments.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); foreach (var ent in ents) { T_HR_DEPARTMENT dep = new T_HR_DEPARTMENT(); dep.DEPARTMENTID = ent.DEPARTMENTID; dep.FATHERID = ent.FATHERID; dep.FATHERTYPE = ent.FATHERTYPE; dep.T_HR_DEPARTMENTDICTIONARY = new T_HR_DEPARTMENTDICTIONARY(); dep.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTDICTIONARYID = ent.DEPARTMENTDICTIONARYID; dep.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME = ent.DEPARTMENTNAME; //dep.T_HR_COMPANY = new T_HR_COMPANY(); //dep.T_HR_COMPANY.COMPANYID = ent.COMPANYID; //dep.T_HR_COMPANY.CNAME = ent.CNAME; dep.T_HR_COMPANY = new T_HR_COMPANY(); dep.T_HR_COMPANY = allCompanys.Where(s => s.COMPANYID == ent.COMPANYID).FirstOrDefault(); dep.DEPARTMENTBOSSHEAD = ent.DEPARTMENTBOSSHEAD; dep.SORTINDEX = ent.SORTINDEX; dep.CHECKSTATE = ent.CHECKSTATE; dep.EDITSTATE = ent.EDITSTATE; allDepartments.Add(dep); } UICache.CreateCache("ORGTREESYSDepartmentInfo" + Perm + Entity, allDepartments); BindCompany(); client.GetPostViewAsync(CurrentUserID, Perm, Entity); } else { loadbar.Stop(); } }
//void orgClient_GetDepartmentActivedByCompanyIDCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedByCompanyIDCompletedEventArgs e) //{ //} void orgClient_GetPostActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result != null) { allPositions = e.Result.ToList(); } UICache.CreateCache("SYS_PostInfo", allPositions); //BindPosition(); } }
void orgClient_GetPostActivedCompleted(object sender, SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs e) { if (e.Error != null && e.Error.Message != "") { loadbar.Stop();//有错误停止转圈 SMT.SAAS.Main.CurrentContext.AppContext.logAndShow("Views/SysUserManagement--GetDepartmentActived"); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); return; } else { if (e.Result != null) { allPositions = e.Result.ToList(); } UICache.CreateCache("SYS_PostInfo", allPositions); } }