Esempio n. 1
0
        public void GetGallery()
        {
            Console.Clear();
            ArtRepo ap = new ArtRepo(_context, new ArtMapper());

            ap.ShowArtByArtist(artist.Id);
        }
Esempio n. 2
0
        public void viewArtByCollector()
        {
            Console.Clear();
            ArtRepo ap = new ArtRepo(_context, new ArtMapper());

            ap.ShowArtByCollector(collector.Id);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void viewArt()
        {
            Console.Clear();
            ArtRepo ap = new ArtRepo(_context, new ArtMapper());

            if (OrderArtBy == "Price")
            {
                ap.ShowArtByPrice();
            }
            else
            {
                ap.ShowAll();
            }
        }
Esempio n. 5
0
        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.");
            }
        }