public static bool DeleteDiscountBL(int deleteRetailerID, int deleteOrderID) { bool discountDeleted = false; try { if ((deleteOrderID > 0) && (deleteRetailerID > 0)) { Discount_DAL discountDAL = new Discount_DAL(); discountDeleted = discountDAL.DeleteDiscountDAL(deleteRetailerID, deleteOrderID); } else { throw new GOException("Invalid Order ID and Retailer ID"); } } catch (GOException) { throw; } catch (Exception ex) { throw ex; } return(discountDeleted); }
public static List <Discount_Entities> GetAllDiscountBL() { List <Discount_Entities> discountList = null; try { Discount_DAL discountDAL = new Discount_DAL(); discountList = discountDAL.GetAllDiscountDAL(); } catch (GOException ex) { throw ex; } catch (Exception ex) { throw ex; } return(discountList); }
public static Discount_Entities SearchDiscountBL(int searchRetailerID, int searchOrderID) { Discount_Entities searchDiscount = null; try { Discount_DAL discountDAL = new Discount_DAL(); searchDiscount = discountDAL.SearchDiscountDAL(searchRetailerID, searchOrderID); } catch (GOException ex) { throw ex; } catch (Exception ex) { throw ex; } return(searchDiscount); }
public static bool UpdateDiscountBL(Discount_Entities updateDiscount) { bool discountUpdated = false; try { if (ValidateDiscount(updateDiscount)) { Discount_DAL discountDAL = new Discount_DAL(); discountUpdated = discountDAL.UpdatedDiscountDAL(updateDiscount); } } catch (GOException) { throw; } catch (Exception ex) { throw ex; } return(discountUpdated); }
public static bool AddDiscountBL(Discount_Entities newDiscount) { bool DiscountAdded = false; try { if (ValidateDiscount(newDiscount)) { Discount_DAL discountDAL = new Discount_DAL(); DiscountAdded = discountDAL.AddDiscountDAL(newDiscount); } } catch (GOException) { throw; } catch (Exception ex) { throw ex; } return(DiscountAdded); }