Exemplo n.º 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            FlightDetails flightDetails = new FlightDetails();

            if (counter == 1)
            {
                ResultsForm resultsForm = new ResultsForm(1);
                resultsForm.Show();
                this.Hide();
            }
            else if (counter == 3)
            {
                ResultsForm resultsForm = new ResultsForm(3);
                resultsForm.Show();
                this.Hide();
            }
            else if (counter == 4)
            {
                ResultsForm resultsForm = new ResultsForm(4);
                resultsForm.Show();
                this.Hide();
            }
            else if (counter == 7)
            {
                ResultsForm resultsForm = new ResultsForm(7);
                resultsForm.Show();
                this.Hide();
            }
            else if (counter == 8)
            {
                ResultsForm resultsForm = new ResultsForm(8);
                resultsForm.Show();
                this.Hide();
            }
        }
Exemplo n.º 2
0
        public ResultsForm(int idFlight)
        {
            InitializeComponent();
            //bs.DataSource = flightDetails.getSelectedFlight(1);\
            FlightDetails flight = new FlightDetails();

            bs.DataSource = flight.getSelectedFlight(idFlight);
            txtName.Text  = bs.DataMember = "Name";
            txtFuel.Text  = bs.DataMember = "Fuel";
            txtSpeed.Text = bs.DataMember = "Speed";
        }