Exemple #1
0
        public static List <DistributorPaymentDetails> GetPaymentDetailsBL()
        {
            List <DistributorPaymentDetails> distributorList;

            try
            {
                DistributorPaymentDetailsDAL distributorDAL = new DistributorPaymentDetailsDAL();
                distributorList = distributorDAL.GetPaymentDetailsDAL();
            }
            catch (InventoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(distributorList);
        }
Exemple #2
0
        //Validating & Searching Distributor by using Distributor ID as parameter
        public static DistributorPaymentDetails SearchDistributorBL(string searchDistributorID)
        {
            DistributorPaymentDetails searchDistributor = null;

            try
            {
                DistributorPaymentDetailsDAL distributorDAL = new DistributorPaymentDetailsDAL();
                searchDistributor = distributorDAL.SearchDistributorPDDAL(searchDistributorID);
            }
            catch (InventoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(searchDistributor);
        }
Exemple #3
0
        public static List <DistributorPaymentDetails> GetBillByOrderIdBL(long orderId)
        {
            List <DistributorPaymentDetails> Bill;

            try
            {
                DistributorPaymentDetailsDAL billDAL = new DistributorPaymentDetailsDAL();
                Bill = billDAL.GetBillByOrderIdDAL(orderId);
            }
            catch (InventoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Bill);
        }
Exemple #4
0
        public static bool AddDistributorPaymentDetailsBL(DistributorPaymentDetails newPayment)
        {
            bool distributorPaymentAdded = false;

            try
            {
                if (ValidateDisPayment(newPayment))
                {
                    DistributorPaymentDetailsDAL distributorDAL = new DistributorPaymentDetailsDAL();
                    distributorPaymentAdded = distributorDAL.AddDistributorPaymentDAL(newPayment);
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(distributorPaymentAdded);
        }
Exemple #5
0
        public static bool DecrementPaymentDetailsBL(DistributorPaymentDetails updatepaymentDetails)
        {
            bool detailsUpdated = false;

            try
            {
                if (ValidateDisPayment(updatepaymentDetails))
                {
                    DistributorPaymentDetailsDAL supPDDAL = new DistributorPaymentDetailsDAL();
                    detailsUpdated = supPDDAL.DecrementPaymentDetailsDAL(updatepaymentDetails);
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(detailsUpdated);
        }