Esempio n. 1
0
 public ActionResult Index(string displayAll)
 {
     bool showAll = (displayAll != null) && Convert.ToBoolean(displayAll);
     var model = new HomeViewModel();
     model.Websites = Helpers.MongoDbService.GetCourtWebsites(showAll).ToList();
     model.DisplayAll = showAll;
     return View(model);
 }
Esempio n. 2
0
 public ActionResult AddNewSite(HomeViewModel model)
 {
     Helpers.MongoDbService.InsertNewCourt(model.CourtName, model.Url, model.CourtKey, model.XPath);
     return RedirectToAction("Index", "Home");
 }