Пример #1
0
        private void frmVeThem_Load(object sender, EventArgs e)
        {
            chkDen.Checked         = _GiaoDichO.SoLuongVe == 2;
            _ListDaiLyO            = new D_DAILY().All();
            _ListHangBayO          = new D_HANGBAY().DuLieu();
            _ListTuyenBayO         = new D_TUYENBAY().DuLieu();
            NhanVienDB.DataSource  = new D_DAILY().NhanVien();
            LoaiKhachDB.DataSource = DuLieuTaoSan.LoaiKhachHang_Ve();
            LoaiVeDB.DataSource    = DuLieuTaoSan.LoaiGiaoDich_Ve(true).Where(w => !w.ID.Equals(8) && !w.ID.Equals(9));
            DaiLyDB.DataSource     = _ListDaiLyO.Where(w => w.LoaiKhachHang.Equals(LoaiKhachHang));
            _ListNCC         = new D_NHACUNGCAP().DuLieu();
            NCCDB.DataSource = _ListNCC;
            tuyenBayOBindingSource.DataSource = _ListTuyenBayO;
            rHD.DataSource = DuLieuTaoSan.HinhThucHoaDon();
            iAn.Visible    = DuLieuTaoSan.Q.VeAdmin;

            #region NVGiaoDich
            iNVGiaoDich.Properties.ReadOnly = _GiaoDichO.NVGiaoDich != DuLieuTaoSan.NV.ID;

            if (_GiaoDichO.NVGiaoDich == DuLieuTaoSan.NV.ID || _GiaoDichO.NVGiaoDich < 1 || DuLieuTaoSan.NV.MienPhat)
            {
                _GiaoDichO.NVGiaoDich = DuLieuTaoSan.NV.ID;
            }
            else if (_GiaoDichO.NVHoTro < 1 || DuLieuTaoSan.NV.MienPhat)
            {
                _GiaoDichO.NVHoTro = DuLieuTaoSan.NV.ID;
            }
            #endregion

            iGhiChu.Text      = _GiaoDichO.GhiChu;
            DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _GiaoDichO);
            _LSTDIC           = XuLyDuLieu.BanTamGrid(GVGD);
            XuLyGiaoDien.OpenForm(this);
            btnLuu.Visible = DuLieuTaoSan.Q.VeThemSua;
        }
Пример #2
0
 private void frmTongHopThem_Load(object sender, EventArgs e)
 {
     daiLyOs           = new D_DAILY().All();
     DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, Gd);
     loaiKhachOBindingSource.DataSource     = DuLieuTaoSan.LoaiKhachHang_GiaoDich().Where(w => w.ID.Equals(1) || w.ID.Equals(2));
     loaiGiaoDichOBindingSource1.DataSource = DuLieuTaoSan.LoaiGiaoDich_Ve(false);
     XuLyGiaoDien.OpenForm(this);
     iTenKhach.Text = "Thời gian: " + DateTime.Now.ToString("HH:mm");
     if ((new List <int>()
     {
         7, 11, 12
     }).Contains(Gd.LoaiGiaoDich))
     {
         iGiaThu.Value  = Gd.GiaHoan;
         iTenKhach.Text = Gd.TenKhach;
     }
 }
Пример #3
0
        private void frmVe_Load(object sender, EventArgs e)
        {
            if (!DuLieuTaoSan.Q.VeAdmin)
            {
                GVGD.Columns.Remove(colEmail);
                GVGD.Columns.Remove(colDienThoaiKhachHang);
            }

            rLoaiKhach.DataSource     = DuLieuTaoSan.LoaiKhachHang_Ve();
            rTrangThai.DataSource     = DuLieuTaoSan.LoaiGiaoDich_Ve(true);
            rHinHThuc.DataSource      = DuLieuTaoSan.HinhThuc_Ve_TatCa();
            rHoaDon.DataSource        = DuLieuTaoSan.HinhThucHoaDon();
            btnExportExcel.Visibility = DuLieuTaoSan.Q.VeExcel ? BarItemVisibility.Always : BarItemVisibility.Never;
            btnThem.Visibility        = DuLieuTaoSan.Q.VeThemSua ? BarItemVisibility.Always : BarItemVisibility.Never;
            btnXoa.Visibility         = DuLieuTaoSan.Q.VeXoa ? BarItemVisibility.Always : BarItemVisibility.Never;
            btnHoan.Visibility        = DuLieuTaoSan.Q.TheoDoiHoanAdmin ? BarItemVisibility.Always : BarItemVisibility.Never;

            tuyenBayOBindingSource.DataSource = new D_TUYENBAY().DuLieu();
            nganHangOBindingSource.DataSource = new D_NGANHANG().All();
            hangBayOBindingSource.DataSource  = new D_HANGBAY().DuLieu();
            nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu_GiaoDich();
            _ListKhoaNgayO = new D_KHOANGAY().DuLieu();
            DuLieu();
        }