public void GetGallery() { Console.Clear(); ArtRepo ap = new ArtRepo(_context, new ArtMapper()); ap.ShowArtByArtist(artist.Id); }
public void viewArtByCollector() { Console.Clear(); ArtRepo ap = new ArtRepo(_context, new ArtMapper()); ap.ShowArtByCollector(collector.Id); }
public void createAuction() { AuctionRepo cp = new AuctionRepo(_context, new AuctionMapper()); ArtRepo ap = new ArtRepo(_context, new ArtMapper()); int artid = getint("Which Art Piece Do You Want to Auction Off?"); if (ap.GetArt(artid, seller.Id).Name == "") { Console.WriteLine("this are does not exist in your inventory"); return; } Auction au = new Auction(); au.Artid = artid; au.Sellerid = seller.Id; au.Closingdate = getDate("When Do you want this Auction to close bidding?"); //au.Minimumamount = getdec("Minimum Bid?"); au.Minimumamount = 0.00m; Auction getA = cp.AddAuction(au); BidRepo bp = new BidRepo(_context, new BidMapper()); Bid bid = new Bid(); bid.Amount = 0.01m; bid.Collectorid = 20; bid.Timeofbid = DateTime.Now; bid.Auctionid = getA.Id; bp.AddBid(bid); }
public void viewArt() { Console.Clear(); ArtRepo ap = new ArtRepo(_context, new ArtMapper()); if (OrderArtBy == "Price") { ap.ShowArtByPrice(); } else { ap.ShowAll(); } }
public void attachToSeller() { Console.Clear(); SellerRepo cp = new SellerRepo(_context, new SellerMapper()); ArtRepo ap = new ArtRepo(_context, new ArtMapper()); ap.ShowArtByArtist(artist.Id); int artid = getint("Please enter the id of the art you'de like to attach."); int sellid = getint("Please Enter the id of the seller you'de like to attach to."); try { cp.AddInventory(artid, sellid); } catch (Exception) { Console.WriteLine("There was an issue with attachment, please try again."); } }