public void updateOrderedCouponsDateOfUse(OrderedCoupon newValue, DateTime newTime)
 {
     db.OrderedCoupons.Find(newValue.serialKey).dateOfUse = newTime;
     db.SaveChanges();
 }
 public void updatOrderedCouponsPriceAfterDiscount(OrderedCoupon newValue, double newPrice)
 {
     db.OrderedCoupons.Find(newValue.serialKey).CatalogCoupon.priceAfterDiscount = newPrice;
     db.SaveChanges();
 }
 public void updateOrderedisUsed(OrderedCoupon newValue, bool isUsesd)
 {
     db.OrderedCoupons.Find(newValue.serialKey).isUsed = isUsesd;
     db.SaveChanges();
 }
 public void updateOrderedCouponsCouponName(OrderedCoupon newValue, string newName)
 {
     db.OrderedCoupons.Find(newValue.serialKey).CatalogCoupon.CouponName = newName;
     db.SaveChanges();
 }
 public void updateOrderedCouponsDeadLineForUse(OrderedCoupon newValue, DateTime newTime)
 {
     db.OrderedCoupons.Find(newValue.serialKey).CatalogCoupon.deadLineForUse = newTime;
     db.SaveChanges();
 }
 public void updateOrderedCouponRank(OrderedCoupon newValue, short newRank)
 {
     db.OrderedCoupons.Find(newValue.serialKey).rank = newRank;
     db.SaveChanges();
 }
 public void removeOrderedCoupons(OrderedCoupon newValue)
 {
     db.OrderedCoupons.Remove(newValue);
     db.SaveChanges();
 }
        public OrderedCoupon findOrderedCoupon(OrderedCoupon newValue)
        {
            OrderedCoupon b = db.OrderedCoupons.Find(newValue.serialKey);

            return(b);
        }
        public bool existsOrderedCoupons(OrderedCoupon newValue)
        {
            OrderedCoupon b = db.OrderedCoupons.Find(newValue.serialKey);

            return(b != null);
        }
 public void addOrderedCoupons(OrderedCoupon newValue)
 {
     db.OrderedCoupons.Add(newValue);
     db.SaveChanges();
 }