public List<Project> SortProjects(CMS.DocumentEngine.DocumentQuery<Project> query, string sortOrder) { List<string> viewBagFields = SortHelper.GetProjectsSortViewBagFields(sortOrder); ViewBag.ProjectNameSortParam = viewBagFields[0]; ViewBag.DeliverySortParam = viewBagFields[1]; SortHelper.SortByColumn(query, sortOrder); return query.ToList(); }
public List<Employee> SortEmployees(CMS.DocumentEngine.DocumentQuery<Employee> query, string sortOrder) { List<string> viewBagFields = SortHelper.GetEmployeesSortViewBagFields(sortOrder); ViewBag.FirstNameSortParam = viewBagFields[0]; ViewBag.LastNameSortParam = viewBagFields[1]; ViewBag.PositionSortParam = viewBagFields[2]; SortHelper.SortByColumn(query, sortOrder); return query.ToList(); }