public ActionResult Booking(Passenger passenger, Guid flightId, string dateVal, string bagagge) { passenger.Id = Guid.NewGuid(); PassengerFlight passengerFlight = new PassengerFlight { Id = Guid.NewGuid(), PassengerId = passenger.Id, FlightId = flightId, DateDeparture = DateTime.Parse(dateVal) }; if (bagagge == "1") { passengerFlight.BaggageCode = Guid.NewGuid(); } db.Passengers.Add(passenger); db.PassengerFlights.Add(passengerFlight); db.SaveChanges(); return(RedirectToAction("Details", new { passengerId = passenger.Id })); }
/** * @param CurrentFlight * @param CurrentAirline * @return */ public bool BuyTicket(PassengerFlight CurrentFlight, Airline CurrentAirline) { // TODO implement here return False; }
/** * @param NewID * @param NewFlight * @param NewSeatNumber */ public void Ticket(int NewID, PassengerFlight NewFlight, int NewSeatNumber) { // TODO implement here }