public DataTable GetCreditVoucherApprovalListByDateRangeAndAll(string SalesCenter,string fromDate, string toDate, string cashCheque, string search)
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = debitCreditVoucher.GetCreditVoucherApprovalListByDateRangeAndAll(SalesCenter,fromDate, toDate, cashCheque, search, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }
        public DataTable SaveCreditVoucherCash()
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                DataTable dt = debitCreditVoucher.SaveCreditVoucherCash(this, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }
        public void ApproveDebitVoucherByJournal(string journalNumber, string cashCheque)
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                debitCreditVoucher.ApproveDebitVoucherByJournal(journalNumber, cashCheque, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }
        public void UpdateDebitVoucherCash()
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                debitCreditVoucher.UpdateDebitVoucherCash(this, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }
        public DataTable GetDebitVoucherApprovalByJournal(string cashCheque, string journalNumber)
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = debitCreditVoucher.GetDebitVoucherApprovalByJournal(cashCheque, journalNumber, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }
        /////////////////////////////////////////////////////////////////////////////////////////////

        public void RejectDebitCreditJournalVoucherByJournal(string journalNumber)
        {
            DebitCreditVoucherDAL debitCreditVoucher = new DebitCreditVoucherDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                debitCreditVoucher.RejectDebitCreditJournalVoucherByJournal(journalNumber, db);
                db.Stop();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                debitCreditVoucher = null;
            }
        }