Esempio n. 1
0
 private void frmKhachLeNo_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
     nganHangOBindingSource.DataSource = new D_NGANHANG().All();
     DSNhanVien.DataSource             = new D_DAILY().All();
     LayDLCTNganHang();
 }
Esempio n. 2
0
 private void frmKPIThem_Load(object sender, EventArgs e)
 {
     kPIHangMucOBindingSource.DataSource = new D_KPIHANGMUC().DuLieu1();
     XuLyDuLieu.ConvertClassToTable(this, kpi);
     XuLyGiaoDien.OpenForm(this);
     btnLuu2.Visible = DuLieuTaoSan.Q.TuyenBayThemSua;
 }
Esempio n. 3
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;
        }
Esempio n. 4
0
 private void frmChinhSachThem_Load(object sender, EventArgs e)
 {
     intStringBindingSource.DataSource = DuLieuTaoSan.LoaiKhachHang_Ve();
     XuLyDuLieu.ConvertClassToTable(this, _ChinhSachO);
     XuLyGiaoDien.OpenForm(this);
     btnLuu.Visible = DuLieuTaoSan.Q.ChinhSachThemSua;
 }
Esempio n. 5
0
 private void frmNCCGD_Load(object sender, EventArgs e)
 {
     nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu();
     intStringBindingSource.DataSource = DuLieuTaoSan.LoaiPhi(false);
     XuLyGiaoDien.OpenForm(this);
     XuLyDuLieu.ConvertClassToTable(this, _nCCGDO);
 }
Esempio n. 6
0
 private void frmSoDuHang_Load(object sender, EventArgs e)
 {
     iTN.Properties.MinValue            = iTN.DateTime = DateTime.Now.AddDays(-30);
     iDN.DateTime                       = DateTime.Now;
     soDuDaiLyOBindingSource.DataSource = _SODU_DAILYD.DuLieu(IDDaiLy, new DateTime(2019, 01, 01), DateTime.Now);
     XuLyGiaoDien.OpenForm(this);
     btn.Visible = DuLieuTaoSan.Q.ChinhSachThemSua;
 }
 private void frmNhomKhachHang_Load(object sender, EventArgs e)
 {
     _ListNhomDaiLyO = _NhomDaiLyD.DuLieu(_LoaiKhachHang);
     nhomKhachHangOBindingSource.DataSource = _ListNhomDaiLyO;
     _ListTinhTrangO = _TinhTrangD.DuLieu(_LoaiKhachHang, false);
     trangThaiOBindingSource.DataSource = _ListTinhTrangO;
     XuLyGiaoDien.OpenForm(this);
 }
Esempio n. 8
0
 private void frmTuyenBayThem_Load(object sender, EventArgs e)
 {
     _list = new D_SANBAY().DuLieu();
     sanBayOBindingSource.DataSource = _list;
     XuLyDuLieu.ConvertClassToTable(this, _TuyenBayO);
     XuLyGiaoDien.OpenForm(this);
     btnLuu2.Visible = DuLieuTaoSan.Q.TuyenBayThemSua;
 }
Esempio n. 9
0
        private void frmQuyAGS_Load(object sender, EventArgs e)
        {
            RegistryKey RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main", true);

            RegKey.SetValue("Display Inline Images", "yes");

            XuLyGiaoDien.OpenForm(this);
        }
Esempio n. 10
0
 private void frmNHKSCT_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
     khachSanOBindingSource.DataSource = new D_KHACHSAN().DuLieuKSBL(_nCC);
     nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu(true);
     daiLyOBindingSource.DataSource    = new D_DAILY().All();
     GVDSC.BestFitColumns();
 }
Esempio n. 11
0
 private void frmNHVH_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
     colGiaHoan.FieldName = _nCC ? "HangHoan" : "GiaHoan";
     giaoDichOBindingSource.DataSource = new D_GIAODICH().DuLieuVeHoan(_nCC, _NCC);
     nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu(true);
     daiLyOBindingSource.DataSource    = new D_DAILY().All();
     GVDSC.BestFitColumns();
 }
Esempio n. 12
0
 private void frmNHKS_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
     colGiaThu.FieldName = _nCC ? "GiaNet" : "GiaHeThong";
     khachSanOBindingSource.DataSource = new D_KHACHSAN().DuLieuKS(_nCC, _NCC);
     nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu(true);
     daiLyOBindingSource.DataSource    = new D_DAILY().All();
     GVDSC.BestFitColumns();
 }
 private void frmThemSignIn_Load(object sender, EventArgs e)
 {
     hangBayOBindingSource.DataSource = new D_HANGBAY().DuLieu().Where(w => w.SapXep);
     if (hangBayOBindingSource.Count < 21)
     {
         iHangBay.Properties.DropDownRows = hangBayOBindingSource.Count;
     }
     DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _SignInO);
     XuLyGiaoDien.OpenForm(this);
 }
Esempio n. 14
0
 private void frmSignIn_Load(object sender, EventArgs e)
 {
     daiLyOBindingSource.DataSource   = new D_DAILY().All();
     hangBayOBindingSource.DataSource = new D_HANGBAY().DuLieu();
     btnThem.Visibility = DuLieuTaoSan.Q.SignInXoa ? DevExpress.XtraBars.BarItemVisibility.Always : DevExpress.XtraBars.BarItemVisibility.Never;
     colMatKhau.Visible = DuLieuTaoSan.Q.DaiLyAdmin;
     TaiLaiSignIn();
     XuLyGiaoDien.OpenForm(this);
     //TaoSignInVU();
 }
Esempio n. 15
0
 private void frmBieuDoDaiLy_Load(object sender, EventArgs e)
 {
     if (!XuLyGiaoDien.wait.IsSplashFormVisible)
     {
         XuLyGiaoDien.wait.ShowWaitForm();
     }
     DaiLyDB.DataSource     = new D_DAILY().All(false).Where(w => w.LoaiKhachHang.Equals(1)).ToList();
     iIDKhachHang.EditValue = A;
     XuLyGiaoDien.OpenForm(this);
     XuLyGiaoDien.wait.CloseWaitForm();
 }
Esempio n. 16
0
 private void frmChinhSach_Load(object sender, EventArgs e)
 {
     nCCOBindingSource.DataSource    = new D_NHACUNGCAP().DuLieu();
     loaiPhiBindingSource.DataSource = DuLieuTaoSan.LoaiPhi();
     TuyenBayOs = new D_TUYENBAY().DuLieu();
     tuyenBayOBindingSource.DataSource = TuyenBayOs;
     _ListHangBayO = new D_HANGBAY().DuLieu();
     DuLieu();
     XuLyGiaoDien.OpenForm(this);
     btnLuu.Enabled = DuLieuTaoSan.Q.ChinhSachThemSua;
 }
Esempio n. 17
0
 private void frmDaiLyThem_Load(object sender, EventArgs e)
 {
     hangBayOBindingSource.DataSource = new D_HANGBAY().DuLieu();
     XuLyGiaoDien.OpenForm(this);
     DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _DaiLyO);
     iTinhTrang.Properties.DataSource = new D_TRANGTHAI().DuLieu(_DaiLyO.LoaiKhachHang);
     iChinhSach.Properties.DataSource = new D_CHINHSACH().DuLieuDL(_DaiLyO.LoaiKhachHang);
     btnLuu.Visible        = DuLieuTaoSan.Q.DaiLyThemSua;
     lbl15.Visible         = iDuHoSo.Visible = iNVGiaoDich.Visible = DuLieuTaoSan.NV.TenDangNhapCty.ToUpper().Equals("ITADMIN");
     NhanVienDB.DataSource = new D_DAILY().NhanVien();
 }
Esempio n. 18
0
 private void frmNhanVienThem_Load(object sender, EventArgs e)
 {
     dt.Columns.Add("col1");
     dt.Columns.Add("col2");
     dt.Columns.Add("col3");
     XuLyGiaoDien.OpenForm(this);
     _HoHang           = _KhachHangO.ThongTinLienLac;
     DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _KhachHangO);
     quyenOBindingSource.DataSource   = new D_NHOMQUYEN().DuLieu();
     gioiTinhBindingSource.DataSource = DuLieuTaoSan.GioiTinh();
     e2.EditValue = DateTime.Now;
     NguoiThanKhach();
 }
Esempio n. 19
0
        public void CheckBanQuyen()
        {
            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\THCRM", true);

            if (key != null && key.GetValue("MaKichHoat") != null)
            {
                string   Key    = TMD5.Base64Decode(TMD5.Base64Decode(TMD5.Base64Decode(key.GetValue("MaKichHoat").ToString())));
                string[] subs   = Key.Split(new char[] { '@' });
                DateTime ngayBQ = new DateTime(int.Parse(subs[2].Substring(4)), int.Parse(subs[2].Substring(2, 2)), int.Parse(subs[2].Substring(0, 2)));
                DateTime ngaySV = DateTime.Now;

                if (subs.Length != 4 || subs[0] != "ThanhHoangCRM" || subs[1] != "TTTTUNG")
                {
                    XtraMessageBox.Show("Mã kích hoạt không hợp lệ");
                    new frmNhapMa().ShowDialog(this);
                }
                else if (ngaySV.Date.Subtract(ngayBQ.Date.AddYears(int.Parse(subs[3]))).Days > 0)
                {
                    XtraMessageBox.Show("Mã kích hoạt hết hạn sử dụng");
                    new frmNhapMa().ShowDialog(this);
                }
                else
                {
                    XuLyGiaoDien.OpenForm(this);
                    if (key != null)
                    {
                        if (key.GetValue("cmra") != null && key.GetValue("cmrp") != null)
                        {
                            if (key.GetValue("cmra").ToString().Length > 0)
                            {
                                chk.Checked      = true;
                                txtUserName.Text = key.GetValue("cmra").ToString();
                                txtPassword.Text = key.GetValue("cmrp").ToString();
                            }
                        }
                        if (key.GetValue("TKNC") != null)
                        {
                            key.SetValue("TKNC", "true");
                        }
                    }
                }
            }
            else
            {
                new frmNhapMa().ShowDialog(this);
            }
            if (key != null)
            {
                key.Close();
            }
        }
Esempio n. 20
0
 private void frmHoaDonThem_Load(object sender, EventArgs e)
 {
     daiLyDs = new D_DAILY().All();
     daiLyOBindingSource1.DataSource   = daiLyDs;
     nCCOBindingSource.DataSource      = new D_NHACUNGCAP().DuLieu();
     tuyenBayOBindingSource.DataSource = new D_TUYENBAY().DuLieu();
     bindingSource1.DataSource         = daiLyD.NhanVien();
     IntStringBindingSource.DataSource = DuLieuTaoSan.LoaiKhachHang_GiaoDich(false);
     hoaDonOBindingSource1.DataSource  = _HoaDonD.LayThongTinMST();
     hangBayOBindingSource.DataSource  = new D_HANGBAY().DuLieu();
     XuLyGiaoDien.OpenForm(this);
     DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _HoaDonO);
     daiLyOBindingSource.DataSource = daiLyDs.Where(w => w.LoaiKhachHang.Equals((int)iLoaiKhachHang.EditValue));
     bandedGridView1.BestFitColumns();
 }
Esempio n. 21
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;
     }
 }
Esempio n. 22
0
        private void frmKhachSanThem_Load(object sender, EventArgs e)
        {
            #region NVGiaoDich
            iNVGiaoDich.Properties.ReadOnly = iNVHoTro.Properties.ReadOnly = _ks.NVGiaoDich != DuLieuTaoSan.NV.ID;
            LoaiKhachDB.DataSource          = DuLieuTaoSan.LoaiKhachHang_Ve();

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

            DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, _ks);
            XuLyGiaoDien.OpenForm(this);
            DuLieu();
        }
Esempio n. 23
0
        private void frmThemGiaoDichTK_Load(object sender, EventArgs e)
        {
            loaiGiaoDichOBindingSource.DataSource = new D_LOAIGIAODICH().DuLieu_NganHang_TheoLoai(0, true);
            DataLoaiKhach.DataSource = DuLieuTaoSan.LoaiKhachHang_NganHang();
            _NganHang = new D_NGANHANG().All();
            nganHangNguonBindingSource.DataSource = _NganHang;
            nhanVienOBindingSource.DataSource     = new D_DAILY().NhanVien();
            IntStringBindingSource.DataSource     = DuLieuTaoSan.TrangThai_NganHang();

            if (CTM.NVGiaoDich < 1)
            {
                CTM.NVGiaoDich = DuLieuTaoSan.NV.ID;
            }

            DuLieuTaoSan.Adic = XuLyDuLieu.ConvertClassToTable(this, CTM);
            XuLyGiaoDien.OpenForm(this);
            if (!CTM.TrangThaiID)
            {
                iTrangThaiID.EditValue = true;
            }
        }
Esempio n. 24
0
        private void frmVeHoanThem_Load(object sender, EventArgs e)
        {
            chkDen.Checked = _GiaoDichO.SoLuongVe == 2;
            DuLieuKhachLe();
            _ListHangBayO                     = new D_HANGBAY().DuLieu();
            _ListTuyenBayO                    = new D_TUYENBAY().DuLieu();
            LoaiKhachDB.DataSource            = DuLieuTaoSan.LoaiKhachHang_Ve();
            NCCDB.DataSource                  = new D_NHACUNGCAP().DuLieu();
            NhanVienDB.DataSource             = new D_DAILY().NhanVien();
            tuyenBayOBindingSource.DataSource = _ListTuyenBayO;
            iTinhCongNo.Visible               = DuLieuTaoSan.Q.TheoDoiHoanAdmin;
            if (Owner.ActiveMdiChild is frmVe)
            {
                iTinhCongNo.Visible = true;
                iTinhCongNo.Checked = true;
            }
            iAn.Visible = DuLieuTaoSan.Q.VeAdmin;

            #region NVGiaoDich
            iNVGiaoDich.Properties.ReadOnly = _GiaoDichO.NVGiaoDich != DuLieuTaoSan.NV.ID;
            if (_GiaoDichO.NVGiaoDich < 1)
            {
                _GiaoDichO.NVGiaoDich = DuLieuTaoSan.NV.ID;
            }
            else if (DuLieuTaoSan.NV.MienPhat)
            {
                _GiaoDichO.NVGiaoDich = DuLieuTaoSan.NV.ID;
            }
            #endregion

            iGhiChu.Text = _GiaoDichO.GhiChu;
            _LSTDIC      = XuLyDuLieu.BanTamGrid(GVH);
            XuLyDuLieu.ConvertClassToTable(this, _GiaoDichO);
            XuLyGiaoDien.OpenForm(this);
            if (!_GiaoDichO.TinhCongNo)
            {
                iNgayGD.DateTime = DateTime.Now;
            }
            btnLuu.Visible = DuLieuTaoSan.Q.TheoDoiHoanThemSua;
        }
Esempio n. 25
0
        private void frmNCCThem_Load(object sender, EventArgs e)
        {
            KhuVuc();
            _DataHangBay.Columns.Add("ID", typeof(int));
            _DataHangBay.Columns.Add("Ten", typeof(string));
            _lstHangBayO = new D_HANGBAY().DuLieu();
            hangBayOBindingSource.DataSource = _lstHangBayO;

            if ((_NCCO.HangBay ?? string.Empty).Length > 1)
            {
                string[] NCCA = _NCCO.HangBay.Split('|');
                for (int i = 0; i < NCCA.Length - 1; i++)
                {
                    _HangBayO = _lstHangBayO.Where(w => w.ID.Equals(int.Parse(NCCA[i]))).ToList()[0];
                    _DataHangBay.Rows.Add(_HangBayO.ID, _HangBayO.TenHang);
                }
                GCNCC.DataSource = _DataHangBay;
            }
            DSNH.DataSource = new D_NGANHANG().All();
            XuLyDuLieu.ConvertClassToTable(this, _NCCO);
            XuLyGiaoDien.OpenForm(this);
        }
Esempio n. 26
0
        private void frmChinh_Load(object sender, EventArgs e)
        {
            if (!XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.ShowWaitForm();
            }
            XuLyGiaoDien.OpenForm(this);
            PhanQuyenHienThi();
            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\THCRM");

            chlDG.Checked = !(key.GetValue("TKNC").ToString().ToLower() == "true");

            Bdpi.Caption = "KPI: " + DuLieuTaoSan.NV.Diem;
            if (DuLieuTaoSan.Q.Lv2Ve)
            {
                frmVe f = new frmVe();
                f.MdiParent = this;
                f.Show();
                GridViewHelper.SetFromGrid(f);
                tabbedView1.Documents[0].Properties.AllowClose = DevExpress.Utils.DefaultBoolean.False;
            }
        }
Esempio n. 27
0
 private void FrmRenameCaption_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
 }
Esempio n. 28
0
 private void frmHangBayThem_Load(object sender, EventArgs e)
 {
     XuLyDuLieu.ConvertClassToTable(this, _HangBay);
     XuLyGiaoDien.OpenForm(this);
     btnLuu.Visible = DuLieuTaoSan.Q.HangBayThemSua;
 }
 private void frmQuyenNhanVienThem_Load(Object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
     btnSave.Visible = DuLieuTaoSan.Q.QuyenThemSua;
 }
Esempio n. 30
0
 private void frmDoiMatKhau_Load(object sender, EventArgs e)
 {
     XuLyGiaoDien.OpenForm(this);
 }