private void KhoiTaoGiaoDienChuyenBay() { BUS_TuyenBay busTuyenBay = new BUS_TuyenBay(); BUS_MayBay busMayBay = new BUS_MayBay(); BUS_HangVe busHangVe = new BUS_HangVe(); BUS_SanBay busSanBay = new BUS_SanBay(); DataTable dtTuyenBay = new DataTable(); DataTable dtMayBay = new DataTable(); DataTable dtHangVe = new DataTable(); dtTuyenBay = busTuyenBay.Get(); dtMayBay = busMayBay.Get(); dtHangVe = busHangVe.Get(); cboMaTuyenBay.DataSource = dtTuyenBay; cboMaTuyenBay.DisplayMember = "MATUYENBAY"; cboMaTuyenBay.ValueMember = "MATUYENBAY"; cboMaMayBay.DataSource = dtMayBay; cboMaMayBay.DisplayMember = "MAMAYBAY"; cboMaMayBay.ValueMember = "MAMAYBAY"; cboMaHangVe.DataSource = dtHangVe; cboMaHangVe.DisplayMember = "TENHANGVE"; cboMaHangVe.ValueMember = "MAHANGVE"; busSanBay = new BUS_SanBay(); DataTable dtSanBayDi = new DataTable(); dtSanBayDi = busSanBay.Get(); cboSanBayDi.DataSource = dtSanBayDi; cboSanBayDi.DisplayMember = "TENSANBAY"; cboSanBayDi.ValueMember = "MASANBAY"; DataTable dtSanBayDen = new DataTable(); dtSanBayDen = busSanBay.Get(); cboSanBayDen.DataSource = dtSanBayDen; cboSanBayDen.DisplayMember = "TENSANBAY"; cboSanBayDen.ValueMember = "MASANBAY"; gbxThemHangVeChoChuyenBay.Enabled = false; gbxThemSanBayTGChoChuyenBay.Enabled = false; AcceptButton = btnThem; CancelButton = btnThoat; TaoBangDSChuyenBay(); }
public frmQuanLyMayBay() { InitializeComponent(); busMayBay = new BUS_MayBay(); }