public DataTable GetCustomerReceivableList(string customerId)
        {
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = receivePayment.GetCustomerReceivableList(customerId, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                receivePayment = null;
            }
        }
        public DataTable GetVendorPayableList(string vendorId, string accountOn, string whscId)
        {
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = receivePayment.GetVendorPayableList(vendorId, accountOn, whscId, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                receivePayment = null;
            }
        }
        public DataTable GetVendorPayments(string vendorId, string recordId, string status)
        {
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = receivePayment.GetVendorPayments(vendorId, recordId, status, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                receivePayment = null;
            }
        }
        public DataTable SaveVendorPaymentBySC()
        {
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = receivePayment.SaveVendorPaymentBySC(this, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                receivePayment = null;
            }
        }
        public DataTable GetCustomerTotalReceivable(string Cid,string salesCenterId)
        {
            //GET_CUSTOMER_TOTAL_RECEIVABLE_BY_ID
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start();
                DataTable dt = receivePayment.GetCustomerTotalReceivable(Cid,salesCenterId, db);
                db.Stop();

                return dt;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                receivePayment = null;
            }
        }
        public DataTable SaveCustomerPayment(string acountOn,DataTable adata)
        {
            ReceivePaymentDAL receivePayment = new ReceivePaymentDAL();

            try
            {
                LumexDBPlayer db = LumexDBPlayer.Start(true);
                DataTable dt = receivePayment.SaveCustomerPayment(this, acountOn,adata,db);
                db.Stop();

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