public JsonResult GetDomains(RolePaginInfo PaginInfo) { DomainListFilter Filter = new DomainListFilter(); Filter.CurrentPage = PaginInfo.CurrentPage; Filter.ItemsPerPage = PaginInfo.ItemsPerPage; Filter.SortOrderAsc = PaginInfo.SortOrderAsc; Filter.SortColumn = PaginInfo.SortColumn; Filter.SortColumnName = "DomainID"; switch (PaginInfo.SortColumn) { case 1: Filter.SortColumnName = "DomainID"; break; case 2: Filter.SortColumnName = "Name"; break; case 3: Filter.SortColumnName = "Description"; break; case 4: Filter.SortColumnName = "Created"; break; case 5: Filter.SortColumnName = "Modified"; break; } var totalItems = 0; var domains = Web.Admin.Logic.Collections.Domains.Get(Filter, out totalItems); return(Json(new { Html = this.RenderPartialView("_DomainList", new DomainListModel(PaginInfo.HolderName, domains, Filter, totalItems)) }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetRoles(RolePaginInfo PaginInfo) { RoleListFilter Filter = new RoleListFilter(); Filter.CurrentPage = PaginInfo.CurrentPage; Filter.ItemsPerPage = PaginInfo.ItemsPerPage; Filter.SortOrderAsc = PaginInfo.SortOrderAsc; Filter.SortColumn = PaginInfo.SortColumn; Filter.SortColumnName = "RoleID"; switch (PaginInfo.SortColumn) { case 2: Filter.SortColumnName = "Name"; break; case 3: Filter.SortColumnName = "MemberCount"; break; case 6: Filter.SortColumnName = "Created"; break; case 7: Filter.SortColumnName = "Modified"; break; case 5: Filter.SortColumnName = "Settings"; break; } var totalItems = 0; var roles = Web.Admin.Logic.Collections.Roles.Get(Filter, out totalItems); return(Json(new { Html = this.RenderPartialView("_RoleList", new RoleListModel(PaginInfo.HolderName, roles, Filter, totalItems)) }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetDomains(RolePaginInfo PaginInfo) { DomainListFilter Filter = new DomainListFilter(); Filter.CurrentPage = PaginInfo.CurrentPage; Filter.ItemsPerPage = PaginInfo.ItemsPerPage; Filter.SortOrderAsc = PaginInfo.SortOrderAsc; Filter.SortColumn = PaginInfo.SortColumn; Filter.SortColumnName = "DomainID"; switch (PaginInfo.SortColumn) { case 1: Filter.SortColumnName = "DomainID"; break; case 2: Filter.SortColumnName = "Name"; break; case 3: Filter.SortColumnName = "Description"; break; case 4: Filter.SortColumnName = "Created"; break; case 5: Filter.SortColumnName = "Modified"; break; } var totalItems = 0; var domains = Web.Admin.Logic.Collections.Domains.Get(Filter, out totalItems); return Json(new { Html = this.RenderPartialView("_DomainList", new DomainListModel(PaginInfo.HolderName, domains, Filter, totalItems)) }, JsonRequestBehavior.AllowGet); }
public JsonResult GetRoles(RolePaginInfo PaginInfo) { RoleListFilter Filter = new RoleListFilter(); Filter.CurrentPage = PaginInfo.CurrentPage; Filter.ItemsPerPage = PaginInfo.ItemsPerPage; Filter.SortOrderAsc = PaginInfo.SortOrderAsc; Filter.SortColumn = PaginInfo.SortColumn; Filter.SortColumnName = "RoleID"; switch (PaginInfo.SortColumn) { case 2: Filter.SortColumnName = "Name"; break; case 3: Filter.SortColumnName = "MemberCount"; break; case 6: Filter.SortColumnName = "Created"; break; case 7: Filter.SortColumnName = "Modified"; break; case 5: Filter.SortColumnName = "Settings"; break; } var totalItems = 0; var roles = Web.Admin.Logic.Collections.Roles.Get(Filter, out totalItems); return Json(new { Html = this.RenderPartialView("_RoleList", new RoleListModel(PaginInfo.HolderName, roles,Filter,totalItems)) }, JsonRequestBehavior.AllowGet); }