/// <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
            {
                HE_THONG_TKTH objHeThong = new HE_THONG_TKTH();
                if (process.HeThongTaiKhoanChiTiet(DatabaseConstant.Action.LOAD, ref objHeThong, ref lstResponse) == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    raddgrDanhSachTK.ItemsSource = objHeThong.DSACHHTTLTHCT;
                    raddgrDanhSachTK.Rebind();
                }
            }
            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;
        }
        private void onLoad()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            KeToanProcess process = new KeToanProcess();

            try
            {
                List <ClientResponseDetail>        listClientResponseDetail = new List <ClientResponseDetail>();
                ApplicationConstant.ResponseStatus ret = ApplicationConstant.ResponseStatus.KHONG_THANH_CONG;
                objHeThong             = new HE_THONG_TKTH();
                objHeThong.HTTKTHCT    = new HT_TKTH_CTIET();
                objHeThong.HTTKTHCT.ID = id;
                if (process.HeThongTaiKhoanChiTiet(DatabaseConstant.Action.LOAD_DATA, ref objHeThong, ref listClientResponseDetail) == ApplicationConstant.ResponseStatus.THANH_CONG)
                {
                    LoadDuLieu();
                }
                else
                {
                    CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                }
            }
            catch (System.Exception ex)
            {
                CommonFunction.ThongBaoLoi(ex);
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
                process = null;
            }
        }
        /// <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 (HT_TKTH_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)
                    {
                        HE_THONG_TKTH objHeThong = new HE_THONG_TKTH();
                        objHeThong.DSACHID = lstKtTkhoan.ToArray();
                        ApplicationConstant.ResponseStatus ret = process.HeThongTaiKhoanChiTiet(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);
            }
        }
        private void onSave()
        {
            string trangThai = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri();

            if (Validation())
            {
                KeToanProcess process = new KeToanProcess();
                try
                {
                    List <ClientResponseDetail>        listClientResponseDetail = new List <ClientResponseDetail>();
                    ApplicationConstant.ResponseStatus ret = ApplicationConstant.ResponseStatus.KHONG_THANH_CONG;
                    // Dữ liệu truyền vào và dữ liệu trả về

                    Mouse.OverrideCursor = Cursors.Wait;
                    if (GetDataForm() == 1)
                    {
                        if (process.HeThongTaiKhoanChiTiet(DatabaseConstant.Action.THEM, ref objHeThong, ref listClientResponseDetail) == ApplicationConstant.ResponseStatus.THANH_CONG)
                        {
                            CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                            LoadDuLieu();
                            SetEnableControl(false);
                            action = DatabaseConstant.Action.XEM;
                            CommonFunction.RefreshButton(Toolbar, action, objHeThong.HTTKTHCT.TTHAI_NVU, mnuMain, DatabaseConstant.Function.KT_HE_THONG_TKTH);
                        }
                        else
                        {
                            CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                        }
                    }
                }
                catch (System.Exception ex)
                {
                    this.Cursor = Cursors.Arrow;
                    CommonFunction.ThongBaoLoi(ex);
                    LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                }
                finally
                {
                    process = null;
                }
            }
        }
        private void onDelete()
        {
            string trangThai = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri();

            if (Validation())
            {
                KeToanProcess process = new KeToanProcess();
                try
                {
                    List <ClientResponseDetail>        listClientResponseDetail = new List <ClientResponseDetail>();
                    ApplicationConstant.ResponseStatus ret = ApplicationConstant.ResponseStatus.KHONG_THANH_CONG;
                    // Dữ liệu truyền vào và dữ liệu trả về

                    Mouse.OverrideCursor = Cursors.Wait;
                    if (GetDataForm() == 1)
                    {
                        if (process.HeThongTaiKhoanChiTiet(DatabaseConstant.Action.THEM, ref objHeThong, ref listClientResponseDetail) == ApplicationConstant.ResponseStatus.THANH_CONG)
                        {
                            CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                            this.onClose();
                        }
                        else
                        {
                            CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                        }
                    }
                }
                catch (System.Exception ex)
                {
                    CommonFunction.ThongBaoLoi(ex);
                    LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                }
                finally
                {
                    Mouse.OverrideCursor = Cursors.Arrow;
                    process = null;
                }
            }
        }