Esempio n. 1
0
        public ActionResult SearchTest(string testname)
        {
            TestsListViewModel tests = new TestsListViewModel
            {
                Tests           = repository.SelectTestsByName(testname),
                CurrentCategory = null,
                CurrentLevel    = null,
                PagingInfo      = new PagingInfo {
                    CurrentPage = 1, ItemsPerPage = repository.SelectTestsByName(testname).Count(), TotalItems = repository.SelectTestsByName(testname).Count()
                }
            };

            return(View("List", tests));
        }
Esempio n. 2
0
 public ActionResult AdminIndex(string SearchedTestName = null)
 {
     ViewBag.NavBarActive = "ტესტები";
     if (SearchedTestName != null && SearchedTestName != "")
     {
         return(View(repository.SelectTestsByName(SearchedTestName)));
     }
     return(View(repository.Tests.Where(t => t.IsActive == "Yes")));
 }
        public ActionResult SearchTestRaitings(string tname)
        {
            List <TestRaitingViewModel> tests = new List <TestRaitingViewModel>();

            foreach (Test t in repository.SelectTestsByName(tname))
            {
                tests.Add(new TestRaitingViewModel {
                    Test = t, UserResutls = t.UserResults
                });
            }
            return(View(tests));
        }