void loadcombo() { comboBox1.DataSource = a.LoadTuyenXe(); comboBox1.DisplayMember = "TenTuyen"; comboBox1.ValueMember = "IdTuyen"; comboBox2.DataSource = a.loadxe(); comboBox2.DisplayMember = "So_Xe"; comboBox2.ValueMember = "So_Xe"; comboIdChuyn.DataSource = a.loadidchuyen(); comboIdChuyn.DisplayMember = "IdChuyen"; comboIdChuyn.ValueMember = "IdChuyen"; comboBoxIdtuyen.DataSource = a.LoadTuyenXe(); comboBoxIdtuyen.DisplayMember = "TenTuyen"; comboBoxIdtuyen.ValueMember = "IdTuyen"; comboBox3.DataSource = a.loadxe(); comboBox3.DisplayMember = "So_Xe"; comboBox3.ValueMember = "So_Xe"; comboBox4.DataSource = a.loadidchuyen(); comboBox4.DisplayMember = "IdChuyen"; comboBox4.ValueMember = "IdChuyen"; }
// int flag = 0; public QuanLyTuyen() { InitializeComponent(); // comboBox1.Visible = false; comboBox1.DataSource = b.LoadTuyenXe(); comboBox1.DisplayMember = "IdTuyen"; comboBox1.ValueMember = "IdTuyen"; comboBox2.DataSource = b.LoadTuyenXe(); comboBox2.DisplayMember = "IdTuyen"; comboBox2.ValueMember = "IdTuyen"; }