void client_GetCompanyAllCompleted(object sender, GetCompanyAllCompletedEventArgs 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_COMPANY> entTemps = e.Result; allCompanys = new List <T_HR_COMPANY>(); allCompanys.Clear(); var ents = entTemps.OrderBy(c => c.FATHERID); ents.ForEach(item => { allCompanys.Add(item); }); UICache.CreateCache("ORGTREESYSCompanyInfoALL", allCompanys); // BindCompany(); client.GetDepartmentAllAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID); } }
void organClient_GetCompanyAllCompleted(object sender, GetCompanyAllCompletedEventArgs e) { if (e.Error == null) { if (e.Result != null) { App.Current.Resources.Add("SYS_CompanyInfo", e.Result.ToList()); organClient.GetDepartmentAllAsync(""); } } }