Ejemplo n.º 1
0
 public ActionResult Create(ATour tour)
 {
     try
     {
         if (ModelState.IsValid)
         {
             BTourGuideOp tourOp = new BTourGuideOp();
             tourOp.AddTour(tour);
             return RedirectToAction("Index");
         }
         else
         {
             return View();
         }
     }
     catch(Exception e)
     {
         TempData["CreateException"] = "Error in tour creation: " + e.Message;
         return View();
     }
 }