Пример #1
0
 public ActionResult DeleteLot(LotModel Model)
 {
     if (Auction.DeleteLot(Model))
     {
         return(RedirectToAction("Index", "Home"));
     }
     ModelState.AddModelError("", "Fail while model deleting.");
     return(Index(Model));
 }
Пример #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 }));
        }