コード例 #1
0
        private void comboStatistic_SelectedValueChanged(object sender, EventArgs e)
        {
            String current_value = comboStatistic.SelectedItem.ToString();

            if (current_value.Equals("All"))
            {
                dataGridStatistic.DataSource = null;
                dataGridStatistic.DataSource = flightDAO.GetAllFlight();
            }

            if (current_value.Equals("Booked-Ticket"))
            {
                dataGridStatistic.DataSource = null;
                dataGridStatistic.DataSource = flightDAO.GetAllBookedFlight();
            }

            if (current_value.Equals("Free-Ticket"))
            {
                dataGridStatistic.DataSource = null;
                dataGridStatistic.DataSource = flightDAO.GetAllFreeFlight();
            }
        }