Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
            else
            {
                loadbar.Stop();
            }
        }