/// <summary> /// Sự kiện rời focus khỏi textbox tìm kiếm nhanh /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtTimKiemNhanh_LostFocus(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(txtTimKiemNhanh.Text)) { txtTimKiemNhanh.Text = LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh"); } loadWidthColumn(); }
/// <summary> /// Sự kiện focus vào textbox tìm kiếm nhanh /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtTimKiemNhanh_GotFocus(object sender, RoutedEventArgs e) { if (txtTimKiemNhanh.Text == LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh")) { txtTimKiemNhanh.Text = ""; txtTimKiemNhanh.Focus(); } }
protected void Application_Start(object sender, EventArgs e) { CacheService.Instance(); Presentation.Process.Common.ClientInitProcess objRead = new Presentation.Process.Common.ClientInitProcess(); objRead.docThongTinCauHinhClient(0); LLanguage.ApplyLanguage(AppDomain.CurrentDomain.BaseDirectory + "languages", AppConfig.Language); }
/// <summary> /// Sự kiện tìm kiếm nhanh /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtTimKiemNhanh_TextChanged(object sender, TextChangedEventArgs e) { if (txtTimKiemNhanh.Text == LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh")) { return; } PresentationWPF.CustomControl.CommonFunction.QuickSearchInGrid(grid, txtTimKiemNhanh.Text); }
void KhoiTaoControl() { try { string Dislay = LLanguage.SearchResourceByKey("U.DungChung.TatCa"); teldtNgayADungDen.Value = null; teldtNgayADungTu.Value = null; teldtNgayHetHanDen.Value = null; teldtNgayHetHanTu.Value = null; List <string> lstDieuKien = new List <string>(); string maTruyVan = DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(); // Gán giá trị điều kiện lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.PHUONG_THUC_TINH_LAI)); lstPhuongThucTinhLai.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstPhuongThucTinhLai, ref cmbPhuongThucTinhLai, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.MUC_DICH_VAY_VON)); lstMucDichSuDung.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstMucDichSuDung, ref cmbMucDich, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.LOAI_SAN_PHAM_TDUNG)); lstLoaiSanPham.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstLoaiSanPham, ref cmbLoaiSanPham, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.TRANG_THAI_BAN_GHI)); lstHieuLuc.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstHieuLuc, ref cmbTinhTrang, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.NGUON_VON_VAY)); lstNguonVon.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstNguonVon, ref cmbLoaiVay, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.LOAI_LAI_SUAT)); lstLoaiLaiSuat.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstLoaiLaiSuat, ref cmbLoaiLaiSuat, maTruyVan, lstDieuKien); AutoComboBox auto = new AutoComboBox(); 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); if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri())) { cmbDonVi.IsEnabled = false; } cmbDonVi.SelectionChanged += new SelectionChangedEventHandler(cmbDonVi_SelectionChanged); } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
private void LoadTreeview() { string maPGD = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex).KeywordStrings.First(); AutoComboBox auto = new AutoComboBox(); List <string> lstDieuKien = new List <string>(); RadComboBox cb = new RadComboBox(); lstDieuKien.Add(maPGD); lstDieuKien.Add("VON_TRA_DAN"); lstSourceVonTraDan = new List <AutoCompleteEntry>(); auto.GenAutoComboBox(ref lstSourceVonTraDan, ref cb, "COMBOBOX_SAN_PHAM_TDLIST_02", lstDieuKien); RadTreeViewItem rootItem = new RadTreeViewItem(); rootItem.Header = LLanguage.SearchResourceByKey("Vốn trả dần ") + " (" + lstSourceVonTraDan.Count.ToString() + ")"; rootItem.Tag = string.Empty; rootItem.IsExpanded = true; rootItem.IsChecked = false; tvwVonTraDan.Items.Clear(); tvwVonTraDan.Items.Add(rootItem); BuildTree(rootItem, lstSourceVonTraDan); auto = new AutoComboBox(); lstDieuKien = new List <string>(); cb = new RadComboBox(); lstDieuKien.Add(maPGD); lstDieuKien.Add("TIN_CHAP"); lstSourceVonKhac = new List <AutoCompleteEntry>(); auto.GenAutoComboBox(ref lstSourceVonKhac, ref cb, "COMBOBOX_SAN_PHAM_TDLIST_02", lstDieuKien); rootItem = new RadTreeViewItem(); rootItem.Header = LLanguage.SearchResourceByKey("Vốn khác ") + " (" + lstSourceVonKhac.Count.ToString() + ")"; rootItem.Tag = string.Empty; rootItem.IsExpanded = true; rootItem.IsChecked = false; tvwVonKhac.Items.Clear(); tvwVonKhac.Items.Add(rootItem); BuildTree(rootItem, lstSourceVonKhac); auto = new AutoComboBox(); lstDieuKien = new List <string>(); cb = new RadComboBox(); lstDieuKien.Add(maPGD); lstDieuKien.Add("VON_THOI_VU"); lstSourceVonBoSung = new List <AutoCompleteEntry>(); auto.GenAutoComboBox(ref lstSourceVonBoSung, ref cb, "COMBOBOX_SAN_PHAM_TDLIST_02", lstDieuKien); rootItem = new RadTreeViewItem(); rootItem.Header = LLanguage.SearchResourceByKey("Vốn bổ sung ") + " (" + lstSourceVonBoSung.Count.ToString() + ")"; rootItem.Tag = string.Empty; rootItem.IsExpanded = true; rootItem.IsChecked = false; tvwVonBoSung.Items.Clear(); tvwVonBoSung.Items.Add(rootItem); BuildTree(rootItem, lstSourceVonBoSung); }
/// <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>(); string ThamSoHThongTK = new UtilitiesProcess().LayGiaTriThamSo(BusinessConstant.LoaiThamSo.TW, BusinessConstant.MaThamSo.TW_HE_THONG_TKHOAN_HTHI, ClientInformation.MaDonVi); if (ThamSoHThongTK.IsNullOrEmptyOrSpace()) { ThamSoHThongTK = "CHI_TIET"; } // 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(); //Hệ thống tài khoản lstSourceHeThongTK.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.ChiTiet"), new string[2] { "CHI_TIET", "0" })); auto.GenAutoComboBox(ref lstSourceHeThongTK, ref cmbHeThongTKhoan, DatabaseConstant.DanhSachTruyVan.COMBOBOX_HE_THONG_TK.getValue(), null, ThamSoHThongTK); //Nguồn vốn lstSourceNguonVon.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" })); auto.GenAutoComboBox(ref lstSourceNguonVon, ref cmbNguonVon, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NGUON_VON.getValue(), null); cmbNguonVon.SelectedIndex = 0; 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())); }
private void BuildGrid() { try { List <string> lst = new List <string>(); RadTreeViewItem selectItem = (RadTreeViewItem)trvTree.SelectedItem; lst.Add(selectItem.Tag.ToString()); getSelectChild(ref lst, selectItem); DataTable grdData = new DataTable(); foreach (DataColumn col in dtDetail.Columns) { if (!grdData.Columns.Contains(col.ColumnName)) { Type type = typeof(string); if (col.DataType == typeof(decimal)) { type = typeof(decimal); } else if (col.DataType == typeof(int)) { type = typeof(int); } else if (col.DataType == typeof(float)) { type = typeof(float); } grdData.Columns.Add(col.ColumnName, type); } } if (lst.Count > 0) { int stt = 0; foreach (DataRow row in dtDetail.Rows) { if (lst.Contains(row["KEY"].ToString())) { stt = stt + 1; row[0] = stt.ToString(); grdData.ImportRow(row); } } // Xử lý ngôn ngữ foreach (DataRow dr in grdData.Rows) { for (int i = 0; i < dtDetail.Columns.Count; i++) { dr[i] = LLanguage.SearchResourceByKey(dr[i].ToString()); } } } raddgrDanhSach.ItemsSource = grdData.DefaultView; lblTongSoBanGhi.Content = grdData.Rows.Count; } catch (Exception ex) { } }
public WindowHelp(string documentPath, string documentTitle) : this() { filePath = documentPath; title = LLanguage.SearchResourceByKey(documentTitle); LoadDocument(); BuildTreeRoot(); trvMenu.SelectionChanged += new SelectionChangedEventHandler(trvMenu_SelectionChanged); }
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 // khởi tạo combobox Dispatcher.CurrentDispatcher.DelayInvoke("cmbChiNhanh", () => { 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); }, 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.EXCEL.layGiaTri()); }, 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 Worker_DoWork_KiemTra(object sender, DoWorkEventArgs e) { try { // background QuanTriHeThongProcess process = new QuanTriHeThongProcess(); ApplicationConstant.ResponseStatus ret = ApplicationConstant.ResponseStatus.KHONG_THANH_CONG; string serverVersion = ""; string lastestClientVersion = ""; HT_PBAN htPban = new HT_PBAN(); List <HT_PBAN_CTIET> listHtPbanCtiet = new List <HT_PBAN_CTIET>(); List <HT_PBAN_FILE> listHtPbanFile = new List <HT_PBAN_FILE>(); string responseMessage = ""; ret = process.CheckClientVersion(ClientInformation.Version, ref serverVersion, ref lastestClientVersion, ref htPban, ref listHtPbanCtiet, ref listHtPbanFile, ref responseMessage); ResStatus = ret; if (ret == ApplicationConstant.ResponseStatus.THANH_CONG) { ServerVersion = serverVersion; LastestClientVersion = lastestClientVersion; if (ClientInformation.Version.Equals(LastestClientVersion)) { IsLastestVersion = true; ResContent = LLanguage.SearchResourceByKey("M.ResponseMessage.QuanTriHeThong.PhienBan.SystemUpToDate") + " " + ClientInformation.Version; } else { IsLastestVersion = false; HtPban = htPban; ListHtPbanCtiet = listHtPbanCtiet; ListHtPbanFile = listHtPbanFile; ResContent = LLanguage.SearchResourceByKey("M.ResponseMessage.QuanTriHeThong.PhienBan.PhienBanHienTai") + " " + ClientInformation.Version + ". " + LLanguage.SearchResourceByKey("M.ResponseMessage.QuanTriHeThong.PhienBan.PhienBanMoiNhat") + " " + LastestClientVersion; } } else if (ret == ApplicationConstant.ResponseStatus.KHONG_THANH_CONG) { ResContent = LLanguage.SearchResourceByKey(responseMessage); } else { ResContent = ""; } Thread.Sleep(3000); } catch (Exception ex) { ResStatus = ApplicationConstant.ResponseStatus.KHONG_THANH_CONG; ResContent = LLanguage.SearchResourceByKey("M.ResponseMessage.QuanTriHeThong.PhienBan.KiemTraKhongThanhCong"); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.SYS, ex); Worker_KiemTra.CancelAsync(); // Vẫn xử lý tại client cho logout //Application.Current.Shutdown(); } }
private void btnThem_Click(object sender, RoutedEventArgs e) { //Mouse.OverrideCursor = Cursors.Wait; try { lstPopup = new List <DataRow>(); var process = new PopupProcess(); List <string> lstDieuKien = new List <string>(); //lstDieuKien.Add("'" + txtMaDonVi.Text + "'"); lstDieuKien.Add("'" + lstSourceDonVi.ElementAt(cmbDonVi.SelectedIndex).KeywordStrings.First() + "'"); process.getPopupInformation(DatabaseConstant.DanhSachTruyVan.POPUP_HT_NSD.getValue(), lstDieuKien); SimplePopupResponse simplePopupResponse = ClientInformation.SimplePopup; ucPopup popup = new ucPopup(false, simplePopupResponse, true); popup.DuLieuTraVe = new ucPopup.LayDuLieu(LayDuLieuTuPopup); Window win = new Window(); win.Title = LLanguage.SearchResourceByKey(simplePopupResponse.PopupTitle); win.Content = popup; win.WindowStartupLocation = WindowStartupLocation.CenterScreen; win.ShowDialog(); if (lstPopup != null) { List <string> lstID = (from row in dt.AsEnumerable() select row.Field <string>("ID")).Distinct().ToList(); if (dt.Rows.Count == 0) { dt = new DataTable(); dt.Columns.Add(LLanguage.SearchResourceByKey("U.DungChung.STT"), typeof(string)); dt.Columns.Add("ID", typeof(string)); dt.Columns.Add(LLanguage.SearchResourceByKey("U.QuanTriHeThong.NhomNSD.ucNSDCT01.Ma"), typeof(string)); dt.Columns.Add(LLanguage.SearchResourceByKey("U.QuanTriHeThong.NhomNSD.ucNSDCT01.Ten"), typeof(string)); } foreach (DataRow row in lstPopup) { if (lstID.Contains(row[1]) != true) { DataRow r = dt.NewRow(); r[0] = dt.Rows.Count + 1; r[1] = row[1]; r[2] = row[2]; r[3] = row[3]; dt.Rows.Add(r); } } grDanhSach.ItemsSource = null; grDanhSach.ItemsSource = dt; loadWidthColumnDoiTuong(); } } catch (System.Exception ex) { CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } //Mouse.OverrideCursor = Cursors.Arrow; }
void tlbDetailAdd_Click(object sender, RoutedEventArgs e) { if (txtMaKH.Text.IsNullOrEmptyOrSpace()) { CommonFunction.ThongBaoTrong(lblTDKhachHang.Content.ToString()); return; } lstPopup.Clear(); List <string> lstDieuKien = new List <string>(); if (LObject.IsNullOrEmpty(lstTSDB)) { lstTSDB = new List <DataRow>(); } string lstIDTSDB = ""; foreach (DataRow dr in lstTSDB) { lstIDTSDB += "," + dr["ID"].ToString(); } if (lstIDTSDB.Length > 0) { lstIDTSDB = "(" + lstIDTSDB.Substring(1) + ")"; } else { lstIDTSDB = "(0)"; } lstDieuKien.Add(ClientInformation.MaDonViQuanLy); lstDieuKien.Add(txtMaKH.Text); lstDieuKien.Add(lstIDTSDB); PopupProcess popupProcess = new PopupProcess(); popupProcess.getPopupInformation("POPUP_DS_TSDB_HDTC_TDTD", lstDieuKien); SimplePopupResponse simplePopupResponse = ClientInformation.SimplePopup; ucPopup popup = new ucPopup(false, simplePopupResponse, false); popup.DuLieuTraVe = new ucPopup.LayDuLieu(LayDuLieuTuPopup); Window win = new Window(); win.WindowStartupLocation = WindowStartupLocation.CenterScreen; win.Title = LLanguage.SearchResourceByKey(simplePopupResponse.PopupTitle); win.Content = popup; win.ShowDialog(); if (lstPopup.Count > 0) { foreach (DataRow dr in lstPopup) { lstTSDB.Add(dr); } raddgrDSachTSDB.ItemsSource = null; raddgrDSachTSDB.ItemsSource = lstTSDB; SetGtriTong(lstTSDB); } }
void KhoiTaoComboBox() { List <string> lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.LOAI_GIAY_TO)); string Dislay = LLanguage.SearchResourceByKey("U.DungChung.TatCa"); lstLoaiGiayTo.Add(new AutoCompleteEntry(Dislay, "%", "0")); KhoiTaoGiaTriComboBox(ref lstLoaiGiayTo, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), cmbLoaiGiayTo, lstDieuKien); }
//default constructor public AutoCompleteCheckBox() { this.valueMember = new string[2] { "All", "0" }; this.dislayMember = LLanguage.SearchResourceByKey("U.DungChung.TatCa"); this.checkedMember = true; this.indexLoadNeeded = 0; loadsAllNeeded.Add(true); }
private void tlbDetailAdd_Click(object sender, RoutedEventArgs e) { Cursor = Cursors.Wait; try { string sidKheUoc = ""; if (lstPopup.IsNullOrEmpty()) { foreach (DataRow dr in lstPopup) { sidKheUoc += "," + dr["ID"].ToString(); } } if (sidKheUoc.Length > 0) { sidKheUoc = sidKheUoc.Substring(1); } else { sidKheUoc = "0"; } AutoCompleteEntry auCum = lstSourceCum_Select.ElementAt(cmbCum.SelectedIndex); AutoCompleteEntry auPGD = lstSourcePhongGD_Select.ElementAt(cmbPhongGD.SelectedIndex); List <string> lstDieuKien = new List <string>(); lstDieuKien.Add(sidKheUoc); lstDieuKien.Add(auPGD.KeywordStrings.FirstOrDefault()); lstDieuKien.Add(auCum.KeywordStrings.FirstOrDefault()); lstPopup = new List <DataRow>(); PopupProcess popupProcess = new PopupProcess(); popupProcess.getPopupInformation("POPUP_DS_KHEUOC_BH", lstDieuKien); SimplePopupResponse simplePopupResponse = ClientInformation.SimplePopup; ucPopup popup = new ucPopup(true, simplePopupResponse, true); popup.DuLieuTraVe = new ucPopup.LayDuLieu(LayDuLieuTuPopup); Window win = new Window(); win.Title = LLanguage.SearchResourceByKey(simplePopupResponse.PopupTitle); win.WindowStartupLocation = WindowStartupLocation.CenterScreen; win.Content = popup; win.ShowDialog(); if (lstPopup.Count > 0) { foreach (DataRow drv in lstPopup) { dtKheUoc.Rows.Add(drv); } } raddgrTUngCT.ItemsSource = null; raddgrTUngCT.ItemsSource = dtKheUoc; } catch (Exception ex) { LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error); LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } Cursor = 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(); 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); // 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(); lstSourceMauBaoCao = new List <AutoCompleteEntry>(); if (!(ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()))) { lstSourceMauBaoCao.Add(new AutoCompleteEntry("Báo cáo toàn M7", "M7", "M7")); } lstSourceMauBaoCao.Add(new AutoCompleteEntry("Báo cáo theo Chi nhánh", "CN", "CN")); lstSourceMauBaoCao.Add(new AutoCompleteEntry("Báo cáo theo Phòng giao dịch", "PGD", "PGD")); auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceMauBaoCao, ref cmbMauBaoCao, null); cmbMauBaoCao.SelectedIndex = 0; // 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()); cmbChiNhanh_SelectionChanged(null, null); }
/// <summary> /// Namnt - 20120912 /// Thay đổi ngôn ngữ /// </summary> private void ChangeLanguage() { try { // Tìm đường dẫn tới folder chứa các file language if (string.IsNullOrEmpty(pathFolderLanguages)) { //pathFolderLanguages = LFile.GetPropertyInXml(Environment.CurrentDirectory + "\\config\\config.conf", "LanguagesDir").ToString(); // Truongnx, đổi thông tin load đường dẫn languages pathFolderLanguages = Environment.CurrentDirectory + "\\languages"; } // Thay đổi ngôn ngữ if (!LLanguage.ApplyLanguage(pathFolderLanguages, cboLanguage.SelectedValue.ToString().Substring(0, 2))) { this.Title = "Sign in" + " - " + ClientInformation.ShortName; this.lblTitle.Content = "...Login to mFinance System..."; this.lblLanguage.Content = "Language"; this.lblUsername.Content = "Username"; this.lblPassword.Content = "Password"; this.btnLogin.Content = "Login"; this.btnClear.Content = "Clear"; this.btnCancel.Content = "Close"; LMessageBox.OK = "OK"; LMessageBox.Ignore = "Ignore"; LMessageBox.Cancel = "Cancel"; LMessageBox.No = "No"; LMessageBox.Retry = "Retry"; LMessageBox.Abort = "Abort"; LMessageBox.Yes = "Yes"; LMessageBox.Register(); System.Windows.Window windows = new frmThongBaoLoi("Language key [" + cboLanguage.SelectedValue.ToString().Substring(0, 2) + "] is missing or invalid", null, true); windows.ShowDialog(); } else { this.Title = LLanguage.SearchResourceByKey("U.ZAMainApp.LoginWindow.Title") + " - " + ClientInformation.ShortName; LMessageBox.OK = LLanguage.SearchResourceByKey("U.DungChung.OK"); LMessageBox.Ignore = LLanguage.SearchResourceByKey("U.DungChung.Ignore"); LMessageBox.Cancel = LLanguage.SearchResourceByKey("U.DungChung.Cancel"); LMessageBox.No = LLanguage.SearchResourceByKey("U.DungChung.No"); LMessageBox.Retry = LLanguage.SearchResourceByKey("U.DungChung.Retry"); LMessageBox.Abort = LLanguage.SearchResourceByKey("U.DungChung.Abort"); LMessageBox.Yes = LLanguage.SearchResourceByKey("U.DungChung.Yes"); LMessageBox.Register(); } } catch (Exception ex) { new frmThongBaoLoi("M.ZAMainApp.LoginWindow.LoiDoiNgonNgu", ex).ShowDialog(); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } }
private void tlbDetailAdd_Click(object sender, RoutedEventArgs e) { try { if (cmbLoaiDoiTuong.SelectedIndex == -1) { return; } DOI_TUONG_SDU_TKHOAN_CT objDTuongCT = null; AutoCompleteEntry au = lstSourceDoiTuongLoai.ElementAt(cmbLoaiDoiTuong.SelectedIndex); //Bat popup PopupProcess process = new PopupProcess(); List <string> lstDieuKien = new List <string>(); lstDieuKien.Add(Presentation.Process.Common.ClientInformation.MaDonVi); lstDieuKien.Add(au.KeywordStrings.FirstOrDefault()); process.getPopupInformation(DatabaseConstant.DanhSachTruyVan.POPUP_DS_DOI_TUONG.getValue(), lstDieuKien); SimplePopupResponse simplePopupResponse = Presentation.Process.Common.ClientInformation.SimplePopup; lstPopup.Clear(); ucPopup popup = new ucPopup(false, simplePopupResponse, true); popup.DuLieuTraVe = new ucPopup.LayDuLieu(LayDuLieuTuPopup); Window win = new Window(); win.Title = LLanguage.SearchResourceByKey("U.KeToan.DoiTuong.ucDoiTuongSoDuCT.DanhSachDoiTuong"); win.WindowStartupLocation = WindowStartupLocation.CenterScreen; win.Content = popup; win.ShowDialog(); if (lstPopup != null && lstPopup.Count > 0) { foreach (DataRow dr in lstPopup) { if (!lstDTuongCT.Select(f => f.MA_DTUONG).Contains(dr[2].ToString())) { objDTuongCT = new DOI_TUONG_SDU_TKHOAN_CT(); objDTuongCT.MA_DTUONG = dr[2].ToString(); objDTuongCT.TEN_TAI_KHOAN = dr[3].ToString(); objDTuongCT.MA_LSDU = MA_LSDU; objDTuongCT.NGAY_DL = ClientInformation.NgayLamViecHienTai; objDTuongCT.NGAY_GDICH = ClientInformation.NgayLamViecHienTai; objDTuongCT.NGAY_HLUC = ClientInformation.NgayLamViecHienTai; objDTuongCT.SODU = 0; objDTuongCT.ID_DTUONG = Convert.ToInt32(dr[1].ToString()); lstDTuongCT.Add(objDTuongCT); } } raddgrTUngCT.ItemsSource = lstDTuongCT; raddgrTUngCT.Rebind(); } } catch (Exception ex) { CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), 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(); 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.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.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.BCAO_TDUNG_SAP_XEP.getValue()); // khởi tạo combobox auto = new AutoComboBox(); auto.GenAutoComboBox(ref lstSourceSapXep, ref cmbSapXepTheo, 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> /// Sự kiện tìm kiếm nhanh /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtTimKiemNhanh_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter || e.Key == Key.Tab) { if (txtTimKiemNhanh.Text == LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh")) { return; } PresentationWPF.CustomControl.CommonFunction.QuickSearchInGrid(grNhom, txtTimKiemNhanh.Text); } }
private void txtQuickSearch_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (txtQuickSearch.Text == LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh")) { return; } PresentationWPF.CustomControl.CommonFunction.QuickSearchInGrid(grvKheUoc, txtQuickSearch.Text); loadWidthColumn(); } }
public override void OnApplyTemplate() { base.OnApplyTemplate(); Button closeButton = base.GetTemplateChild("PART_Close") as Button; closeButton.ToolTip = LLanguage.SearchResourceByKey("U.DungChung.Button.Dong"); if (closeButton != null) { closeButton.Click += new System.Windows.RoutedEventHandler(closeButton_Click); } }
private void ResetThongTinKhachHang() { idKhachHang = 0; txtMaKhachHang.Text = ""; lblTenKH.Content = LLanguage.SearchResourceByKey("U.BaoCao._BTV.HDVO.HDVO_SO_PHU_TIEN_GUI.TenKH"); txtDiaChi.Text = ""; txtCMND.Text = ""; raddtNgayCap.Value = null; txtNoiCap.Text = ""; txtSDT.Text = ""; grSoTienGuiDS.ItemsSource = null; }
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 + "''"); lstDieuKien.Add("%"); lstDieuKien.Add("1"); lstDieuKien.Add("0"); lstSourceLoaiTSDB = new List <AutoCompleteEntry>(); auto.GenAutoComboBox(ref lstSourceNguonVonChoVay, ref cb, DatabaseConstant.DanhSachTruyVan.COMBOBOX_NGUON_VON.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 txtTimKiemNhanh_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { if (txtTimKiemNhanh.Text == LLanguage.SearchResourceByKey("U.DungChung.TimKiemNhanh")) { return; } Mouse.OverrideCursor = Cursors.Wait; PresentationWPF.CustomControl.CommonFunction.QuickSearchInGrid(grKhachHangDS, txtTimKiemNhanh.Text); 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(); 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(); lstSourceThongKeTheo.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("Thực thu"), new string[2] { "ThuThu", "ThuThu" })); lstSourceThongKeTheo.Insert(1, new AutoCompleteEntry(LLanguage.SearchResourceByKey("Kế hoạch"), new string[2] { "KeHoach", "KeHoach" })); auto.GenAutoComboBox(ref lstSourceThongKeTheo, ref cmbThongKeTheo, null, null); cmbThongKeTheo.SelectedIndex = 0; // 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.EXCEL.layGiaTri()); cmbDinhDang.IsEnabled = false; }
private void BuildTree(RadTreeViewItem treeview) { RadTreeViewItem treeviewChild = null; foreach (Presentation.Process.ZAMainAppServiceRef.ChucNangDto chucnang in ClientInformation.ListChucNang.Where(f => f.IDChucNangCha.Equals(treeview.Tag))) { treeviewChild = new RadTreeViewItem(); treeviewChild.Tag = chucnang.IDChucNang; treeviewChild.Header = LLanguage.SearchResourceByKey(chucnang.TieuDe); treeviewChild.Uid = chucnang.MenuHelp; treeview.Items.Add(treeviewChild); BuildTree(treeviewChild); } }
private void KhoiTaoComboBox() { // 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>(); //LoadCombobox(); ??? // Nếu người dùng là đơn vị >> disable thông tin chi nhánh if (ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri()) || ClientInformation.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri())) { cmbChiNhanh.IsEnabled = false; } else { cmbChiNhanh.IsEnabled = true; } // khởi tạo combobox lstSourceChiNhanh.Insert(0, new AutoCompleteEntry(LLanguage.SearchResourceByKey("U.DungChung.TatCa"), new string[2] { "%", "0" })); 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()); auto.GenAutoComboBox(ref lstSourceCum, ref cmbCum, DatabaseConstant.DanhSachTruyVan.COMBOBOX_CUM_ALL.getValue()); LoadComboboxPhongGD(); 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 BuildGridNotTree() { DataTable grdData = new DataTable(); foreach (DataColumn col in dtDetail.Columns) { Type type = typeof(string); if (col.DataType == typeof(decimal)) { type = typeof(decimal); } else if (col.DataType == typeof(int)) { type = typeof(int); } else if (col.DataType == typeof(float)) { type = typeof(float); } grdData.Columns.Add(col.ColumnName, type); } int stt = 0; foreach (DataRow row in dtDetail.Rows) { stt = stt + 1; row[0] = stt.ToString(); grdData.ImportRow(row); } // Xử lý ngôn ngữ foreach (DataColumn dc in grdData.Columns) { if (dc.DataType == typeof(string)) { foreach (DataRow dr in grdData.Rows) { if (dr[dc.ColumnName] != DBNull.Value) { dr[dc.ColumnName] = LLanguage.SearchResourceByKey(dr[dc.ColumnName].ToString()); } } } } raddgrDanhSach.ItemsSource = grdData.DefaultView; lblTongSoBanGhi.Content = grdData.Rows.Count; gbLoc.Visibility = Visibility.Collapsed; }