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 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("ORGTREESYSDepartmentInfo", allDepartments); UICache.CreateCache("SYS_DepartmentInfo", allDepartments); BindCompany(); orgClient.GetPostActivedAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } }