Esempio n. 1
0
        public void TestFindGroup(String parentGroupName, String groupName)
        {
            IStaffService staffService = DvConnection.ObjectContext.GetService <IStaffService>();
            var           group        = staffService.FindGroupByName(null, "parentGroupName");

            if (group == null)
            {
                return;
            }
            var groupLevel = group.Groups.Where(s => s.Name == parentGroupName).FirstOrDefault();

            if (groupLevel == null)
            {
                return;
            }
            var groupCurrent = staffService.FindGroupByName(groupLevel, groupName);
            IEnumerable <StaffEmployee> employees = staffService.GetGroupEmployees(groupCurrent, true, true, true);
        }
Esempio n. 2
0
        //Получить сотрудников из группы
        private IEnumerable <StaffEmployee> GetEmployeesFromGroup(String parentGroupName, String groupName)
        {
            IStaffService staffService = DvConnection.ObjectContext.GetService <IStaffService>();
            var           group        = staffService.FindGroupByName(null, parentGroupName);

            if (group == null)
            {
                return(null);
            }
            var groupCurrent = staffService.FindGroupByName(group, groupName);

            if (groupCurrent == null)
            {
                return(null);
            }

            IEnumerable <StaffEmployee> employees = staffService.GetGroupEmployees(groupCurrent, true, true, true);

            return(employees);
        }