Пример #1
0
        public ActionResult Edit(string id)
        {
            if(!Request.IsAuthenticated)
            {
                return RedirectToAction("Index");
            }

            ProductModel product = new ProductModel();
            ViewBag.Product = product.GetProductByName(id);

            return View();
        }
Пример #2
0
        public ActionResult Product(string id)
        {
            ProductModel model = new ProductModel();
            ViewBag.Product = model.GetProductByName(id);
            if (ViewBag.Product == null)
            {
                return RedirectToAction("Index", "Home");
            }

            return View();
        }