예제 #1
0
파일: Ingres.cs 프로젝트: JordanChin/Ingres
 //Constructors
 public Airport(String Country, String Region, String ICAOcode)
 {
     country = Country;
     region = Region;
     icaocode = ICAOcode;
     countryDataSet = null;
     regionDataSet = null;
     icaocodeDataSet = null;
 }
예제 #2
0
파일: Routes.cs 프로젝트: JordanChin/Ingres
        // Name: regionComboBox_SelectedIndexChanged
        //
        // Description:
        //      This event causes the airportComboBox to be populated with
        //      results restricted by region.
        //      Cursor is updated during the loading of data.
        //
        // Inputs:
        //      sender          Form control object
        //      e               Event arguments
        //
        // Outputs:
        //      departAirportComboBox
        //      arriveAirportComboBox
        //      profileAirportComboBox
        //
        // Returns:
        //      None.
        //
        // History:
        //      02-Oct-2006 ([email protected])
        //          Created.
        private void regionComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;
            AirportDataSet airportDataSet = new AirportDataSet();

            int direction = DEPART;
            if ((comboBox.SelectedValue != null) && (comboBox.SelectedIndex >= 0))
            {
                if (sender == departRegionComboBox)
                {
                    departing.icaocode = comboBox.SelectedValue.ToString();
                    departIatacodeBindingSource.DataSource = airportDataSet.Tables["airport"];
                    departAirportComboBox.DataSource = departIatacodeBindingSource;
                    iataCodeComboBox = departAirportComboBox;
                }
                if (sender == arriveRegionComboBox)
                {
                    direction = ARRIVE;
                    arriving.icaocode = comboBox.SelectedValue.ToString();
                    arriveIatacodeBindingSource.DataSource = airportDataSet.Tables["airport"];
                    arriveAirportComboBox.DataSource = arriveIatacodeBindingSource;
                    iataCodeComboBox = arriveAirportComboBox;
                }
                if (sender == profileRegionComboBox)
                {
                    profile.icaocode = comboBox.SelectedValue.ToString();
                    profileIatacodeBindingSource.DataSource = airportDataSet.Tables["airport"];
                    profileAirportComboBox.DataSource = profileIatacodeBindingSource;
                    iataCodeComboBox = profileAirportComboBox;
                }
                this.Cursor = Cursors.WaitCursor;
                LoadAirport(direction, comboBox.SelectedValue.ToString(),
                    airportDataSet.Tables["airport"]);
                if (airportDataSet.Tables["airport"].Rows.Count > 0)
                {
                    ShowAirportNames(direction, comboBox.SelectedValue.ToString(),
                        airportDataSet.Tables["airportName"]);
                }
                else
                {
                    DialogResult result = MessageBox.Show(rm.GetString("EmptyAirport"),
                        rm.GetString("EmptyResultsCaption"),
                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                iataCodeComboBox.Enabled = true;
                this.Cursor = Cursors.Arrow;
            }
        }
예제 #3
0
파일: Ingres.cs 프로젝트: JordanChin/Ingres
 public Airport(String Country)
 {
     country = Country;
     region = null;
     icaocode = null;
     countryDataSet = null;
     regionDataSet = null;
     icaocodeDataSet = null;
 }