コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            GetSearchFlight f = new GetSearchFlight(this);

            f.Show();
            this.Hide();
        }
コード例 #2
0
        private void SearchFlightForm_Load(object sender, EventArgs e)
        {
            DataTable dt = controllerObj.GetFlightDetailsPNR(PNRin, Surnamein);

            if (dt != null)
            {
                DataRow row  = dt.Rows[0];
                string  PNRs = "";
                PNRs = row["BOOKINGPNR"].ToString();

                string Fnames = "";
                Fnames = row["Fname"].ToString();

                string Lnames = "";
                Lnames = row["Lname"].ToString();

                string Passnums = "";
                Passnums = row["PassportNo"].ToString();

                string Airlines = "";
                Airlines = row["Airline"].ToString();

                string Flightnos = "";
                Flightnos = row["FlightNo"].ToString();

                string Times = "";
                Times = row["Time"].ToString();

                string Planetypes = "";
                Planetypes = row["PlaneType"].ToString();

                string Citys = "";
                Citys = row["City"].ToString();

                string Terminals = "";
                Terminals = row["Terminal"].ToString();

                bool ARRDEP;
                ARRDEP = (bool)row["ArrDep"];

                string Dates = "";
                Dates = row["Date"].ToString();

                string PlanManus = "";
                PlanManus = row["Manufacturer"].ToString();

                PNRdisp.Text    = PNRs;
                Fname.Text      = Fnames + " " + Lnames;
                PassportNo.Text = Passnums;
                Airline.Text    = Airlines;
                FlightNo.Text   = Flightnos;
                Date.Text       = Dates;
                Time.Text       = Times;
                string PlaneTypeComplete = PlanManus + " " + Planetypes;
                PlaneType.Text = PlaneTypeComplete;
                if (ARRDEP)
                {
                    Origin.Text      = "Cairo";
                    Destination.Text = Citys;
                }
                else
                {
                    Origin.Text      = Citys;
                    Destination.Text = "Cairo";
                }
                Terminal.Text = Terminals;
            }
            else
            {
                MessageBox.Show("Booking not found! Try Again");
                this.Hide();
                getSearchFlight.Show();
            }
        }