/// <summary> /// Tìm kiếm nâng cao /// </summary> private void TimKiem() { Mouse.OverrideCursor = Cursors.Wait; List <ClientResponseDetail> lstResponse = new List <ClientResponseDetail>(); KeToanProcess process = new KeToanProcess(); try { TKTONGHOP objHeThong = new TKTONGHOP(); objHeThong.HTTKTHCT = new TKTONGHOP_CTIET(); if (cmbDonVi.SelectedIndex < 0) { return; } AutoCompleteEntry au = lstSourceDonVi.ElementAt(cmbDonVi.SelectedIndex); objHeThong.HTTKTHCT.MA_HT_TKTH = au.KeywordStrings.FirstOrDefault(); if (process.TaiKhoanTongHop(DatabaseConstant.Action.LOAD, ref objHeThong, ref lstResponse) == ApplicationConstant.ResponseStatus.THANH_CONG) { dtMaPhanLoai = objHeThong; TaoTreeView(); } } catch (System.Exception ex) { LMessage.ShowMessage("M.DungChung.LoiLoadDuLieu", LMessage.MessageBoxType.Error); LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex); } finally { process = null; } Mouse.OverrideCursor = Cursors.Arrow; }
/// <summary> /// Xử lý xóa dữ liệu /// </summary> private void Xoa() { try { KeToanProcess process = new KeToanProcess(); List <int> lstKtTkhoan = new List <int>(); List <ClientResponseDetail> lstResponse = new List <ClientResponseDetail>(); Mouse.OverrideCursor = Cursors.Wait; try { foreach (TKTONGHOP_CTIET dr in raddgrDanhSachTK.SelectedItems) { lstKtTkhoan.Add(dr.ID); } if (lstKtTkhoan.Count == 0) { LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning); return; } MessageBoxResult messResult = LMessage.ShowMessage("M.DungChung.HoiXoa", LMessage.MessageBoxType.Question); if (messResult == MessageBoxResult.Yes) { TKTONGHOP objHeThong = new TKTONGHOP(); objHeThong.DSACHID = lstKtTkhoan.ToArray(); ApplicationConstant.ResponseStatus ret = process.TaiKhoanTongHop(DatabaseConstant.Action.XOA, ref objHeThong, ref lstResponse); CommonFunction.ThongBaoKetQua(lstResponse); TimKiem(); } } catch (System.Exception ex) { this.Cursor = Cursors.Arrow; CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } Mouse.OverrideCursor = Cursors.Arrow; } catch (System.Exception ex) { CommonFunction.ThongBaoLoi(ex); LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex); } }