Exemplo n.º 1
0
 public ActionResult EditFlight(int id, AdminFlight inFlight)
 {
     if (ModelState.IsValid)
     {
         if (_AdminBll.editFlight(id, inFlight))
         {
             TempData["FlightEdit"] = true;
             return(RedirectToAction("ListFlight"));
         }
     }
     return(RedirectToAction("Error"));
 }
Exemplo n.º 2
0
        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)));
        }