Exemplo n.º 1
0
 public ActionResult Booking(BookingFlightViewModel model)
 {
     bookingid();
     int i = new Bal().UserBooking(Session["bookingid"].ToString(), Session["uname"].ToString(), model.txtfcompany, model.txtfno, model.txtsource, model.txtdestination, model.txtbookingdate, model.txtarrdate, model.txtArrivTime, model.txtdepdate, model.txtdeptime, Convert.ToInt32(model.txtbookingseats), model.txtamt, model.txttotamt);
     if (i > 0)
     {
         TempData["message"] = "Flight Booking Completed\n Please Pay The Amount";
     Session["totalamountt"] = model.txttotamt;
     //return View(@"~\Views\Customer\Payment.cshtml", model);
     return RedirectToAction("Payment");
 }
 else
     return RedirectToAction("Message");
 }
Exemplo n.º 2
0
        public ActionResult FlightDetailss(string FlightNum, string userype)
        {
            DataTable sdr = new Bal().getFlightDetails(FlightNum).Tables[0];
            var flighDetails = new BookingFlightViewModel();

            foreach (DataRow row in sdr.Rows)
            {
                if (FlightNum == row["FlightNumber"].ToString())
                {
                    flighDetails.txtfcompany = row["FlightCompany"].ToString();
                    flighDetails.txtsource = row["Source"].ToString();
                    flighDetails.txtdestination = row["Destination"].ToString();
                    flighDetails.txtarrdate = row["ArrivalDate"].ToString();
                    flighDetails.txtArrivTime = row["Arrivaltime"].ToString();
                    flighDetails.txtdepdate = row["DepatureDate"].ToString();
                    flighDetails.txtdeptime = row["Deptime"].ToString();
                    flighDetails.txtnoofseats = row["NumberOfSeats"].ToString();
                    flighDetails.txtamt = row["PerSeatAmount"].ToString();
                    flighDetails.txtfno = row["FlightNumber"].ToString();
                }
            }
           
            return View(@"~\Views\Customer\FlightBooking.cshtml", flighDetails);
    }