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); }
//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); }
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); }
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); }
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); }