Ejemplo n.º 1
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            if (id > 0 && ModelState.IsValid)
            {
                Fdao.DeleteFlight(id);
                return(RedirectToAction("Index"));
            }

            else
            {
                return(View());
            }
        }
 public ActionResult DeleteFlight(int id, Flight flight)
 {
     try
     {
         if (flightDAO.DeleteFlight(id))
         {
             return(RedirectToAction("GetAllRoutes"));
         }
         else
         {
             return(View("DeleteFlight"));
         }
     }
     catch
     {
         return(View("DeleteFlight"));
     }
 }
Ejemplo n.º 3
0
 // FLIGHT DELETE's PROCESS
 public ActionResult FlightDelete(string id) => IsLoggedIn() && FlightDAO.DeleteFlight(id) ? Content("OK") : Content("Error");