private bool CheckValidate() { if (string.IsNullOrEmpty(txtOldPassword.Text)) { depError.SetError(txtOldPassword, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtOldPassword.Focus(); return(false); } if (string.IsNullOrEmpty(txtNewPassword.Text)) { depError.SetError(txtNewPassword, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtNewPassword.Focus(); return(false); } if (string.IsNullOrEmpty(txtConfirmPassword.Text)) { depError.SetError(txtConfirmPassword, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtConfirmPassword.Focus(); return(false); } if (!txtNewPassword.Text.Equals(txtConfirmPassword.Text)) { depError.SetError(txtConfirmPassword, LanguageEngine.GetMessageCaption("000014", ConfigEngine.Language)); txtConfirmPassword.Focus(); return(false); } if (!EncryptEngine.Encrypt(txtOldPassword.Text).Equals(CommonEngine.userInfo.Password)) { depError.SetError(txtOldPassword, LanguageEngine.GetMessageCaption("000015", ConfigEngine.Language)); txtOldPassword.Focus(); return(false); } return(true); }
private void Initialize() { LanguageEngine.ChangeCaptionLayoutControlGroup(this.Name, ConfigEngine.Language, logDetail); LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciLevel1Code, lciLevel1ShortCode, lciVNName, lciENName, lciRank, lciNote, lciDescription }); LanguageEngine.ChangeCaptionCheckEdit(this.Name, ConfigEngine.Language, chkUsed); LanguageEngine.ChangeCaptionSimpleButton(this.Name, ConfigEngine.Language, new SimpleButton[] { btnSaveClose, btnSaveInsert, btnCancel }); }
private bool CheckValidate() { if (string.IsNullOrEmpty(txtProvinceCode.Text)) { depError.SetError(txtProvinceCode, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtProvinceCode.Focus(); return(false); } if (txtProvinceCode.Text.Contains(" ")) { depError.SetError(txtProvinceCode, LanguageEngine.GetMessageCaption("000004", ConfigEngine.Language)); txtProvinceCode.Focus(); return(false); } if (CommonEngine.CheckExistsUnicodeChar(txtProvinceCode.Text)) { depError.SetError(txtProvinceCode, LanguageEngine.GetMessageCaption("000021", ConfigEngine.Language)); txtProvinceCode.Focus(); return(false); } if (string.IsNullOrEmpty(txtVNName.Text.Trim())) { depError.SetError(txtVNName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtVNName.Focus(); return(false); } if (string.IsNullOrEmpty(txtENName.Text.Trim())) { depError.SetError(txtENName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtENName.Focus(); return(false); } return(true); }
private List <string> XuLy(string listitem, DatabaseConstant.Action action, string alert) { List <string> listResult = new List <string>(); List <ClientResponseDetail> lstResponse = new List <ClientResponseDetail>(); if (listitem != "") { List <KT_PLOAI> lstKtPloai = new List <KT_PLOAI>(); string[] str = listitem.Split(';'); if (str != null && str.Length > 0) { for (int k = 0; k < str.Length; k++) { KT_PLOAI obj = new KT_PLOAI(); obj.ID = Convert.ToInt32(str[k]); lstKtPloai.Add(obj); } } bool bResult = new KeToanProcess().XuLyPhanLoaiTaiKhoanDS(lstKtPloai.ToArray(), ref lstResponse, action); if (bResult) { foreach (ClientResponseDetail cl in lstResponse) { listResult.Add(LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Result) + "#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Detail.Split('#')[0])); } } else { listResult.Add(alert + "#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, "M.DungChung.DuyetKhongThanhCong")); } } return(listResult); }
private string GetParent(int pv_iMenuID) { string v_strContent = ""; DataTable v_dt = AppConfig.LoginedUser.CayMenu; DataView v_dv = v_dt.DefaultView; v_dv.RowFilter = "ID=" + pv_iMenuID.ToString(); if (v_dv.Count > 0) { v_strContent += "<span class=\"divider\">></span>"; if (DBNull.Value != v_dv[0]["URL_ICON"]) { v_strContent += "<span class=\"" + v_dv[0]["URL_ICON"].ToString() + "\"></span>"; } if (DBNull.Value != v_dv[0]["URL"]) { v_strContent += "<a href=\"" + v_dv[0]["URL"].ToString().Replace("~", "") + "\">" + LanguageEngine.Instance().GetContent(LanguageType.TypeUI, v_dv[0]["TIEU_DE"].ToString()) + "</a>"; } else { v_strContent += "<span class=\"text bold white\" >" + LanguageEngine.Instance().GetContent(LanguageType.TypeUI, v_dv[0]["TIEU_DE"].ToString()) + "</span>"; } //Build cha if (DBNull.Value != v_dv[0]["ID_CNANG_CHA"]) { int v_iMenucha = Convert.ToInt32(v_dv[0]["ID_CNANG_CHA"]); v_dv.RowFilter = ""; v_strContent = GetParent(v_iMenucha) + v_strContent; } } return(v_strContent); }
public void ChangeLanguage(string language) { LanguageEngine.ChangeCaptionBarLargeButtonItem(this.Name, language, new DevExpress.XtraBars.BarLargeButtonItem[] { btnInsert, btnDuplicated, btnUpdate, btnDelete, btnPrint, btnReload, btnImport, btnExport, btnClose }); LanguageEngine.ChangeCaptionBarStaticItem(this.Name, language, new DevExpress.XtraBars.BarStaticItem[] { lblCreater, lblCreateTime, lblEditer, lblEditTime }); LanguageEngine.ChangeCaptionGroupPanelTextGridView(this.Name, language, grvUser); LanguageEngine.ChangeCaptionGridColumn(this.Name, language, new DevExpress.XtraGrid.Columns.GridColumn[] { gcolUsername, gcolGroupName, gcolFullName, gcolEmpCode, gcolEffectiveDate, gcolEmail, gcolNote }); }
private List <string> XuLy(string listitem, DatabaseConstant.Action action, string alert) { List <string> listResult = new List <string>(); List <ClientResponseDetail> lstResponse = new List <ClientResponseDetail>(); if (listitem != "") { List <KT_TKHOAN> lstKtTkhoan = new List <KT_TKHOAN>(); string[] str = listitem.Split(';'); if (str != null && str.Length > 0) { for (int k = 0; k < str.Length; k++) { KT_TKHOAN obj = new KT_TKHOAN(); obj.ID = Convert.ToInt32(str[k]); lstKtTkhoan.Add(obj); } } ApplicationConstant.ResponseStatus bResult = new KeToanProcess().TaiKhoanChiTietDS(action, lstKtTkhoan, ref lstResponse); if (bResult == ApplicationConstant.ResponseStatus.THANH_CONG) { foreach (ClientResponseDetail cl in lstResponse) { listResult.Add(LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Result) + "#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Detail.Split('#')[0])); } } else { listResult.Add(alert + "#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, "M.DungChung.DuyetKhongThanhCong")); } } return(listResult); }
void KhoiTaoControl() { try { string Dislay = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DungChung.TatCa"); teldtSoDuNgay.Text = ""; List <string> lstDieuKien = new List <string>(); string maTruyVan = DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(); AutoComboBox auto = new AutoComboBox(); lstDieuKien.Add(AppConfig.LoginedUser.UserName); lstDieuKien.Add(AppConfig.LoginedUser.MaDonVi); lstDieuKien.Add(DatabaseConstant.ToChucDonVi.PGD.getValue()); auto.GenAutoComboBox(ref lstSourceDonVi, ref cmbDonVi, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DONVI_THEOPVI.getValue(), lstDieuKien, AppConfig.LoginedUser.MaDonViGiaoDich); if (AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()) || AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri())) { cmbDonVi.Enabled = false; } } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
private void BuildTree() { tvwLoaiVay.Nodes.Clear(); List <string> lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.DanhMuc.PHUONG_THUC_VAY.getValue()); DropDownList dr = new DropDownList(); new AutoComboBox().GenAutoComboBox(ref lstPhuongThucVay, ref dr, DatabaseConstant.DanhSachTruyVan.COMBOBOX_DMUC.getValue(), lstDieuKien); try { TreeNode item = new TreeNode(); item.Checked = true; item.Text = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DMUC_LOAI.PHUONG_THUC_VAY"); item.Value = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DMUC_LOAI.PHUONG_THUC_VAY"); tvwLoaiVay.Nodes.Add(item); for (int i = 0; i < lstPhuongThucVay.Count; i++) { TreeNode ItemSub = new TreeNode(); ItemSub.Text = lstPhuongThucVay[i].DisplayName; ItemSub.Checked = true; ItemSub.Value = lstPhuongThucVay[i].KeywordStrings[0]; tvwLoaiVay.Nodes[0].ChildNodes.Add(ItemSub); } } catch { } tvwLoaiVay.ExpandAll(); tvwLoaiVay.ShowCheckBoxes = TreeNodeTypes.All; }
private void LoadDataToEdit(SYS_tblUserDTO item) { txtUsername.EditValue = (item == null) ? null : item.Username; txtUsername.Properties.ReadOnly = (item == null || isDuplicate) ? false : true; txtPassword.EditValue = (item == null) ? null : iPOS.Core.Security.EncryptEngine.Decrypt(item.Password); //gluGroupUser.EditValue = "1";// (item == null) ? null : item.GroupID; chkIsEmployee.Checked = (item == null) ? false : (!string.IsNullOrEmpty(item.EmpID)) ? true : false; txtFullName.EditValue = (item == null) ? null : item.FullName; gluEmployee.EditValue = (item == null) ? null : item.EmpID; dteEffectiveDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.EffectiveDate; dteToDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.ToDate; chkLocked.Checked = (item == null) ? false : item.Locked; dteLockDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.LockDate; dteUnlockDate.EditValue = (item == null) ? CommonEngine.SystemDateTime : item.UnlockDate; chkCanNotChangePassword.Checked = (item == null) ? false : item.CanNotChangePassword; chkChangePassNextTime.Checked = (item == null) ? false : item.ChangePassNextTime; chkPasswordNeverExpired.Checked = (item == null) ? true : item.PassNeverExpired; txtEmail.EditValue = item == null ? null : item.Email; mmoNote.EditValue = item == null ? null : item.Note; if (item == null) { depError.ClearErrors(); this.ParentForm.Text = LanguageEngine.GetOpenFormText(this.Name, ConfigEngine.Language, false); txtUsername.Focus(); } }
void KhoiTaoControl() { try { string Dislay = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DungChung.TatCa"); teldtNgayADungDen.Text = ""; teldtNgayADungTu.Text = ""; teldtNgayHetHanDen.Text = ""; teldtNgayHetHanTu.Text = ""; 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, AppConfig.LoginedUser.MaDonVi); if (AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()) || AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri())) { cmbDonVi.Enabled = false; } } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }
public void ChangeLanguage(string language) { LanguageEngine.ChangeCaptionBarLargeButtonItem(this.Name, language, new DevExpress.XtraBars.BarLargeButtonItem[] { btnInsert, btnDuplicated, btnUpdate, btnDelete, btnPrint, btnReload, btnImport, btnExport, btnClose }); LanguageEngine.ChangeCaptionBarStaticItem(this.Name, language, new DevExpress.XtraBars.BarStaticItem[] { lblCreater, lblCreateTime, lblEditer, lblEditTime }); LanguageEngine.ChangeCaptionGroupPanelTextGridView(this.Name, language, grvProvince); LanguageEngine.ChangeCaptionGridColumn(this.Name, language, new DevExpress.XtraGrid.Columns.GridColumn[] { gcolProvinceCode, gcolProvinceName, gcolRank, gcolActiveString, gcolNote }); }
private void Initialize() { LanguageEngine.ChangeCaptionLabelControl(this.Name, ConfigEngine.Language, lblNote); LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciUsername, lciGroupName, lciOldPassword, lciNewPassword, lciConfirmPassword }); LanguageEngine.ChangeCaptionSimpleButton(this.Name, ConfigEngine.Language, new SimpleButton[] { btnSave, btnCancel }); txtUsername.Text = CommonEngine.userInfo.UserID; txtGroupName.Text = CommonEngine.userInfo.GroupName; }
private void Initialize() { LanguageEngine.ChangeCaptionLayoutControlGroup(this.Name, ConfigEngine.Language, logDetail); LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciStallCode, lciVNName, lciENName, lciStore, lciWarehouse, lciRank, lciNote }); LanguageEngine.ChangeCaptionGridLookUpEdit(this.Name, ConfigEngine.Language, new GridLookUpEdit[] { gluStore, gluWarehouse }); LanguageEngine.ChangeCaptionCheckEdit(this.Name, ConfigEngine.Language, chkUsed); LanguageEngine.ChangeCaptionSimpleButton(this.Name, ConfigEngine.Language, new SimpleButton[] { btnSaveClose, btnSaveInsert, btnCancel }); LoadStore(); }
private void Initialize() { LanguageEngine.ChangeCaptionLayoutControlGroup(this.Name, ConfigEngine.Language, logDetail); LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciStoreCode, lciShortCode, lciVNName, lciENName, lciBuildDate, lciEndDate, lciAddressVN, lciAddressEN, lciProvince, lciDistrict, lciPhone, lciFax, lciTaxCode, lciRank, lciRepresentives, lciNote }); LanguageEngine.ChangeCaptionCheckEdit(this.Name, ConfigEngine.Language, new CheckEdit[] { chkIsRoot, chkUsed }); LanguageEngine.ChangeCaptionGridLookUpEdit(this.Name, ConfigEngine.Language, new GridLookUpEdit[] { gluProvince, gluDistrict }); LanguageEngine.ChangeCaptionPictureEdit(this.Name, ConfigEngine.Language, picPhoto); LoadProvince(); }
private async void Initialize() { LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciDistrictCode, lciVNName, lciENName, lciProvince, lciNote, lciRank }); LanguageEngine.ChangeCaptionLayoutControlGroup(this.Name, ConfigEngine.Language, logDetail); LanguageEngine.ChangeCaptionCheckEdit(this.Name, ConfigEngine.Language, chkUsed); LanguageEngine.ChangeCaptionSimpleButton(this.Name, ConfigEngine.Language, new SimpleButton[] { btnSaveClose, btnSaveInsert, btnCancel }); LanguageEngine.ChangeCaptionGridLookUpEdit(this.Name, ConfigEngine.Language, gluProvince); await LoadProvince(); }
private async void Initialize(SYS_tblUserDTO item) { LanguageEngine.ChangeCaptionLayoutControlGroup(this.Name, ConfigEngine.Language, logDetail); LanguageEngine.ChangeCaptionLayoutControlItem(this.Name, ConfigEngine.Language, new DevExpress.XtraLayout.LayoutControlItem[] { lciUsername, lciPassword, lciGroupUser, lciFullName, lciEffectiveDate, lciToDate, lciLockDate, lciUnlockDate, lciEmail, lciNote }); LanguageEngine.ChangeCaptionSimpleButton(this.Name, ConfigEngine.Language, new SimpleButton[] { btnSaveClose, btnSaveInsert, btnCancel }); LanguageEngine.ChangeCaptionCheckEdit(this.Name, ConfigEngine.Language, new CheckEdit[] { chkIsEmployee, chkLocked, chkCanNotChangePassword, chkChangePassNextTime, chkPasswordNeverExpired }); LanguageEngine.ChangeCaptionGridLookUpEdit(this.Name, ConfigEngine.Language, gluGroupUser); await LoadGroupUser(item); dteEffectiveDate.EditValue = CommonEngine.SystemDateTime; }
private bool CheckValidate() { if (string.IsNullOrEmpty(txtLevel3Code.Text.Trim())) { depError.SetError(txtLevel3Code, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtLevel3Code.Focus(); return(false); } else if (txtLevel3Code.Text.Contains(" ")) { depError.SetError(txtLevel3Code, LanguageEngine.GetMessageCaption("000004", ConfigEngine.Language)); txtLevel3Code.Focus(); return(false); } else if (CommonEngine.CheckExistsUnicodeChar(txtLevel3Code.Text.Trim())) { depError.SetError(txtLevel3Code, LanguageEngine.GetMessageCaption("000021", ConfigEngine.Language)); txtLevel3Code.Focus(); return(false); } else if (string.IsNullOrEmpty(txtLevel3ShortCode.Text.Trim())) { depError.SetError(txtLevel3ShortCode, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtLevel3ShortCode.Focus(); return(false); } else if (string.IsNullOrEmpty(txtVNName.Text.Trim())) { depError.SetError(txtVNName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtVNName.Focus(); return(false); } else if (string.IsNullOrEmpty(txtENName.Text.Trim())) { depError.SetError(txtENName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtENName.Focus(); return(false); } else if (string.IsNullOrEmpty(gluLevel1.EditValue + "") || gluLevel1.EditValue.Equals("0")) { depError.SetError(gluLevel1, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); gluLevel1.Focus(); return(false); } else if (string.IsNullOrEmpty(gluLevel2.EditValue + "") || gluLevel2.EditValue.Equals("0")) { depError.SetError(gluLevel2, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); gluLevel1.Focus(); return(false); } return(true); }
private void gluStore_EditValueChanged(object sender, EventArgs e) { if (gluStore.EditValue == null || gluStore.EditValue.Equals("0")) { depError.SetError(gluStore, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); } else { LoadWarehouseByStoreID(gluStore.EditValue + ""); depError.SetError(gluStore, null); } }
private void SetFormData() { string SO_GIAO_DICH = MA_GIAO_DICH.Value; try { HuyDongVonProcess processHDV = new HuyDongVonProcess(); DataSet ds = processHDV.GetThongTinGuiThemTheoDS(AppConfig.LoginedUser.MaDonViGiaoDich, SO_GIAO_DICH); if (ds != null && ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; lblTrangThai.Text = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, BusinessConstant.layMaNgonNguNghiepVu(dr["TTHAI_NVU"].ToString())); raddtNgay.Text = LDateTime.StringToDate(dr["NGAY_DL"].ToString(), "yyyyMMdd").ToString("dd/MM/yyyy"); txtMaGiaoDich.Text = SO_GIAO_DICH; txtNguoiGiaoDich.Text = dr["TEN_KHANG"].ToString(); txtDiaChi.Text = dr["DIA_CHI"].ToString(); txtDienGiai.Text = dr["DIEN_GIAI"].ToString(); TRANG_THAI_BAN_GHI.Value = dr["TTHAI_BGHI"].ToString(); TRANG_THAI_NGHIEP_VU.Value = dr["TTHAI_NVU"].ToString(); #region Tab thông tin kiểm soát txtTrangThai.Text = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, BusinessConstant.layMaNgonNguSuDung(dr["TTHAI_BGHI"].ToString())); teldtNgayNhap.Text = LDateTime.StringToDate(dr["NGAY_NHAP"].ToString(), "yyyyMMdd").ToString("dd/MM/yyyy"); txtNguoiLap.Text = dr["NGUOI_NHAP"].ToString(); if (LDateTime.IsDate(dr["NGAY_CNHAT"].ToString(), "yyyyMMdd") == true) { teldtNgayCNhat.Text = LDateTime.StringToDate(dr["NGAY_CNHAT"].ToString(), "yyyyMMdd").ToString("dd/MM/yyyy"); } else { teldtNgayCNhat.Text = ""; } txtNguoiCapNhat.Text = dr["NGUOI_CNHAT"].ToString(); #endregion } dsGuiThem = processHDV.GetThongTinGuiThemTheoDSCTiet(AppConfig.LoginedUser.MaDonViGiaoDich, SO_GIAO_DICH); if (dsGuiThem != null) { //DataViewManager dataViewManager = new DataViewManager(dsGuiThem); // DataView dataView = dataViewManager.CreateDataView(dsGuiThem.Tables[0]); grGuiThemDS.DataSource = dsGuiThem; grGuiThemDS.DataBind(); } TinhTong(); } catch (Exception ex) { } }
public void GenAutoSoure(ref List <AutoCompleteEntry> lstSource, string maTruyVan, List <string> lstDieuKien = null, string maChon = "Default", List <string> lstMaKhoangChon = null) { Func <AutoCompleteEntry, bool> predicate = null; Func <AutoCompleteEntry, bool> func2 = null; try { if (!string.IsNullOrEmpty(maTruyVan)) { TruyVanProcess process = new TruyVanProcess(); DataSet dataSetSource = new DataSet(); dataSetSource = process.getDanhSachInformation(maTruyVan, lstDieuKien).DataSetSource; foreach (DataRow row in dataSetSource.Tables[0].Rows) { if (row.Table.Columns.Count > 3) { List <string> list = new List <string> { row[1].ToString(), row[0].ToString() }; for (int i = 3; i < dataSetSource.Tables[0].Columns.Count; i++) { list.Add(row[i].ToString()); } lstSource.Add(new AutoCompleteEntry(LanguageEngine.Instance().GetContent(0, row[2].ToString()), list.ToArray())); } else { string content = LanguageEngine.Instance().GetContent(0, row[2].ToString()); if (content == "") { content = LanguageEngine.Instance().GetContent(0, row[1].ToString()); } lstSource.Add(new AutoCompleteEntry(content, new string[] { row[1].ToString(), row[0].ToString() })); } } } if (lstMaKhoangChon != null) { if (predicate == null) { predicate = e => lstMaKhoangChon.Contains(e.KeywordStrings.First <string>()); } lstSource = lstSource.Where <AutoCompleteEntry>(predicate).ToList <AutoCompleteEntry>(); } } catch (Exception exception) { LLogging.WriteLog("", LLogging.LogType.ERR, exception); } }
private List <string> Tuchoi(string listitem) { List <string> listResult = new List <string>(); if (listitem != "") { List <int> lstID = new List <int>(); string[] str = listitem.Split(';'); if (str != null && str.Length > 0) { for (int k = 0; k < str.Length; k++) { lstID.Add(Convert.ToInt32(str[k])); } } List <ClientResponseDetail> ResponseDetail = new List <ClientResponseDetail>(); UtilitiesProcess process = new UtilitiesProcess(); if (process.LockData(DatabaseConstant.Module.TDVM, DatabaseConstant.Function.TDVM_SAN_PHAM_TDVM, DatabaseConstant.Table.TD_SAN_PHAM, DatabaseConstant.Action.TU_CHOI_DUYET, lstID)) { bool bResult = new TinDungProcess().TuChoiSanPhamTinDung(lstID, ref ResponseDetail); if (bResult) { foreach (ClientResponseDetail cl in ResponseDetail) { listResult.Add(LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Result) + "#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, cl.Detail.Split('#')[0])); } // Yeu cau Unlook du lieu process.UnlockData(DatabaseConstant.Module.TDVM, DatabaseConstant.Function.TDVM_SAN_PHAM_TDVM, DatabaseConstant.Table.TD_SAN_PHAM, DatabaseConstant.Action.TU_CHOI_DUYET, lstID); LoadDuLieu(); } else { listResult.Add("M.DungChung.DuyetKhongThanhCong#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, "M.DungChung.DuyetKhongThanhCong")); } } else { listResult.Add("M.ResponseMessage.Common.LockDataInvalid#" + LanguageEngine.Instance().GetContent(LanguageType.TypeMessage, "M.ResponseMessage.Common.LockDataInvalid")); } } return(listResult); }
private void txtOldPassword_EditValueChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtOldPassword.Text)) { depError.SetError(txtOldPassword, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); } else if (!EncryptEngine.Encrypt(txtOldPassword.Text).Equals(CommonEngine.userInfo.Password)) { depError.SetError(txtOldPassword, LanguageEngine.GetMessageCaption("000015", ConfigEngine.Language)); } else { depError.SetError(txtOldPassword, null); } }
private void txtPassword_EditValueChanged(object sender, EventArgs e) { if (txtPassword.Text.Contains(" ")) { depError.SetError(txtPassword, LanguageEngine.GetMessageCaption("000004", ConfigEngine.Language)); } else if (string.IsNullOrEmpty(txtPassword.Text)) { depError.SetError(txtPassword, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); } else { depError.SetError(txtPassword, null); } }
protected void Page_Load(object sender, EventArgs e) { grbThongtinsotiengui.GroupingText = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.HuyDongVon.GiaoDichGuiThem.ucGuiThemTienGuiCT.ThongTinSoTGui"); grbThongtinKhachang.GroupingText = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.HuyDongVon.GiaoDichGuiThem.ucGuiThemTienGuiCT.ThongTinKH"); tbiKiemSoat.GroupingText = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DungChung.Tab.ThongTinKiemSoat_2"); pnThongtinGiaodich.GroupingText = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.HuyDongVon.GiaoDichGuiThem.ucGuiThemTienGuiCT.ThongTinGD"); cmbGD_HinhThuc.Attributes.Add("onchange", "changehtgd()"); inpTrangThai.Value = CommonFuntion.LayTrangThaiBanGhi(DatabaseConstant.Action.LUU, BusinessConstant.layTrangThaiNghiepVu(sTrangThaiNVu)); if (!IsPostBack) { inpAction.Value = "THEM"; LoadCombobox(); ResetForm(); } }
private bool CheckValidate() { if (string.IsNullOrEmpty(txtStallCode.Text.Trim())) { depError.SetError(txtStallCode, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtStallCode.Focus(); return(false); } if (txtStallCode.Text.Contains(" ")) { depError.SetError(txtStallCode, LanguageEngine.GetMessageCaption("000004", ConfigEngine.Language)); txtStallCode.Focus(); return(false); } if (CommonEngine.CheckExistsUnicodeChar(txtStallCode.Text)) { depError.SetError(txtStallCode, LanguageEngine.GetMessageCaption("000021", ConfigEngine.Language)); txtStallCode.Focus(); return(false); } if (string.IsNullOrEmpty(txtVNName.Text.Trim())) { depError.SetError(txtVNName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtVNName.Focus(); return(false); } if (string.IsNullOrEmpty(txtENName.Text.Trim())) { depError.SetError(txtENName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtENName.Focus(); return(false); } if (gluStore.EditValue == null || gluStore.EditValue.Equals("0")) { depError.SetError(gluStore, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); gluStore.Focus(); return(false); } if (gluWarehouse.EditValue == null || gluWarehouse.EditValue.Equals("0")) { depError.SetError(gluWarehouse, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); gluWarehouse.Focus(); return(false); } return(true); }
protected void Page_Load(object sender, EventArgs e) { tvSearch.Attributes.Add("onclick", "OnTreeClick(event)"); btnTimkiem.Text = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DungChung.Button.TimKiem"); LoadParams(); if (!IsPostBack) { if (HttpContext.Current.Request.QueryString["f"].ToString() != "" && HttpContext.Current.Request.QueryString["f"].ToString() != "") { fn = HttpContext.Current.Request.QueryString["f"].ToString(); isMultiSelect = bool.Parse(HttpContext.Current.Request.QueryString["m"].ToString()); LoadTreeview(); LoadGrid(0); } } }
// This tests the language engine BestDecision method will return the correct index given // a matching second option when using the KMP Comparison. public void LanguageEngineBestDecisionPassesGivenSecondMatchKMPcomp() { LangE = new GameObject(); LangE.AddComponent <LanguageEngine>(); Leng = LangE.GetComponent <LanguageEngine>(); List <string> treemock = new List <string> { "Hello", "You there", "Let's go there" }; Leng.KMPComparison = true; int expectedbest = Leng.BestDecision("You there", treemock); // Debug.Log(expectedbest); Assert.AreEqual(expectedbest, 1); }
private bool CheckValidate() { if (string.IsNullOrEmpty(txtStoreCode.Text.Trim())) { depError.SetError(txtStoreCode, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtStoreCode.Focus(); return(false); } else if (txtStoreCode.Text.Contains(" ")) { depError.SetError(txtStoreCode, LanguageEngine.GetMessageCaption("000004", ConfigEngine.Language)); txtStoreCode.Focus(); return(false); } else if (CommonEngine.CheckExistsUnicodeChar(txtStoreCode.Text)) { depError.SetError(txtStoreCode, LanguageEngine.GetMessageCaption("000021", ConfigEngine.Language)); txtStoreCode.Focus(); return(false); } else if (string.IsNullOrEmpty(txtShortCode.Text.Trim())) { depError.SetError(txtShortCode, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtShortCode.Focus(); return(false); } else if (string.IsNullOrEmpty(txtVNName.Text.Trim())) { depError.SetError(txtVNName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtVNName.Focus(); return(false); } else if (string.IsNullOrEmpty(txtENName.Text.Trim())) { depError.SetError(txtENName, LanguageEngine.GetMessageCaption("000003", ConfigEngine.Language)); txtENName.Focus(); return(false); } else if (dteEndDate.EditValue != null && !CommonEngine.CompareDateEdit(dteBuildDate, dteEndDate, false)) { depError.SetError(dteEndDate, LanguageEngine.GetMessageCaption("000025", ConfigEngine.Language)); dteEndDate.Focus(); return(false); } return(true); }
void KhoiTaoControl() { try { string Dislay = LanguageEngine.Instance().GetContent(LanguageType.TypeUI, "U.DungChung.TatCa"); txtNgayNhanNoTu.Text = ""; txtNgayNhanNoDen.Text = ""; txtNgayDaoHanTu.Text = ""; txtNgayDaoHanDen.Text = ""; 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("''" + AppConfig.LoginedUser.MaDonVi + "''"); lstDieuKien.Add("%"); lstDieuKien.Add("0"); lstDieuKien.Add("0"); //lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.LOAI_SAN_PHAM_TDUNG)); lstSanPham.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstSanPham, ref cmbSanPham, "COMBOBOX_SAN_PHAM_TD", lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.NHOM_NO)); lstNhomNo.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstNhomNo, ref cmbNhomNo, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.DVI_TINH_KY_HAN)); lstThoiHanVayTu.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstThoiHanVayTu, ref cmbThoiHanVayTu, maTruyVan, lstDieuKien); lstDieuKien = new List <string>(); lstDieuKien.Add(DatabaseConstant.getValue(DatabaseConstant.DanhMuc.DVI_TINH_KY_HAN)); lstThoiHanVayDen.Add(new AutoCompleteEntry(Dislay, "%", "%")); KhoiTaoGiaTriComboBox(ref lstThoiHanVayDen, ref cmbThoiHanVayDen, maTruyVan, lstDieuKien); //if (AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_NVDV.layGiaTri()) || AppConfig.LoginedUser.LoaiNguoiSuDung.Equals(BusinessConstant.LoaiNguoiSuDung.CAP_QTDV.layGiaTri())) // cmbDonVi.Enabled = false; } catch (Exception ex) { LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } }