// GET: /ListUnDeleted public ActionResult ListUnDeleted(string filter, int?page, string sortField, int?sortOrder, int ft = 0) { //Check Exists if (ft == 0) { ViewData["ActionMethod"] = "ListUnDeletedGet"; return(View("RecordDoesNotExistError")); } //SortField if (sortField != "HierarchyType" && sortField != "LinkedItemCount") { sortField = "ClientFeeGroupName"; } ViewData["CurrentSortField"] = sortField; //SortOrder if (sortOrder == 1) { ViewData["NewSortOrder"] = 0; ViewData["CurrentSortOrder"] = 1; } else { ViewData["NewSortOrder"] = 1; ViewData["CurrentSortOrder"] = 0; sortOrder = 0; } ClientFeeGroupsVM clientFeeGroupsVM = new ClientFeeGroupsVM(); clientFeeGroupsVM.FeeTypeId = ft; clientFeeGroupsVM.FeeTypeDisplayName = clientFeeGroupRepository.FeeTypeDisplayName(ft); clientFeeGroupsVM.FeeTypeDisplayNameShort = clientFeeGroupRepository.FeeTypeDisplayNameShort(ft); //Set Access Rights if (hierarchyRepository.AdminHasDomainWriteAccess(groupName)) { clientFeeGroupsVM.HasDomainWriteAccess = true; } if (clientFeeGroupRepository != null) { var clientFeeGroups = clientFeeGroupRepository.PageClientFeeGroups(clientFeeGroupsVM.FeeTypeId, false, page ?? 1, filter ?? "", sortField, sortOrder ?? 0); if (clientFeeGroups != null) { clientFeeGroupsVM.ClientFeeGroups = clientFeeGroups; } } //return items return(View(clientFeeGroupsVM)); }
// GET: /ListOrphaned public ActionResult ListOrphaned(int ft, string filter, int?page, string sortField, int?sortOrder) { //Set Access Rights ViewData["Access"] = ""; if (hierarchyRepository.AdminHasDomainWriteAccess(groupName)) { ViewData["Access"] = "WriteAccess"; } //SortField sortField = "ClientFeeGroupName"; ViewData["CurrentSortField"] = sortField; //SortOrder if (sortOrder == 1) { ViewData["NewSortOrder"] = 0; ViewData["CurrentSortOrder"] = 1; } else { ViewData["NewSortOrder"] = 1; ViewData["CurrentSortOrder"] = 0; } ClientFeeGroupsVM clientFeeGroupsVM = new ClientFeeGroupsVM(); clientFeeGroupsVM.FeeTypeId = ft; clientFeeGroupsVM.FeeTypeDisplayName = clientFeeGroupRepository.FeeTypeDisplayName(ft); clientFeeGroupsVM.FeeTypeDisplayNameShort = clientFeeGroupRepository.FeeTypeDisplayNameShort(ft); //Set Access Rights if (hierarchyRepository.AdminHasDomainWriteAccess(groupName)) { clientFeeGroupsVM.HasDomainWriteAccess = true; } //return items clientFeeGroupsVM.ClientFeeGroupsOrphaned = clientFeeGroupRepository.PageOrphanedClientFeeGroups(clientFeeGroupsVM.FeeTypeId, page ?? 1, filter ?? "", sortField, sortOrder ?? 0); return(View(clientFeeGroupsVM)); }