private void LoadComboboxCum() { // khởi tạo combobox AutoComboBox auto = new AutoComboBox(); lstSourceCum_Select = new List <AutoCompleteEntry>(); string maChiNhanh = lstSourceChiNhanh.ElementAt(cmbChiNhanh.SelectedIndex).KeywordStrings.First(); string maPhongGiaoDich = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.First(); //if (maPhongGiaoDich == "%") // maPhongGiaoDich = maChiNhanh; lstSourceCum_Select = lstSourceCum.Where(e => e.KeywordStrings.ElementAt(1).Substring(0, maPhongGiaoDich.Length).Equals(maPhongGiaoDich)).ToList(); lstSourceCum_Select.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" })); // khởi tạo combobox auto = new AutoComboBox(); cmbCum.Items.Clear(); auto.GenAutoComboBox(ref lstSourceCum_Select, ref cmbCum, null); cmbCum.SelectedIndex = 0; cmbCum.IsEnabled = !maPhongGiaoDich.Equals("%"); }
private void KhoiTaoCombobox() { AutoComboBox auto = new AutoComboBox(); List <string> lstDieuKien = new List <string>(); //Khoi tao combobox chi nhanh auto = new AutoComboBox(); 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; }
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>(); 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 = 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()); auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang); cmbDinhDang.IsEnabled = false; }
/// <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(); // khởi tạo combobox auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceCum, ref cmbCum, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CUM_ALL.getValue()); LoadComboboxCum(); 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.PDF.layGiaTri()); }
private void cmbPhongGiaoDich_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (cmbPhongGiaoDich.SelectedIndex >= 0) { AutoComboBox auto = new AutoComboBox(); List <string> lstDieuKien = new List <string>(); string maPhongGD = lstSourcePhongGiaoDich.ElementAt(cmbPhongGiaoDich.SelectedIndex).KeywordStrings.First(); string idPhongGD = lstSourcePhongGiaoDich.ElementAt(cmbPhongGiaoDich.SelectedIndex).KeywordStrings.ElementAt(1); cmbCBQL.Items.Clear(); lstDieuKien.Clear(); lstSourceCBQL.Clear(); lstDieuKien.Add(maPhongGD); auto.GenAutoComboBox(ref lstSourceCBQL, ref cmbCBQL, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NSD.getValue(), lstDieuKien); } else { cmbCBQL.Items.Clear(); lstSourceCBQL.Clear(); } }
/// <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); // khởi tạo combobox 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.DropDownClosed += cmbPhongGD_DropDownClosed; IsLoadForm = true; }
/// <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(); 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.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()); 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.PDF.layGiaTri()); }
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, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NHOM.getValue(), lstDieuKien); } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
private void KhoiTaoCombobox() { AutoComboBox auto = new AutoComboBox(); List <string> lstDieuKien = new List <string>(); //Khoi tao combobox chi nhanh Dispatcher.CurrentDispatcher.DelayInvoke("cmbChiNhanh", () => { lstDieuKien.Add(ClientInformation.TenDangNhap); lstDieuKien.Add(ClientInformation.MaDonViQuanLy); new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANHLIST.getValue(), lstDieuKien); }, TimeSpan.FromSeconds(0)); //Khoi tao combobox chi nhanh Dispatcher.CurrentDispatcher.DelayInvoke("cmbNguonVon", () => { new AutoComboBoxListCheckes().GenAutoComboBox(ref lstSourceNguonVon, ref cmbNguonVon, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NGUON_VON.getValue()); }, 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()); }, 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())); }, TimeSpan.FromSeconds(0)); }
private void LoadCombobox() { AutoComboBox auto = new AutoComboBox(); List <string> lstDieuKien = new List <string>(); //Tạo combox chi nhanh auto = new AutoComboBox(); if (!(ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()))) { 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); if (!(ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()))) { if (lstSourceChiNhanh.Count > 0) { cmbChiNhanh.SelectedIndex = 0; } } //Tao combobox ngon ngu bao cao auto = new AutoComboBox(); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.DanhMuc.NGON_NGU.getValue()); auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiNgonNguBaoCao.vi_VN.layGiaTri()); //Tao combobox dinh dang bao cao auto = new AutoComboBox(); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.DanhMuc.DINH_DANG_BAO_CAO.getValue()); auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ApplicationConstant.LoaiDinhDangBaoCao.PDF.layGiaTri()); }
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()); LoadComboboxPhongGD(); 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; //Tao combobox dinh dang bao cao lstDieuKien = new List <string>(); auto.GenAutoComboBox(ref lstSourceLoaiTien, ref cmbLoaiTien, DatabaseConstant.DanhSachTruyVan.COMBOBOX_TIENTE.getValue(), lstDieuKien, ClientInformation.MaDongNoiTe); }
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); }
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); } }
/// <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())); }
/// <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; }
/// <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); } }
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" })); } else { lstSourcePhongGD_Select = lstSourcePhongGD; } // khởi tạo combobox auto = new AutoComboBox(); cmbPhongGD.Items.Clear(); auto.GenAutoComboBox(ref lstSourcePhongGD_Select, ref cmbPhongGD, null); }
/// <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 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); auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourcePhongGD, ref cmbPhongGD, DatabaseConstant.DanhSachTruyVan.COMBOBOX_PHONG_GD.getValue()); LoadComboboxPhongGD(); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.DanhMuc.BCAO_TDUNG_TIEU_CHI_NHOM.getValue()); // khởi tạo combobox auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceTieuChiNhom, ref cmbTieuChiLoc, 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()); auto.GenAutoComboBox(ref lstSourceNgonNgu, ref cmbNgonNgu, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ClientInformation.NgonNgu); 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()); auto.GenAutoComboBox(ref lstSourceDinhDang, ref cmbDinhDang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien, ReportInformation.DinhDang); cmbDinhDang.IsEnabled = false; }
/// <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()); }
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; } }
void KhoiTaoGiaTriComboBox(ref List <AutoCompleteEntry> lstAutoComplete, ref DropDownList cmbControl, string sMaTruyVan, List <string> lstDKien = null) { AutoComboBox autoComboBox = new AutoComboBox(); autoComboBox.GenAutoComboBox(ref lstAutoComplete, ref cmbControl, sMaTruyVan, lstDKien); }
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; }
/// <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 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(); auto.GenAutoComboBox(ref lstSourceChiNhanh, ref cmbChiNhanh, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CNHANH.getValue(), null, ClientInformation.MaDonVi); }, TimeSpan.FromSeconds(0)); // 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)); 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, ClientInformation.MaDongNoiTe); cmbLoaiTien.IsEnabled = false; }, 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, 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.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("cmbNguonVon", () => { lstSourceNguonVon.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" })); // khởi tạo combobox auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceNguonVon, ref cmbNguonVon, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NGUON_VON.getValue(), null); }, TimeSpan.FromSeconds(0)); }
private void LoadCombobox() { AutoComboBox auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceQuocGia, ref cmbQuocGia, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NS_QUOC_GIA.getValue()); }
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 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); }
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>(); lstDieuKien.Add(DatabaseConstant.DanhMuc.DANH_MUC_PHAN_HE.getValue()); //lstSourcePhanHe.Add(new AutoCompleteEntry("Tất cả","")); auto.GenAutoComboBox(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien); //// Nếu là M7MFI //if (ClientInformation.Company.Equals(ApplicationConstant.DonViSuDung.M7MFI.layGiaTri())) //{ // // Không thực hiện cho TDTT, BHTH, QLTS // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.TDTT.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.BHTH.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.NSTL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.KTDL.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.QLTS.getValue()); //} //else if (ClientInformation.Company.Equals(ApplicationConstant.DonViSuDung.BINHKHANH.layGiaTri())) //{ // // Không thực hiện cho TDTT, BHTH, KTDL, QLTS // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.TDTT.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.BHTH.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.NSTL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.KTDL.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.QLTS.getValue()); //} //else if (ClientInformation.Company.Equals(ApplicationConstant.DonViSuDung.BANTAYVANG.layGiaTri())) //{ // // Không thực hiện cho TDTT, BHTH // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.TDTT.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.BHTH.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.NSTL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.KTDL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.QLTS.getValue()); //} //else //{ // // Không thực hiện cho TDTT, BHTH // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.TDTT.getValue()); // auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.BHTH.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.NSTL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.KTDL.getValue()); // //auto.removeEntry(ref lstSourcePhanHe, ref cmbPhanHeChucNang, DatabaseConstant.Module.QLTS.getValue()); //} // 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 BuildGrid(); } catch (System.Exception ex) { CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } Mouse.OverrideCursor = Cursors.Arrow; }