//Xử lý các biến cố của control private void NhapThongTinChuyenBay_Load(object sender, EventArgs e) { warning = new Label[14]; warning[0] = label11; warning[3] = label14; warning[4] = label15; warning[5] = label16; warning[7] = label18; warning[8] = label17; warning[9] = label12; warning[10] = label19; warning[11] = label20; warning[12] = label21; warning[13] = label22; warning[12].Text = "Thời gian dừng phải nằm trong khoảng từ " + QuyDinh.ThoiGianDungToiThieu + " đến " + QuyDinh.ThoiGianDungToiDa + " phút"; TENSBComboBox1.DataSource = quanlyBUS.LayDanhSachSanBay(); TENSBComboBox2.DataSource = quanlyBUS.LayDanhSachSanBay(); TENSBComboBox1.DisplayMember = "TENSANBAY"; TENSBComboBox1.ValueMember = "MASANBAY"; TENSBComboBox2.DisplayMember = "TENSANBAY"; TENSBComboBox2.ValueMember = "MASANBAY"; DataGridViewComboBoxColumn col = dataGridView1.Columns[1] as DataGridViewComboBoxColumn; col.DataSource = quanlyBUS.LayDanhSachSanBay(); col.DisplayMember = "TENSANBAY"; col.ValueMember = "MASANBAY"; }
//Xử lý biến cố của các control private void TraCuu_Load(object sender, EventArgs e) { SBDIBox.DataSource = quanlyBUS.LayDanhSachSanBay(); SBDIBox.DisplayMember = "TENSANBAY"; SBDIBox.ValueMember = "MASANBAY"; SBDENBox.DataSource = quanlyBUS.LayDanhSachSanBay(); SBDENBox.DisplayMember = "TENSANBAY"; SBDENBox.ValueMember = "MASANBAY"; }
private void QuanLySanBayVaTuyenBay_Load(object sender, EventArgs e) { setSanBayDataSource(); setTuyenBayDataSource(); SBDiComboBox.DataSource = QuanLy.LayDanhSachSanBay(); SBDiComboBox.DisplayMember = "TENSANBAY"; SBDiComboBox.ValueMember = "MASANBAY"; SBDenComboBox.DataSource = QuanLy.LayDanhSachSanBay(); SBDenComboBox.DisplayMember = "TENSANBAY"; SBDenComboBox.ValueMember = "MASANBAY"; MaSBtextBox.Text = ((int)dataGridView1.Rows[0].Cells[1].Value).ToString(); MaTBtextBox.Text = ((int)dataGridView2.Rows[0].Cells[1].Value).ToString(); flag = -1; flag2 = -1; dataGridView1.ReadOnly = true; dataGridView2.ReadOnly = true; }