Пример #1
0
        public ActionResult Index(string sortOrder, string searchString)
        {
            ViewBag.NameSortParm      = string.IsNullOrEmpty(sortOrder) ? "name_desc" : "";
            ViewBag.IdSortParm        = sortOrder == "Id" ? "id_desc" : "Id";
            ViewBag.StartDateSortParm = sortOrder == "StartDate" ? "startDate_desc" : "StartDate";
            ViewBag.EndDateSortParm   = sortOrder == "EndDate" ? "endDate_desc" : "EndDate";
            List <Experiment> experiments = _eRepository.LoadList(sortOrder, searchString);

            ViewBag.SelectedType = "Experiment";
            ViewBag.Sortable     = true;
            ViewBag.SearchString = searchString;
            return(View(experiments));
        }