Exemple #1
0
        public async Task <ActionResult> View(int policlinicId, int page = 1, int pageSize = 10, SortOprions sortOrder = SortOprions.Number, string search = "")
        {
            ViewBag.searchQuery          = String.IsNullOrEmpty(search) ? "" : search;
            ViewBag.NameSortParam        = sortOrder == SortOprions.Name ? "Name_desc" : "Name";
            ViewBag.PhoneNumberSortParam = sortOrder == SortOprions.PhoneNumber ? "PhoneNumber_desc" : "PhoneNumber";
            ViewBag.EmailSortParam       = sortOrder == SortOprions.Email ? "Email_desc" : "Email";
            ViewBag.PolyclinicSortParam  = sortOrder == SortOprions.Polyclinic ? "Polyclinic_desc" : "Polyclinic";
            ViewBag.PositionSortParam    = sortOrder == SortOprions.Position ? "Position_desc" : "Position";
            ViewBag.CurrentSort          = sortOrder;
            var view = await _personalService.GetAllForPoliclinicAsync(policlinicId, page, pageSize, sortOrder, search);

            return(View(view));
        }