Ejemplo n.º 1
0
 public ActionResult CreateLocation(Location l)
 {
     try
     {
         if (ModelState.IsValid)
         {
             LocationDbHandler ldb = new LocationDbHandler();
             if (ldb.AddLocation(l))
             {
                 ViewBag.Message = "Location Created Correctly";
                 ModelState.Clear();
             }
         }
         return(RedirectToAction("Index", "Home", null));
     }
     catch
     {
         return(View());
     }
 }