Exemple #1
0
        public ActionResult Search(string search, int currentPage = 1)
        {
            ViewBag.Type = "MainSearch";
            List <KindergartenListItemViewModel> kindergartenListItemViewModels = KindergartenManager.GetFormatKindergartenListViewModel(false, User.Identity.GetUserId(), search, null, null, (currentPage - 1) * 5, 5);

            ViewBag.CountOfPages = Convert.ToInt32(kindergartenListItemViewModels.Count / 5) + 1;
            ViewBag.CurrentPage  = currentPage;
            return(View(kindergartenListItemViewModels));
        }
Exemple #2
0
 public ActionResult MyKindergartens()
 {
     if (User.Identity.IsAuthenticated)
     {
         ViewBag.Link = "/MyKindergartens";
         return(View("Index", KindergartenManager.GetFormatKindergartenListViewModel(true, User.Identity.GetUserId(), null, null, null, -1, -1)));
     }
     return(RedirectToAction("Index", "Home"));
 }
Exemple #3
0
 public ActionResult AdvancedSearch(string search, string searchBy, string sortBy)
 {
     ViewBag.Type = "AdvancedSearch";
     return(View("Search", KindergartenManager.GetFormatKindergartenListViewModel(false, User.Identity.GetUserId(), search, searchBy, sortBy, -1, -1)));
 }