예제 #1
0
        public void TaiLaiDuLieu()
        {
            if (!XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.ShowWaitForm();
            }
            if (chk2.Checked)
            {
                if (bdtpTu.EditValue != null && bdtpDen.EditValue != null)
                {
                    CTV = string.Format("AND (convert(date, NgayGD) BETWEEN '{0}' AND '{1}')", ((DateTime)bdtpTu.EditValue).ToString("yyyyMMdd"), ((DateTime)bdtpDen.EditValue).ToString("yyyyMMdd"));
                }
            }
            else if (chk1.Checked)
            {
                CTV = DuLieuTaoSan.MocThoiGian("NgayGD")[idThoiGian];
            }

            nhD.ChayLaiSD();
            cTNganHangOBindingSource.DataSource = new D_CTNGANHANG().DuLieu(CTV, true);
            btnM.Caption = "Số dư: " + nhD.DuLieu(true)[0].SoDuCuoi.ToString("#,### VNĐ");
            if (XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.CloseWaitForm();
            }
        }
예제 #2
0
        public void TaiLaiDuLieu()
        {
            if (!XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.ShowWaitForm();
            }
            if (chk2.Checked)
            {
                if (bdtpTu.EditValue != null && bdtpDen.EditValue != null)
                {
                    CTV = string.Format("AND (convert(date, NgayGD) BETWEEN '{0}' AND '{1}')", ((DateTime)bdtpTu.EditValue).ToString("yyyyMMdd"), ((DateTime)bdtpDen.EditValue).ToString("yyyyMMdd"));
                }
            }
            else if (chk1.Checked)
            {
                CTV = DuLieuTaoSan.MocThoiGian("NgayGD")[idThoiGian];
            }
            else if (chk3.Checked && B != string.Empty)
            {
                CTV = string.Format("AND MaCode like '%{0}%'", B);
            }

            if (!chk3.Checked)
            {
                if (!chkKLT.Checked)
                {
                    CTV += string.Format(" OR LoaiGiaoDich = 8");
                }
                if (chkNganHang.Checked)
                {
                    CTV += " AND NganHangID = " + kh.ID;
                }
            }

            if (iCTKN.Checked)
            {
                _listCTNganHangO = new D_CTNGANHANG().DuLieu(CTV);
            }
            else
            {
                _listCTNganHangO = new D_CTNGANHANG().DuLieu(CTV, false);
            }

            cTNganHangOBindingSource.DataSource = _listCTNganHangO;

            if (XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.CloseWaitForm();
            }
        }
예제 #3
0
        public void DuLieu()
        {
            if (!XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.ShowWaitForm();
            }

            _index = GVGD.GetFocusedDataSourceRowIndex() - 10;

            _Query = "LoaiGiaoDich in (4,8,9,13,14) AND TinhCongNo = 1";

            if (chk1.Checked)
            {
                _Query += DuLieuTaoSan.MocThoiGian()[_IDThoiGian];
            }
            else if (chk2.Checked)
            {
                if (bdtpTu.EditValue != null && bdtpDen.EditValue != null)
                {
                    _Query += string.Format("AND (convert(date, NgayGD) BETWEEN '{0}' AND '{1}')", ((DateTime)bdtpTu.EditValue).ToString("yyyyMMdd"), ((DateTime)bdtpDen.EditValue).ToString("yyyyMMdd"));
                }
            }
            else if (chk3.Checked && _SV_MC.Length > 0)
            {
                _Query += string.Format("AND REPLACE(COALESCE(SoVeVN,''),' ','') in ('{0}')", String.Join("' ,'", _SV_MC));
            }
            else if (chk4.Checked && _SV_MC.Length > 0)
            {
                _Query += string.Format("AND REPLACE(COALESCE(MaCho,''),' ','') in ('{0}')", String.Join("' ,'", _SV_MC));
            }

            if (_Query != "LoaiGiaoDich in (4,8,9,13,14) AND TinhCongNo = 1")
            {
                khachHangOBindingSource.DataSource = DaiLyD.All();
                _ListGiaoDichO = new D_GIAODICH().DuLieu(_Query, DuLieuTaoSan.Q.VeAdmin);
                giaoDichOBindingSource.DataSource = _ListGiaoDichO;
            }

            Size textSize = TextRenderer.MeasureText(_ListGiaoDichO.Count.ToString(), new Font("Tahoma", 9, FontStyle.Regular));

            GVGD.IndicatorWidth   = textSize.Width + 5;
            GVGD.FocusedRowHandle = _index;

            if (XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.CloseWaitForm();
            }
        }
예제 #4
0
        public void DuLieu()
        {
            if (!XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.ShowWaitForm();
            }

            _index = GVGD.GetFocusedDataSourceRowIndex() - 10;
            _Query = "";

            if (chk1.Checked)
            {
                _Query += "WHERE " + DuLieuTaoSan.MocThoiGian()[_IDThoiGian].Substring(4);
            }
            else if (chk2.Checked)
            {
                if (bdtpTu.EditValue != null && bdtpDen.EditValue != null)
                {
                    _Query = string.Format("WHERE (convert(date, NgayGD) BETWEEN '{0}' AND '{1}')", ((DateTime)bdtpTu.EditValue).ToString("yyyyMMdd"), ((DateTime)bdtpDen.EditValue).ToString("yyyyMMdd"));
                }
            }
            else if (chk4.Checked && _SV_MC.Length > 0)
            {
                _Query += string.Format("WHERE REPLACE(COALESCE(Booking,''),' ','') in ('{0}')", String.Join("' ,'", _SV_MC));
            }

            if (_Query != "")
            {
                khachHangOBindingSource.DataSource = DaiLyD.All();
                __ListKhachSanO = new D_KHACHSAN().DuLieu(_Query);
                khachSanOBindingSource.DataSource = __ListKhachSanO;
            }

            Size textSize = TextRenderer.MeasureText(__ListKhachSanO.Count.ToString(), new Font("Tahoma", 9, FontStyle.Regular));

            GVGD.IndicatorWidth   = textSize.Width + 5;
            GVGD.FocusedRowHandle = _index;

            if (XuLyGiaoDien.wait.IsSplashFormVisible)
            {
                XuLyGiaoDien.wait.CloseWaitForm();
            }
        }
예제 #5
0
 public frmLichSu()
 {
     InitializeComponent();
     ChonThoiGian = DuLieuTaoSan.MocThoiGian("NgayThucHien");
     DuLieu();
 }