예제 #1
0
        public ActionResult DeleteProduct(int id, FormCollection collection)
        {
            ProductsDb dbProduct = new ProductsDb();
            bool       productValid;

            productValid = dbProduct.DeleteProduct(id);

            if (productValid)
            {
                return(RedirectToAction("Stock"));
            }
            else
            {
                return(RedirectToAction("DeleteProduct", id));
            }
        }