Ejemplo n.º 1
0
        public void AcceptOffer(Offer offer, OfferUpdateModel offerUpdate)
        {
            offer.isPending             = false;
            offer.isApproved            = true;
            offer.Product.Sold.IsSold   = true;
            offer.Product.Sold.Offer    = offer;
            offer.Product.Sold.DateSold = DateTime.Now.Date;

            var remainingOffer = AllOfferForProduct(offer.ProductId);

            foreach (var item in remainingOffer)
            {
                item.isApproved = false;
                item.isPending  = false;
            }


            _databaseContext.SaveChanges();
        }
Ejemplo n.º 2
0
 public void UpdateOffer(Offer offer, OfferUpdateModel offerUpdate)
 {
 }
Ejemplo n.º 3
0
        public void DeclineOffer(Offer offer, OfferUpdateModel offerUpdate)
        {
            offer.isPending = false;

            _databaseContext.SaveChanges();
        }