private void KhoiTaoCombobox()
        {
            List <string> lstDieuKien = new List <string>();
            AutoComboBox  auto        = new AutoComboBox();

            //Tao combobox chi nhanh
            lstDieuKien.Clear();
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            // khoi tao combobox ngon ngu
            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            //khoi tao combobox dinh dang
            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri());
            cmbDinhDang.IsEnabled = false;
            TaoComboboxPGD();
        }
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.PDF.layGiaTri());
        }
Beispiel #3
0
        private void TaocomboboxCBTD()
        {
            try
            {
                // khởi tạo combobox
                AutoComboBox auto = new AutoComboBox();
                lstSourceCBTD = new ListCheckBoxCombo();
                string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
                string idChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings[1];

                List <string> lstDieuKien = new List <string>();

                // khởi tạo combobox
                auto = new AutoComboBox();
                lstDieuKien.Add(maChiNhanh);
                lstDieuKien.Add(BusinessConstant.LOAI_HO_SO.CHINH_THUC.layGiaTri());
                new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceCBTD, ref cmbCBTD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NHAN_SU_LIST.getValue(), lstDieuKien);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
        }
        private void LoadComboboxPhongGD()
        {
            try
            {
                // khởi tạo combobox
                AutoComboBox auto = new AutoComboBox();

                lstSourcePhongGD_Select = new List <AutoCompleteEntry>();
                string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
                lstSourcePhongGD_Select = lstSourcePhongGD.Where(e => e.KeywordStrings.ElementAt(1).Equals(maChiNhanh)).ToList();

                // khởi tạo combobox
                auto = new AutoComboBox();
                cmbPhongGD.Items.Clear();
                auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null);
                cmbPhongGD.SelectedIndex = 0;
                //cmbPhongGD.IsEnabled = !maChiNhanh.Equals("%");
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
        }
Beispiel #5
0
        private void LoadComboboxPhongGD()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();

            lstSourcePhongGD_Select = new List <AutoCompleteEntry>();
            string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();

            if (!maChiNhanh.Equals("%"))
            {
                lstSourcePhongGD_Select = lstSourcePhongGD.Where(e => e.KeywordStrings.ElementAt(1).Equals(maChiNhanh)).ToList();
            }
            lstSourcePhongGD_Select.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] {
                "%", "0"
            }));

            // khởi tạo combobox
            auto = new AutoComboBox();
            cmbPhongGD.Items.Clear();
            auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null);
            cmbPhongGD.SelectedIndex = 0;
            cmbPhongGD.IsEnabled     = !maChiNhanh.Equals("%");
        }
        private void LoadComboboxCBoQly()
        {
            AutoComboBox  auto        = new AutoComboBox();
            List <string> lstDieuKien = new List <string>();

            lstSourceNguoiQLy = new List <AutoCompleteEntry>();
            string machinhanh = "";
            string maphonggd  = "";

            if (cmbChiNhanh.Items.Count > 0)
            {
                machinhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
            }
            if (cmbPhongGD.Items.Count > 0)
            {
                maphonggd = lstSourcePhongGD.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.First();
            }
            lstDieuKien.Add(machinhanh);
            lstDieuKien.Add(maphonggd);
            //khoi tao combobox
            cmbTieuChiLoc.Items.Clear();
            auto.GenAutoComboBox(ref lstSourceNguoiQLy, ref cmbTieuChiLoc, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC_CBO_TIN_DUNG.getValue(), lstDieuKien);
        }
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstDieuKien.Add(ClientInformation.TenDangNhap);
            lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
            new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANHLIST.getValue(), lstDieuKien);
            //// khởi tạo combobox
            //auto = new AutoComboBox();
            //auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
            //LoadComboboxPhongGD();
            LoadComboboxPhongGD();

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DONG_TIEN_CAC_NUOC.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceLoaiTien, ref cmbLoaiTien, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.WORD.layGiaTri());
            cmbDinhDang.SelectedIndex = lstSourceDinhDang.FindIndex(e => e.KeywordStrings[0].Equals(ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri()));
        }
Beispiel #8
0
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            lstDieuKien.Add(ClientInformation.TenDangNhap);
            lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
            new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANHLIST.getValue(), lstDieuKien);

            lstDieuKien = new List <string>();
            //lstDieuKien.Add(DatabaseConstant.DanhMuc.BCAO_TDUNG_TIEU_CHI_NHOM.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            lstSourceMauBaoCao.Insert(0, new AutoCompleteEntry("Tổng hợp toàn M7", new string[2] {
                "DONVI", "DONVI"
            }));
            lstSourceMauBaoCao.Insert(1, new AutoCompleteEntry("Tổng hợp chi nhánh", new string[2] {
                "CHINHANH", "CHINHANH"
            }));
            auto.GenAutoComboBox(ref lstSourceMauBaoCao, ref cmbMauBaoCao, "", lstDieuKien);

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri());
            cmbDinhDang.IsEnabled = false;
        }
Beispiel #9
0
        /// <summary>
        /// Hiện popup khách hàng
        /// </summary>
        private void HienPopUpKhachHang()
        {
            PopupProcess  Popupprocess = new PopupProcess();
            List <string> lstDK        = new List <string>();
            string        maDV         = "";

            if (cmbChiNhanh.SelectedIndex >= 0)
            {
                maDV = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.ElementAt(0);
            }
            string maCum = "";

            if (cmbCum.SelectedIndex >= 0)
            {
                maCum = lstSourceCum.ElementAt(cmbCum.SelectedIndex).KeywordStrings.ElementAt(0);
            }
            lstDK.Add(maDV);
            lstDK.Add(maCum);
            Popupprocess.getPopupInformation(DatabaseConstant.DanhSachTruyVan.POPUP_DS_KHACHHANG.getValue(), lstDK);
            SimplePopupResponse simplePopupResponse = Presentation.Process.Common.ClientInformation.SimplePopup;

            if (!simplePopupResponse.DataSetSource.IsNullOrEmpty() && simplePopupResponse.DataSetSource.Tables[0].Rows.Count > 0)
            {
                txtMaKhachHang.Text = simplePopupResponse.DataSetSource.Tables[0].Rows[0][0].ToString();
            }
            if (!txtMaKhachHang.Text.IsNullOrEmptyOrSpace())
            {
                lstSourceKheUoc = new List <AutoCompleteEntry>();
                AutoComboBox auto = new AutoComboBox();
                // Khởi tạo điều kiện gọi danh mục
                List <string> lstDieuKien = new List <string>();
                lstDieuKien.Add(txtMaKhachHang.Text);
                // khởi tạo combobox
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourceKheUoc, ref cmbKheUoc, DatabaseConstant.DanhSachTruyVan.COMBOBOX_KUOC_KHANG.getValue(), lstDieuKien);
            }
        }
Beispiel #10
0
        private void LoadCombobox()
        {
            AutoComboBox  auto        = new AutoComboBox();
            List <string> lstDieuKien = new List <string>();

            //Chi nhánh
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            if (cmbChiNhanh.SelectedIndex >= 0)
            {
                string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
                string idChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.ElementAt(1);
                cmbPhongGiaoDich.Items.Clear();
                lstDieuKien.Clear();
                lstSourcePhongGiaoDich.Clear();
                lstDieuKien.Add(maChiNhanh);
                auto.GenAutoComboBox(ref lstSourcePhongGiaoDich, ref cmbPhongGiaoDich, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVITHEOMACHA.getValue(), lstDieuKien, ClientInformation.MaDonViGiaoDich);
            }

            if (cmbPhongGiaoDich.SelectedIndex >= 0)
            {
                string maPhongGD = lstSourcePhongGiaoDich.ElementAt(cmbPhongGiaoDich.SelectedIndex).KeywordStrings.First();
                string idPhongGD = lstSourcePhongGiaoDich.ElementAt(cmbPhongGiaoDich.SelectedIndex).KeywordStrings.ElementAt(1);

                cmbKhuVuc.Items.Clear();
                lstDieuKien.Clear();
                lstSourceKhuVuc.Clear();
                lstDieuKien.Add(idPhongGD);
                auto.GenAutoComboBox(ref lstSourceKhuVuc, ref cmbKhuVuc, DatabaseConstant.DanhSachTruyVan.COMBOBOX_KHUVUC.getValue(), lstDieuKien);

                cmbCBQL.Items.Clear();
                lstDieuKien.Clear();
                lstSourceCBQL.Clear();
                lstDieuKien.Add(maPhongGD);
                auto.GenAutoComboBox(ref lstSourceCBQL, ref cmbCBQL, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NSD.getValue(), lstDieuKien);
            }
        }
Beispiel #11
0
        private void LoadDuLieu()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                // lấy dữ liệu đổ source cho combobox Phân hệ chức năng
                AutoComboBox  auto        = new AutoComboBox();
                List <string> lstDieuKien = new List <string>();
                lstSourceLoaiPhamVi.Insert(0, new AutoCompleteEntry("Organization scope", new string[2] {
                    BusinessConstant.LOAI_PHAM_VI.DON_VI.layGiaTri(), "1"
                }));
                lstSourceLoaiPhamVi.Insert(1, new AutoCompleteEntry("Area scope", new string[2] {
                    BusinessConstant.LOAI_PHAM_VI.DIA_LY.layGiaTri(), "2"
                }));
                auto.GenAutoComboBox(ref lstSourceLoaiPhamVi, ref cmbLoaiPhamVi, null, lstDieuKien);
                cmbLoaiPhamVi.SelectedIndex = 0;
                cmbLoaiPhamVi.IsEnabled     = false;

                // lấy dữ liệu đổ source cho combobox Loại đối tượng
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.LOAI_DTUONG_KTHAC_TNGUYEN.getValue());
                auto.GenAutoComboBox(ref lstSourceLoaiDTuong, ref cmbDoiTuong, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien,
                                     BusinessConstant.LoaiDoiTuong.NHOM_NGUOI_SDUNG.layGiaTri());

                // Hiển thị lưới dữ liệu đối tượng
                BuildGridDoiTuong();
                // Hiển thị lưới dữ liệu phân quyền
                BuildTreeDonVi();
                LoadDuLieuPhanQuyen(null);
            }
            catch (System.Exception ex)
            {
                CommonFunction.ThongBaoLoi(ex);
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
            Mouse.OverrideCursor = Cursors.Arrow;
        }
Beispiel #12
0
        private void LoadComboboxKhuVuc()
        {
            if (cmbPhongGD.SelectedIndex >= 0)
            {
                AutoComboBox auto = new AutoComboBox();

                lstSourceKhuVuc_Select = new List <AutoCompleteEntry>();
                string maChiNhanh      = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
                string maPhongGiaoDich = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.First();

                string idPhongGiaoDich = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings[3];
                //if (!maPhongGiaoDich.Equals("%"))
                lstSourceKhuVuc_Select = lstSourceKhuVuc.Where(e => e.KeywordStrings.ElementAt(3).Equals(idPhongGiaoDich)).ToList();
                //lstSourceCum_Select = lstSourceCum.Where(e => e.KeywordStrings.ElementAt(3).Substring(0, maPhongGiaoDich.Length).Equals(maPhongGiaoDich)).ToList();

                //lstSourceKhuVuc_Select.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" }));
                // khởi tạo combobox
                auto = new AutoComboBox();
                cmbKhuVuc.Items.Clear();
                auto.GenAutoComboBox(ref lstSourceKhuVuc_Select, ref cmbKhuVuc, null);
                cmbKhuVuc.SelectedIndex = 0;
                //cmbKhuVuc.IsEnabled = !maPhongGiaoDich.Equals("%");
            }
        }
 private void LoadComboboxNhom()
 {
     try
     {
         lstSourceNhom = new List <AutoCompleteEntry>();
         AutoComboBox  auto        = new AutoComboBox();
         List <string> lstDieuKien = new List <string>();
         machinhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings[1];
         maphonggd  = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings[3];
         makhuvuc   = lstSourceKhuVuc.ElementAt(cmbKhuVuc.SelectedIndex).KeywordStrings[1];
         macum      = lstSourceCum.ElementAt(cmbCum.SelectedIndex).KeywordStrings[1];
         lstDieuKien.Add(maphonggd);
         lstDieuKien.Add(makhuvuc);
         lstDieuKien.Add(macum);
         cmbNhom.Items.Clear();
         auto.GenAutoComboBox(ref lstSourceNhom, ref cmbNhom, "COMBOBOX_NHOM_NQL", lstDieuKien);
         isLoad = true;
         LoadThongTinBoSung();
     }
     catch (Exception ex)
     {
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
     }
 }
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
            LoadComboboxPhongGD();

            lstSourceLoaiBaoCao = new List <AutoCompleteEntry>();
            lstSourceLoaiBaoCao.Add(new AutoCompleteEntry("Bảng xác nhận số dư tiền gửi tiết kiệm", "B01", "B01"));
            lstSourceLoaiBaoCao.Add(new AutoCompleteEntry("Bảng tổng hợp số dư tiền gửi tiết kiệm theo cụm", "B02", "B02"));
            lstSourceLoaiBaoCao.Add(new AutoCompleteEntry("Bảng tổng hợp số dư tiền gửi tiết kiệm theo Văn phòng CN/PGD", "B03", "B03"));
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceLoaiBaoCao, ref cmbLoaiBaoCao, null);
            cmbLoaiBaoCao.SelectedIndex = 0;

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.PDF.layGiaTri());
        }
Beispiel #15
0
        private void LoadComboboxPhongGD()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();

            lstSourcePhongGD = new ListCheckBoxCombo();
            AutoCompleteEntry au         = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex);
            string            maChiNhanh = au.KeywordStrings[1];

            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstDieuKien.Add(maChiNhanh);
            lstDieuKien.Add(ClientInformation.TenDangNhap);
            lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
            new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PGDLIST.getValue(), lstDieuKien);
            //lstSourcePhongGD_Select = lstSourcePhongGD.Where(e => e.KeywordStrings.ElementAt(1).Equals(maChiNhanh)).ToList();
            //lstSourcePhongGD_Select.Insert(0, new AutoCompleteEntry("Tất cả", "%", ""));
            //// khởi tạo combobox
            //auto = new AutoComboBox();
            //cmbPhongGD.Items.Clear();
            //auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null);
        }
Beispiel #16
0
        /// <summary>
        /// Sự kiện khi thay đổi giá trị của combobox cmbDonVi
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbChiNhanh_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (cmbChiNhanh.SelectedIndex >= 0)
            {
                AutoComboBox  auto        = new AutoComboBox();
                List <string> lstDieuKien = new List <string>();

                string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();
                string idChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.ElementAt(1);
                cmbPhongGiaoDich.Items.Clear();
                lstDieuKien.Clear();
                lstSourcePhongGiaoDich.Clear();
                lstDieuKien.Add(maChiNhanh);
                auto.GenAutoComboBox(ref lstSourcePhongGiaoDich, ref cmbPhongGiaoDich, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVITHEOMACHA.getValue(), lstDieuKien);
            }
            else
            {
                cmbPhongGiaoDich.Items.Clear();
                lstSourcePhongGiaoDich.Clear();

                cmbCBQL.Items.Clear();
                lstSourceCBQL.Clear();
            }
        }
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstSourceChiNhanh.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] {
                "%", "0"
            }));
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            // khởi tạo combobox
            auto = new AutoComboBox();

            auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
            auto.GenAutoComboBox(ref lstSourceCum, ref cmbCum, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CUM_ALL.getValue());
            LoadComboboxPhongGD();
            LoadComboboxCum();
            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            //auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ClientInformation.NgonNgu);

            lstDieuKien.Clear();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            //auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri());
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang);
            cmbDinhDang.IsEnabled = false;
        }
        private void LoadComboboxNhanSu()
        {
            if (cmbChiNhanh.SelectedIndex >= 0)
            {
                // khởi tạo combobox
                AutoComboBox auto = new AutoComboBox();
                lstSourceCanBoTD = new ListCheckBoxCombo();
                string maChiNhanh = "";
                //lstSourceChiNhanh = cmbChiNhanh.ItemsSource as ListCheckBoxCombo;
                //foreach (AutoCompleteCheckBox lstCN in lstSourceChiNhanh)
                //{
                //    if (lstCN.CheckedMember)
                //        maChiNhanh += ",'" + lstCN.ValueMember[0].ToString() + "'";
                //}
                //if (maChiNhanh.Length > 0)
                //    maChiNhanh = maChiNhanh.Substring(1);
                //else
                //    maChiNhanh = "0";
                List <string> lstDieuKien = new List <string>();
                maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First();

                // khởi tạo combobox
                auto = new AutoComboBox();
                lstDieuKien.Add(maChiNhanh);
                lstDieuKien.Add(BusinessConstant.LOAI_HO_SO.CHINH_THUC.layGiaTri());

                lstSourceCanBoTD = new ListCheckBoxCombo();
                new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceCanBoTD, ref cmbCanBoTD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NHAN_SU_LIST.getValue(), lstDieuKien);
                //lstSourcePhongGD_Select = lstSourcePhongGD.Where(e => e.KeywordStrings.ElementAt(1).Equals(maChiNhanh)).ToList();
                //lstSourcePhongGD_Select.Insert(0, new AutoCompleteEntry("Tất cả", "%", ""));
                //// khởi tạo combobox
                //auto = new AutoComboBox();
                //cmbPhongGD.Items.Clear();
                //auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null);
            }
        }
Beispiel #19
0
        public void InitCombobox()
        {
            AutoComboBox  au          = new AutoComboBox();
            List <string> lstDieuKien = new List <string>();

            try
            {
                //List<string> lstDK = new List<string>();
                //lstDK.Add(Presentation.Process.Common.ClientInformation.IdDonViGiaoDich.ToString());
                //au.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CHI_NHANH.getValue(), lstDK);

                au.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, "COMBOBOX_HE_THONG_TKHOAN_TH", null);
            }
            catch (System.Exception ex)
            {
                LMessage.ShowMessage("M.DungChung.LoiLoadDuLieu", LMessage.MessageBoxType.Error);
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
            finally
            {
                au          = null;
                lstDieuKien = null;
            }
        }
Beispiel #20
0
        private void LoadCombobox()
        {
            COMBOBOX_DTO        combo       = null;
            List <string>       lstDieuKien = null;
            List <COMBOBOX_DTO> lstCombobox = new List <COMBOBOX_DTO>();

            //Loại phụ cấp
            lstDieuKien = new List <string>();
            lstDieuKien.Add("NS_DM_DU_AN");
            lstDieuKien.Add(ClientInformation.MaDonVi);
            combo             = new COMBOBOX_DTO();
            combo.maCSo       = DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC_NHAN_SU_THEO_BANG.getValue();
            combo.combobox    = cmbDuAn;
            combo.lstSource   = lstSourceDuAn;
            combo.lstDieuKien = lstDieuKien;
            lstCombobox.Add(combo);

            AutoComboBox auto = new AutoComboBox();

            auto.GenAutoComboBoxTheoList(ref lstCombobox);

            cmbDuAn.SelectedIndex = 0;



            DataSet dsNQL = new NhanSuProcess().GetDanhSachHoSo(ClientInformation.MaDonViGiaoDich, BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri(), BusinessConstant.LOAI_HO_SO.CHINH_THUC.layGiaTri());

            if (dsNQL != null && dsNQL.Tables[0].Rows.Count > 0)
            {
                ((GridViewComboBoxColumn)grid.Columns["NQL"]).ItemsSource = dsNQL.Tables[0].DefaultView;
            }
            else
            {
                ((GridViewComboBoxColumn)grid.Columns["NQL"]).ItemsSource = null;
            }
        }
Beispiel #21
0
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);

            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
            LoadComboboxPhongGD();

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DONG_TIEN_CAC_NUOC.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceLoaiTien, ref cmbLoaiTien, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri());
            cmbDinhDang.IsEnabled = false;
            //cmbDinhDang.SelectedValue = ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri();
        }
        /// <summary>
        /// Su kien luu thong tin chi tiet xuong grid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tlbSaveThongTin_Click(object sender, RoutedEventArgs e)
        {
            if (Validation())
            {
                AutoComboBox au          = new AutoComboBox();
                string       moi_quan_he = au.getEntryByDisplayName(lstSourceMoiQuanHe, ref cmbMoiQuanHe).KeywordStrings[0];

                if (!isUpdate)
                {
                    _dtSource.Rows.Add(false, grKhachHang.Items.Count + 1, idTuSinh - 1, -1, txtMaKhachHang.Text.Trim(), moi_quan_he, lblTenKhachHang.Content,
                                       cmbMoiQuanHe.Text);
                    idTuSinh = idTuSinh - 1;
                }
                else
                {
                    DataRowView dr = (DataRowView)grKhachHang.SelectedItem;
                    dr["KHLQ_MA"]               = txtMaKhachHang.Text.Trim();
                    dr["KHLQ_TEN"]              = lblTenKhachHang.Content;
                    dr["KHLQ_MOI_QUAN_HE"]      = moi_quan_he;
                    dr["KHLQ_MOI_QUAN_HE_TEXT"] = cmbMoiQuanHe.Text;
                }
                ResetForm();
            }
        }
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // Khai bao AutoComboBox
            AutoComboBox auto;
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            //Tao combobox Chi nhanh,PGD
            auto = new AutoComboBox();
            //lstSourceChiNhanh.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" }));
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);
            LoadComboboxPhongGD();

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.LY_DO_VAO_RA.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();

            lstDieuKien = new List <string>();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
            cmbNgonNgu.IsEnabled = false;

            lstDieuKien.Clear();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
            // khởi tạo combobox
            auto = new AutoComboBox();
            auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri());
            cmbDinhDang.IsEnabled = false;

            cmbChiNhanh.SelectionChanged += cmbChiNhanh_SelectionChanged;
            cmbPhongGD.SelectionChanged  += cmbPhongGD_SelectionChanged;
            IsLoadForm = true;
        }
        private void LoadTreeview()
        {
            AutoComboBox  auto        = new AutoComboBox();
            List <string> lstDieuKien = new List <string>();
            RadComboBox   cb          = new RadComboBox();

            lstDieuKien.Add(DatabaseConstant.DanhMuc.NHOM_NO.getValue());
            lstSourceNhomNo = new List <AutoCompleteEntry>();
            auto.GenAutoComboBox(ref lstSourceNhomNo, ref cb, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);

            RadTreeViewItem rootItem = new RadTreeViewItem();

            rootItem.Header     = LLanguage.SearchResourceByKey("Nhóm nợ ") + " (" + lstSourceNhomNo.Count.ToString() + ")";
            rootItem.Tag        = string.Empty;
            rootItem.IsExpanded = true;
            rootItem.IsChecked  = false;
            tvwTreeNhomNo.Items.Add(rootItem);
            BuildTree(rootItem, lstSourceNhomNo);

            auto        = new AutoComboBox();
            lstDieuKien = new List <string>();
            cb          = new RadComboBox();
            lstDieuKien.Add(ClientInformation.MaDonVi);
            lstSourceLoaiTSDB = new List <AutoCompleteEntry>();
            auto.GenAutoComboBox(ref lstSourceLoaiTSDB, ref cb, "COMBOBOX_SAN_PHAM_TD", lstDieuKien);

            rootItem            = new RadTreeViewItem();
            rootItem.Header     = LLanguage.SearchResourceByKey("Sản phẩm tím dụng") + " (" + lstSourceLoaiTSDB.Count.ToString() + ")";
            rootItem.Tag        = string.Empty;
            rootItem.IsExpanded = true;
            rootItem.IsChecked  = false;
            tvwTreeLoaiTSDB.Items.Add(rootItem);
            BuildTree(rootItem, lstSourceLoaiTSDB);

            auto        = new AutoComboBox();
            lstDieuKien = new List <string>();
            cb          = new RadComboBox();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.NGUON_VON_VAY.getValue());
            lstSourceNguonVonChoVay = new List <AutoCompleteEntry>();
            auto.GenAutoComboBox(ref lstSourceNguonVonChoVay, ref cb, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);

            rootItem            = new RadTreeViewItem();
            rootItem.Header     = LLanguage.SearchResourceByKey("Nguồn vốn vay") + " (" + lstSourceNguonVonChoVay.Count.ToString() + ")";
            rootItem.Tag        = string.Empty;
            rootItem.IsExpanded = true;
            rootItem.IsChecked  = false;
            tvwTreeNguonVonChoVay.Items.Add(rootItem);
            BuildTree(rootItem, lstSourceNguonVonChoVay);

            auto        = new AutoComboBox();
            lstDieuKien = new List <string>();
            cb          = new RadComboBox();
            lstDieuKien.Add(DatabaseConstant.DanhMuc.MUC_DICH_VAY_VON.getValue());
            lstSourceMucDichVay = new List <AutoCompleteEntry>();
            auto.GenAutoComboBox(ref lstSourceMucDichVay, ref cb, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);

            rootItem            = new RadTreeViewItem();
            rootItem.Header     = LLanguage.SearchResourceByKey("Mục đích vay vốn") + " (" + lstSourceMucDichVay.Count.ToString() + ")";
            rootItem.Tag        = string.Empty;
            rootItem.IsExpanded = true;
            rootItem.IsChecked  = false;
            tvwTreeMucDichVay.Items.Add(rootItem);
            BuildTree(rootItem, lstSourceMucDichVay);
        }
Beispiel #25
0
        private void GetDataOnForm(ref DANH_SACH_KHE_UOC_VONG_VAY obj)
        {
            List <Presentation.Process.TinDungServiceRef.DANH_SACH_SO> lstRutTien = new List <Presentation.Process.TinDungServiceRef.DANH_SACH_SO>();
            List <Presentation.Process.TinDungServiceRef.DANH_SACH_SO> lstNopTien = new List <Presentation.Process.TinDungServiceRef.DANH_SACH_SO>();

            if (_kheUoc.DSACH_SO_NOP_TIEN != null)
            {
                _kheUoc.DSACH_SO_NOP_TIEN = null;
            }

            if (_kheUoc.DSACH_SO_RUT_TIEN != null)
            {
                _kheUoc.DSACH_SO_RUT_TIEN = null;
            }

            if (chkNopBangTienMat.IsChecked == true)
            {
                _kheUoc.THUC_THU_TIEN_MAT = Convert.ToDecimal(numTienMat.Value);
            }

            if (chkTKTietKiemKhongKyHan.IsChecked == true)
            {
                _kheUoc.NOP_TIEN_TU_TKKKH = "CO";
                AutoComboBox      auto = new AutoComboBox();
                AutoCompleteEntry au   = auto.getEntryByDisplayName(lstSourceTaiKhoanKhongKyHan, ref cmbTaiKhoanTK);
                Presentation.Process.TinDungServiceRef.DANH_SACH_SO objRutTK = new Presentation.Process.TinDungServiceRef.DANH_SACH_SO();
                objRutTK.SO_SO          = au.DisplayName;
                objRutTK.SO_TAI_KHOAN   = cmbTaiKhoanTK.Tag.ToString();
                objRutTK.SO_DU          = Convert.ToDecimal(numSoDuTaiKhoanTK.Value);
                objRutTK.SO_TIEN_RUT_RA = Convert.ToDecimal(numSoTienRutTuTK.Value);
                lstRutTien.Add(objRutTK);
            }
            else
            {
                _kheUoc.NOP_TIEN_TU_TKKKH = "KHONG";
            }

            if (chkTKKhongKyHanTienThua.IsChecked == false)
            {
                _kheUoc.NOP_TIEN_VAO_TKKKH = "KHONG";
            }
            else
            {
                _kheUoc.NOP_TIEN_VAO_TKKKH = "CO";
                DataTable dt = ((DataView)grTKKhongKyHanTienThua.ItemsSource).Table;
                foreach (DataRow dr in dt.Rows)
                {
                    if (!dr["so_so_tg"].ToString().Equals(obj.SO_SO_TG))
                    {
                        Presentation.Process.TinDungServiceRef.DANH_SACH_SO objNopTK = new Presentation.Process.TinDungServiceRef.DANH_SACH_SO();
                        if (!dr["so_so_tg"].ToString().Equals(_kheUoc.SO_SO_TG))
                        {
                            objNopTK.SO_SO           = dr["so_so_tg"].ToString();
                            objNopTK.SO_TAI_KHOAN    = dr["so_tai_khoan"].ToString();
                            objNopTK.SO_DU           = Convert.ToDecimal(dr["so_tien"]);
                            objNopTK.SO_TIEN_NOP_VAO = Convert.ToDecimal(dr["so_tien_nop"]);
                            lstNopTien.Add(objNopTK);
                            obj.THUC_THU_NOP_VAO_TKKKH += Convert.ToDecimal(dr["so_tien_nop"]);
                        }
                    }
                    else
                    {
                        obj.THUC_THU_TKQD += Convert.ToDecimal(dr["so_tien_nop"]);
                    }
                }
            }

            //if (chkGhiTKNoiBo.IsChecked == false)
            //{
            _kheUoc.GHI_NHAN_VAO_TKNB = "KHONG";
            //}
            //else
            //{
            //    _kheUoc.GHI_NHAN_VAO_TKNB = "CO";
            //}

            if (chkTraTruocHan.IsChecked == false)
            {
                _kheUoc.TRA_GOC_LAI_TRUOC_HAN = "KHONG";
            }
            else
            {
                _kheUoc.TRA_GOC_LAI_TRUOC_HAN = "CO";
                _kheUoc.TONG_TIEN_TRA_TRUOC   = Convert.ToDecimal(numSoTienNop.Value);
            }

            if (lstNopTien != null && lstNopTien.Count > 0)
            {
                obj.DSACH_SO_NOP_TIEN = lstNopTien.ToArray();
            }

            if (lstRutTien != null && lstRutTien.Count > 0)
            {
                obj.DSACH_SO_RUT_TIEN = lstRutTien.ToArray();
            }

            _kheUoc.PHI_TRA_TRUOC = Convert.ToDecimal(numPhiTraTruoc.Value);

            PhanBoSoTienThuDuoc();
        }
        private void LoadCombobox()
        {
            try
            {
                List <string> lstDieuKien = new List <string>();
                AutoComboBox  auto        = new AutoComboBox();

                //Tao combobox chi nhanh
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbChiNhanh", () =>
                {
                    auto = new AutoComboBox();
                    auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi);
                }, TimeSpan.FromSeconds(0));

                //Tao combobox phonggd
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbPhongGD", () =>
                {
                    auto = new AutoComboBox();
                    auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
                    LoadComboboxPhongGD();
                }, TimeSpan.FromSeconds(0));

                //Tao combobox ngon ngu
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbNgonNgu", () =>
                {
                    lstDieuKien = new List <string>();
                    lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
                    // khởi tạo combobox
                    auto = new AutoComboBox();
                    //auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
                    auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ClientInformation.NgonNgu);
                }, TimeSpan.FromSeconds(0));

                //Tao combobox dinh dang
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbDinhDang", () =>
                {
                    lstDieuKien = new List <string>();
                    lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
                    // khởi tạo combobox
                    auto = new AutoComboBox();
                    //auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.WORD.layGiaTri());
                    //cmbDinhDang.SelectedIndex = lstSourceDinhDang.FindIndex(e => e.KeywordStrings[0].Equals(ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri()));
                    auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang);
                    cmbDinhDang.IsEnabled = false;
                }, TimeSpan.FromSeconds(0));

                //Tao combobox khu vuc
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbKhuVuc", () =>
                {
                    LoadComboboxKhuVuc();
                }, TimeSpan.FromSeconds(0));

                //Tao combobox cum
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbKhuVuc", () =>
                {
                    loadComboboxCum();
                }, TimeSpan.FromSeconds(0));

                //Tao combobox nhom
                Dispatcher.CurrentDispatcher.DelayInvoke("cmbKhuVuc", () =>
                {
                    LoadComboboxNhom();
                }, TimeSpan.FromSeconds(0));
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
        }
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                if (!isLoaded)
                {
                    if (luuAction == DatabaseConstant.Action.XEM)
                    {
                        formCase = "XEM";
                    }
                    else if (luuAction == DatabaseConstant.Action.SUA)
                    {
                        formCase = "SUA";
                    }
                    else if (luuAction == DatabaseConstant.Action.THEM)
                    {
                        formCase = "MANAGE";
                    }

                    if (formCase == null)
                    {
                        formCase = ClientInformation.FormCase;
                    }
                    string strTrangThai = string.Empty;
                    if (obj != null)
                    {
                        id       = obj.ID;
                        tthaiNvu = obj.TTHAI_NVU;

                        // khởi tạo combobox
                        AutoComboBox auto = new AutoComboBox();
                        auto = new AutoComboBox();
                        List <string> lstDieuKien = new List <string>();

                        //auto.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVI.getValue(), null, obj.MA_DVI_QLY);
                        lstDieuKien = new List <string>();
                        lstDieuKien.Add("'" + DatabaseConstant.ToChucDonVi.HSO.getValue() + "', '" + DatabaseConstant.ToChucDonVi.CNH.getValue() + "'");
                        auto.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVITHEOLOAI.getValue(), lstDieuKien, obj.MA_DVI_QLY);

                        //lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(obj.TTHAI_NVU);
                        lblTrangThai.Content = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);

                        txtMaNhom.Text  = obj.MA_NHNSD;
                        txtTenNhom.Text = obj.TEN_NHNSD;
                        txtMoTa.Text    = obj.MO_TA;

                        if (obj.HAN_CHE_TRUY_CAP.Equals(BusinessConstant.CoKhong.CO.layGiaTri()))
                        {
                            chkHoatDong.IsChecked = true;
                        }
                        else
                        {
                            chkHoatDong.IsChecked = false;
                        }

                        txtTrangThai.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                        if (!string.IsNullOrEmpty(obj.NGAY_NHAP) && obj.NGAY_NHAP != "")
                        {
                            raddtNgayNhap.Value = LDateTime.StringToDate(obj.NGAY_NHAP, "yyyyMMdd");
                        }
                        else
                        {
                            raddtNgayNhap.Value = null;
                        }
                        txtNguoiLap.Text     = obj.NGUOI_NHAP;
                        txtNguoiCapNhat.Text = obj.NGUOI_CNHAT;
                        if (!string.IsNullOrEmpty(obj.NGAY_CNHAT) && obj.NGAY_CNHAT != "")
                        {
                            raddtNgayCNhat.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, "yyyyMMdd");
                        }
                        else
                        {
                            raddtNgayCNhat.Value = null;
                        }

                        BuildGridDoiTuong();
                        loadWidthColumnDoiTuong();
                        strTrangThai = obj.TTHAI_NVU;
                    }
                    else
                    {
                        // khởi tạo combobox
                        AutoComboBox auto = new AutoComboBox();
                        auto = new AutoComboBox();
                        List <string> lstDieuKien = new List <string>();

                        //auto.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVI.getValue(), null, ClientInformation.MaDonVi);
                        lstDieuKien = new List <string>();
                        lstDieuKien.Add("'" + DatabaseConstant.ToChucDonVi.HSO.getValue() + "', '" + DatabaseConstant.ToChucDonVi.CNH.getValue() + "'");
                        auto.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVITHEOLOAI.getValue(), lstDieuKien, ClientInformation.MaDonVi);

                        lblTrangThai.Content = string.Empty;
                        txtTrangThai.Text    = string.Empty;
                        raddtNgayNhap.Value  = null;
                        txtNguoiLap.Text     = string.Empty;
                        raddtNgayCNhat.Value = null;
                        txtNguoiCapNhat.Text = string.Empty;
                        strTrangThai         = string.Empty;
                    }

                    CommonFunction.RefreshButton(Toolbar, luuAction, strTrangThai, mnuMain, DatabaseConstant.Function.HT_NHNSD);

                    if (luuAction != DatabaseConstant.Action.THEM)
                    {
                        cbMultiAdd.Visibility = Visibility.Collapsed;
                    }

                    ((RadTabItem)tabNSDCT.Items[0]).IsSelected = true;
                    tabNSDCT.SelectionChanged += tabNSDCT_SelectionChanged;
                    LoadGridTruyCap();
                    cmbDonVi.Focus();
                    isLoaded = true;
                }
                HideControl();
                if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) ||
                    ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()))
                {
                    cmbDonVi.IsEnabled = false;
                }
                else
                {
                    cmbDonVi.IsEnabled = true;
                }
            }
            catch (System.Exception ex)
            {
                CommonFunction.ThongBaoLoi(ex);
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
            Mouse.OverrideCursor = Cursors.Arrow;
        }
Beispiel #28
0
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstDieuKien.Add(ClientInformation.TenDangNhap);
            lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
            auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), lstDieuKien, ClientInformation.MaDonVi);


            // khởi tạo combobox
            Dispatcher.CurrentDispatcher.DelayInvoke("cmbPhongGD", () =>
            {
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
                LoadComboboxPhongGD();
            }, TimeSpan.FromSeconds(0));

            //LoadComboboxSanPham
            Dispatcher.CurrentDispatcher.DelayInvoke("cmbSanPham", () =>
            {
                if (cmbChiNhanh.SelectedIndex == -1)
                {
                    return;
                }
                LoadComboboxSanPham();
            }, TimeSpan.FromSeconds(0));

            //LoadComboboxXaPhuong
            Dispatcher.CurrentDispatcher.DelayInvoke("cmbXaPhuong", () =>
            {
                if (cmbPhongGD.SelectedIndex == -1)
                {
                    return;
                }
                LoadComboboxXaPhuong();
            }, TimeSpan.FromSeconds(0));

            //LoadComboboxThonAp
            Dispatcher.CurrentDispatcher.DelayInvoke("cmbThonAp", () =>
            {
                if (cmbXaPhuong.SelectedIndex == -1)
                {
                    return;
                }
                LoadComboboxThonAp();
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("LoadComboboxNguonVon", () =>
            {
                LoadComboboxNguonVon();
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbNgonNgu", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                //auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
                auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ClientInformation.NgonNgu);
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbDinhDang", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                //auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.WORD.layGiaTri());
                //cmbDinhDang.SelectedIndex = lstSourceDinhDang.FindIndex(e => e.KeywordStrings[0].Equals(ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri()));
                auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang);
                cmbDinhDang.IsEnabled = false;
            }, TimeSpan.FromSeconds(0));
        }
        /// <summary>
        /// Khởi tạo các combobox
        /// </summary>
        private void LoadCombobox()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();
            // Khởi tạo điều kiện gọi danh mục
            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            Dispatcher.CurrentDispatcher.DelayInvoke("cmbChiNhanh", () =>
            {
                auto = new AutoComboBox();
                lstDieuKien.Add(ClientInformation.TenDangNhap);
                lstDieuKien.Add(ClientInformation.MaDonViQuanLy);
                new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANHLIST.getValue(), lstDieuKien);
            }, TimeSpan.FromSeconds(0));


            //// khởi tạo combobox
            //auto = new AutoComboBox();
            //auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue());
            //LoadComboboxPhongGD();
            Dispatcher.CurrentDispatcher.DelayInvoke("LoadComboBoxPhongGD", () =>
            {
                LoadComboBoxPhongGD();
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("LoadComboBoxXaPhuong", () =>
            {
                LoadComboBoxXaPhuong();
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("LoadComboBoxThonAp", () =>
            {
                LoadComboBoxThonAp();
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbLoaiTien", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.DONG_TIEN_CAC_NUOC.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                auto.GenAutoComboBox(ref lstSourceLoaiTien, ref cmbLoaiTien, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien);
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbNgonNgu", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                //auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri());
                auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ClientInformation.NgonNgu);
            }, TimeSpan.FromSeconds(0));

            Dispatcher.CurrentDispatcher.DelayInvoke("cmbDinhDang", () =>
            {
                lstDieuKien = new List <string>();
                lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue());
                // khởi tạo combobox
                auto = new AutoComboBox();
                //auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.WORD.layGiaTri());
                //cmbDinhDang.SelectedIndex = lstSourceDinhDang.FindIndex(e => e.KeywordStrings[0].Equals(ApplicationConstant.LoaiDinhDangBaoCao.EXCEL.layGiaTri()));
                auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang);
                cmbDinhDang.IsEnabled = false;
            }, TimeSpan.FromSeconds(0));


            Dispatcher.CurrentDispatcher.DelayInvoke("cmdNhomAll", () =>
            {
                // khởi tạo dữ liệu nhóm
                auto = new AutoComboBox();
                Telerik.Windows.Controls.RadComboBox cmdNhomAll = new Telerik.Windows.Controls.RadComboBox();
                auto.GenAutoComboBox(ref lstSourceNhomAll, ref cmdNhomAll, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NHOM_ALL.getValue());
                LoadDuLieuNhom();
            }, TimeSpan.FromSeconds(0));
        }
        private void LoadComboBoxThonAp()
        {
            // khởi tạo combobox
            AutoComboBox auto = new AutoComboBox();

            lstSourceXa = new ListCheckBoxCombo();
            string maChiNhanh = "";
            string maPGD      = "";
            string maKhuVuc   = "";

            lstSourceChiNhanh = cmbChiNhanh.ItemsSource as ListCheckBoxCombo;
            foreach (AutoCompleteCheckBox lstCN in lstSourceChiNhanh)
            {
                if (lstCN.CheckedMember)
                {
                    maChiNhanh += ",'" + lstCN.ValueMember[0].ToString() + "'";
                }
            }
            if (maChiNhanh.Length > 0)
            {
                maChiNhanh = maChiNhanh.Substring(1);
            }
            else
            {
                maChiNhanh = "0";
            }

            lstSourcePhongGD = cmbPhongGD.ItemsSource as ListCheckBoxCombo;
            foreach (AutoCompleteCheckBox lstCN in lstSourcePhongGD)
            {
                if (lstCN.CheckedMember)
                {
                    maPGD += ",'" + lstCN.ValueMember[0].ToString() + "'";
                }
            }
            if (maPGD.Length > 0)
            {
                maPGD = maPGD.Substring(1);
            }
            else
            {
                maPGD = "0";
            }

            lstSourceXa = cmbXaPhuong.ItemsSource as ListCheckBoxCombo;
            foreach (AutoCompleteCheckBox lstCN in lstSourceXa)
            {
                if (lstCN.CheckedMember)
                {
                    maKhuVuc += "," + lstCN.ValueMember[1].ToString();
                }
            }
            if (maKhuVuc.Length > 0)
            {
                maKhuVuc = maKhuVuc.Substring(1);
            }
            else
            {
                maKhuVuc = "0";
            }

            List <string> lstDieuKien = new List <string>();

            // khởi tạo combobox
            auto = new AutoComboBox();
            lstDieuKien.Add(maChiNhanh);
            lstDieuKien.Add(maPGD);
            lstDieuKien.Add(maKhuVuc);
            lstSourceAp = new ListCheckBoxCombo();
            new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceAp, ref cmbThonAp, "COMBOBOX_CUM_KVUC_LIST", lstDieuKien);
            //lstSourcePhongGD_Select = lstSourcePhongGD.Where(e => e.KeywordStrings.ElementAt(1).Equals(maChiNhanh)).ToList();
            //lstSourcePhongGD_Select.Insert(0, new AutoCompleteEntry("Tất cả", "%", ""));
            //// khởi tạo combobox
            //auto = new AutoComboBox();
            //cmbPhongGD.Items.Clear();
            //auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null);
        }