Esempio n. 1
0
 public ActionResult DeleteLot(LotModel Model)
 {
     if (Auction.DeleteLot(Model))
     {
         return(RedirectToAction("Index", "Home"));
     }
     ModelState.AddModelError("", "Fail while model deleting.");
     return(Index(Model));
 }
Esempio n. 2
0
        public ActionResult DeleteLot(LotViewModel model)
        {
            var lotid = Convert.ToInt32(Request.Cookies["LotId"].Value);

            if (Auction.DeleteLot(lotid))
            {
                return(RedirectToAction("Index", "Home"));
            }
            ModelState.AddModelError("", "Fail while model deleting.");
            return(RedirectToAction("Index", new { id = lotid }));
        }