/* public void updateDiscountGroup(int id, string name, decimal discount) { throw new NotImplementedException(); } */ public void updateDiscountGroup(DiscountGroup discountGroup) { DiscountGroupCtr discoCtr = new DiscountGroupCtr(); discoCtr.update(discountGroup.ID, discountGroup.Name, (decimal)discountGroup.Discount); }
public void addDiscountGroup(string name, decimal discount) { DiscountGroupCtr discoCtr = new DiscountGroupCtr(); int newDiscoGrp = discoCtr.add(name, discount); }
public List<DiscountGroup> getAllDiscountGroups() { DiscountGroupCtr discoCtr = new DiscountGroupCtr(); List<MDiscountGroup> mDiscoGrps = discoCtr.getAll(); List<DiscountGroup> discoGrps = new List<DiscountGroup>(); foreach (MDiscountGroup mDiscoGrp in mDiscoGrps) { discoGrps.Add(new DiscountGroup { ID = mDiscoGrp.ID, Name = mDiscoGrp.Name, Discount = mDiscoGrp.Discount }); } return discoGrps; }
public DiscountGroup getDiscoutGroup(int id) { DiscountGroupCtr discoCtr = new DiscountGroupCtr(); MDiscountGroup mDiscoGrp = discoCtr.get(id, false); DiscountGroup discoGrp = new DiscountGroup { ID = mDiscoGrp.ID, Name = mDiscoGrp.Name, Discount = mDiscoGrp.Discount }; return discoGrp; }
public void deleteDiscountGroup(int id) { DiscountGroupCtr discoCtr = new DiscountGroupCtr(); discoCtr.delete(id); }