コード例 #1
0
        public ActionResult List()
        {
            WebAuctionService was = new WebAuctionService();
            List <WebAuction> auctionsToDisplay = was.GetAllAuctions();


            return(View(auctionsToDisplay));
        }
コード例 #2
0
        public ActionResult Create(WebAuction auc)
        {
            WebAuctionService was = new WebAuctionService();

            auc.Result = "Open";
            DateTime dt = new DateTime(2012, 12, 31, 16, 45, 0);

            auc.PaymentDate = dt;
            auc.Payment     = false;

            was.CreateAuction(auc);

            return(RedirectToAction("List"));
        }