public ActionResult EditFlight(int id, AdminFlight inFlight) { if (ModelState.IsValid) { if (_AdminBll.editFlight(id, inFlight)) { TempData["FlightEdit"] = true; return(RedirectToAction("ListFlight")); } } return(RedirectToAction("Error")); }
public string editFlight(int id, int fromAirportId, int toAirportId, DateTime departure, DateTime arrival, int price) { var jsonSerializer = new JavaScriptSerializer(); return(jsonSerializer.Serialize(_adminBLL.editFlight(id, fromAirportId, toAirportId, departure, arrival, price))); }