public ActionResult SingleAuction(int AID) { Session["AUCTION_ID"] = AID; List <AuctionEventModel> AWM = AuctionProccessor.GetAuctionByID(AID); AllProductsLoad APL = new AllProductsLoad { productList = AuctionProccessor.GetProductsByAuctionID(AID) }; return(View(APL)); }
public ActionResult RunningAuction(int ID) { if (AuctionProccessor.GetAuctionByID(ID).Count > 0) { RunningAuctionViewModel RAM = new RunningAuctionViewModel { AuctionEventList = AuctionProccessor.GetAuctionByID(ID), PoductList = AuctionProccessor.GetProductsByAuctionID(ID) }; return(View(RAM)); } else { return(View()); } }
public ActionResult RequestedProducts(RequestedProductsViewModel RPVM) { string AuctionID = RPVM.SelectedAuctionAndProduct; string[] tokens = AuctionID.Split(':'); int PID = Convert.ToInt32(tokens[0]); int AID = Convert.ToInt32(tokens[1]); System.Diagnostics.Debug.WriteLine("AUCTION ID = " + AuctionID); AuctionProccessor.addProductToAuction(AID, PID); List <AuctionEventModel> Auction = AuctionProccessor.GetAuctionByID(AID); AuctionProccessor.updateProductData(Auction[0].StartTime, Auction[0].EndTime, PID); return(Redirect("/Admin/RequestedProducts")); }