Ejemplo n.º 1
0
        public ActionResult Delete(int ID)
        {
            AuctionService service = new AuctionService();
            var            auction = service.GetAuctionByID(ID);

            return(PartialView(auction));
        }
        public ActionResult Edit(int ID)
        {
            CreateAuctionsViewModel model = new CreateAuctionsViewModel();
            var auction = auctionService.GetAuctionByID(ID);

            model.ID                 = auction.ID;
            model.Title              = auction.Title;
            model.CategoryID         = auction.CategoryID;
            model.Description        = auction.Description;
            model.ActualAmount       = auction.ActualAmount;
            model.StaringTime        = auction.StaringTime;
            model.EndTime            = auction.EndTime;
            model.Categories         = categoriesService.GetAllCategories();
            model.AuctionPictureList = auction.AuctionPictures;


            return(PartialView(model));
        }