Example #1
0
        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();
        }
Example #2
0
        private void KhoiTaoGiaoDien()
        {
            BUS_TuyenBay busTuyenBay = new BUS_TuyenBay();
            DataTable    dtTuyenBay  = new DataTable();

            dtTuyenBay = busTuyenBay.Get();
            cboMaTuyenBay.DataSource    = dtTuyenBay;
            cboMaTuyenBay.DisplayMember = "MATUYENBAY";
            cboMaTuyenBay.ValueMember   = "MATUYENBAY";

            BUS_HangVe busHangVe = new BUS_HangVe();
            DataTable  dtHangVe  = new DataTable();

            dtHangVe = busHangVe.Get();
            cboMaHangVe.DataSource    = dtHangVe;
            cboMaHangVe.DisplayMember = "TENHANGVE";
            cboMaHangVe.ValueMember   = "MAHANGVE";

            BUS_SanBay busSanBayDi = new BUS_SanBay();
            DataTable  dtSanBayDi  = new DataTable();

            dtSanBayDi                = busSanBayDi.Get();
            cboSanBayDi.DataSource    = dtSanBayDi;
            cboSanBayDi.DisplayMember = "TENSANBAY";
            cboSanBayDi.ValueMember   = "MASANBAY";

            BUS_SanBay busSanBayDen = new BUS_SanBay();
            DataTable  dtSanBayDen  = new DataTable();

            dtSanBayDen                = busSanBayDi.Get();
            cboSanBayDen.DataSource    = dtSanBayDen;
            cboSanBayDen.DisplayMember = "TENSANBAY";
            cboSanBayDen.ValueMember   = "MASANBAY";

            TaoBangDSDonGia();

            cboSanBayDi.Focus();
        }