BgEngine.Controllers.RoleController.Index C# (CSharp) Метод

Index() приватный Метод

private Index ( int page, string sort, string sortdir ) : System.Web.Mvc.ViewResult
page int
sort string
sortdir string
Результат System.Web.Mvc.ViewResult
        public ViewResult Index(int? page, string sort, string sortdir)
        {
            ViewBag.RowsPerPage = BgResources.Pager_UsersPerPage;
            ViewBag.TotalRoles = AccountServices.TotalNumberOf<Role>();
            var pageIndex = page ?? 0;
            bool dir;
            if (sortdir == null)
            {
                dir = false;
            }
            else
            {
                dir = sortdir.Equals("ASC", StringComparison.CurrentCultureIgnoreCase) ? true : false;
            }
            return View(AccountServices.RetrievePagedRoles(sort, pageIndex,dir));
        }