コード例 #1
0
        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            var test = comboBox1.SelectedItem as VihecalType;

            if (test == null)
            {
                return;
            }

            var ts = TransportModel.GetTransport(test.name);



            dataGridView1.DataSource = RideModel.GetRides(ts.Id.ToString(), (comboBox2.SelectedItem as RoutView).Id.ToString());
        }
コード例 #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            var test = comboBox1.SelectedItem as VihecalType;

            if (test == null)
            {
                return;
            }

            var ts = TransportModel.GetTransport(test.name);

            comboBox2.Enabled = true;
            comboBox2.Items.AddRange(RouteModel.GetAllRoutes(ts.Id.ToString()).ToArray());

            dataGridView1.DataSource = RideModel.GetRides(ts.Id.ToString(), null);
        }
コード例 #3
0
 private void Time_Table_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = RideModel.GetRides(null, null);
 }