public ProductToBeAuctioned UpdateToBeAuctionedRecord(Guid id, DateTime dateOfAuction, double price) { ProductToBeAuctioned Record = ProductToBeAuctionedRepo.Get(x => x.Id == id); Record.DateOfAuction = dateOfAuction; Record.AuctionPrice = price; return(ProductToBeAuctionedRepo.Update(Record)); }
public ProductToBeAuctioned EditAuctionDateAndPrice(Guid productToBeAuctionId, double price, DateTime auctionDate) { ProductToBeAuctioned Record = ProductToBeAuctionedRepo.Get(x => x.Id == productToBeAuctionId); Record.DateOfAuction = auctionDate; Record.AuctionPrice = price; return(ProductToBeAuctionedRepo.Update(Record)); }
public ActionResult ApproveAuctionProposal(Guid id) { ProductToBeAuctioned Record = ToBeAuctionedRepo.Get(x => x.Id == id); Record.HasBeenReviewedByManager = true; ToBeAuctionedRepo.Update(Record); TempData["class"] = "alert alert-success alert-dismissable"; TempData["message"] = $"Auction Proposal For {Record.Batch.Product.Name} Has Been Accepted"; return(RedirectToAction("ReviewPendingAuctions")); }
public ActionResult EditAboutToBeAuctionedRecord(Guid id) { Guid BatchId = id; ProductToBeAuctioned Record = ToBeAuctionedRepo.Get(x => x.BatchId == BatchId); if (Record == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } return(View(Record)); }
public ActionResult AboutToBeAuctioned(ProductToBeAuctioned model) { var ReturnUrl = RouteData.Values["returnUrl"]; ProductToBeAuctioned Record = ToBeAuctionedRepo.Get(x => x.Id == model.Id); Record.AuctionPrice = model.AuctionPrice; Record.DateOfAuction = model.DateOfAuction; Record = ToBeAuctionedRepo.Update(Record); TempData["class"] = "alert alert-success alert-dismissable"; TempData["message"] = "CHanges Saved Successfully"; return(RedirectToAction("AboutToBeAuctioned")); }