private void fillGrid()
 {
     accesssFlight();
     PassengerInfo.loadPassengersReserve(tnumber);
     FlightContainer.loadFlight(fnumber);
     fillText();
 }
Exemplo n.º 2
0
        private void fillLabels()
        {
            setTicketID(ReserveP.getTicketID());

            //MessageBox.Show(ticketID);

            SQLConnection.Instance.OpenConnection();

            int          flight;
            MySqlCommand findFlight = new MySqlCommand("Select FlightID from Reserve where ticketNo = '" + ticketID + "';", SQLConnection.Instance.GetConnection());

            flight = Convert.ToInt32(findFlight.ExecuteScalar());

            SQLConnection.Instance.CloseConnection();

            FlightContainer.loadFlight(flight);

            flight_label1.Text += " #" + FlightContainer.flightObject[0].getFlightNo() + " " + FlightContainer.flightObject[0].getDepart() +
                                  " to " + FlightContainer.flightObject[0].getArrive() + " Price: $" + Price.getReserveAmount(ticketID);
        }
        public static void loadFlight(int number)
        {
            DataSet dsFlight = new DataSet();

            SQLConnection.Instance.OpenConnection();

            MySqlCommand     flightData = new MySqlCommand("select * from Flight where FlightID = '" + number + "';", SQLConnection.Instance.GetConnection());
            MySqlDataAdapter daFlight   = new MySqlDataAdapter(flightData);

            daFlight.Fill(dsFlight);

            SQLConnection.Instance.CloseConnection();

            flightObject[0] = new FlightContainer();
            DataRow dataRow = dsFlight.Tables[0].Rows[0];

            flightObject[0].setFlightNo(Convert.ToInt32(dataRow[0]));
            flightObject[0].setDepart((string)dataRow[1]);
            flightObject[0].setArrive((string)dataRow[2]);
            flightObject[0].setAirline((string)dataRow[3]);
        }
Exemplo n.º 4
0
 private void fillEmail()
 {
     FlightContainer.loadFlight(FlightP.getFlightNumber());
     SendEmail(Customer.getEmail());
 }