예제 #1
0
 public ActionResult Edit(Cars auto)
 {
     try
     {
         if (transportDAO.EditTransport(auto, 1))
         {
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View("Edit"));
         }
     }
     catch
     {
         return(View("Edit"));
     }
 }
 public ActionResult EditTransport(int id, Transport transport)
 {
     try
     {
         if (transportDAO.EditTransport(id, transport))
         {
             return(RedirectToAction("GetAllTransports"));
         }
         else
         {
             return(View("EditTransport"));
         }
     }
     catch
     {
         return(View("EditTransport"));
     }
 }