コード例 #1
0
ファイル: CompanyTree.xaml.cs プロジェクト: jjg0519/OA
        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);
            }
        }