public ActionResult Create([Bind(Exclude = "Id_Driver")] Driver driver)
 {
     if (Ddao.AddDriver(driver))
     {
         return(RedirectToAction("Index"));
     }
     else
     {
         return(View("Create"));
     }
 }
Exemplo n.º 2
0
 public ActionResult CreateDriver([Bind(Exclude = "d")] Driver driver, int id)
 {
     try
     {
         if (driverDAO.AddDriver(driver, id))
         {
             return(RedirectToAction("IndexH"));
         }
         else
         {
             return(View("CreateDriver"));
         }
     }
     catch
     {
         return(View("CreateDriver"));
     }
 }