Пример #1
0
        private void EmployeesSearch()
        {
            var users = CoreContext.UserManager.Search(SearchText, EmployeeStatus.Active);

            if (users.Length == 0)
            {
                return;
            }

            NumberOfStaffFound = users.Length;
            EmployeesSearchRepeater.DataSource = NumberOfStaffFound > 5 ? users.Take(5) : users;
            EmployeesSearchRepeater.DataBind();
        }
Пример #2
0
        public void InitEmployeesSearchRepeater()
        {
            if (ProjectID == -1)
            {
                var users = CoreContext.UserManager.Search(SearchText, EmployeeStatus.Active);
                NumberOfStaffFound = users.Length;

                if (0 < NumberOfStaffFound)
                {
                    EmployeesSearchRepeater.DataSource = NumberOfStaffFound > 5 ? users.Take(5) : users;
                }
                else
                {
                    EmployeesSearchRepeater.DataSource = null;
                }
                EmployeesSearchRepeater.DataBind();
            }
        }