Пример #1
0
        private StaffSummary GetStaffByID(string id)
        {
            StaffSummary staff = null;

            Platform.GetService <IStaffAdminService>(service =>
            {
                ListStaffResponse response = service.ListStaff(
                    new ListStaffRequest(id, null, null, null, null, true));
                staff = CollectionUtils.FirstElement(response.Staffs);
            });
            return(staff);
        }
Пример #2
0
        /// <summary>
        /// Gets the list of items to show in the table, according to the specifed first and max items.
        /// </summary>
        /// <returns></returns>
        protected override IList <StaffSummary> ListItems(ListStaffRequest request)
        {
            ListStaffResponse listResponse = null;

            Platform.GetService <IStaffAdminService>(
                delegate(IStaffAdminService service)
            {
                request.StaffTypesFilter = _staffTypesFilter;
                request.FamilyName       = _lastName;
                request.GivenName        = _firstName;
                listResponse             = service.ListStaff(request);
            });

            return(listResponse.Staffs);
        }