Ejemplo n.º 1
0
        // GET: Cabinet/menu/List
        public ActionResult Detail(int id)
        {
            if (!SessionHelpers.IsAuthentificated())
            {
                return(RedirectToAction("Login", "Authorize"));
            }

            if (id < 1)
            {
                return(HttpNotFound());
            }
            var operation = new LoadCategoriesOperation();

            operation.ExcecuteTransaction();

            var operation2 = new LoadProductOperation(id);

            operation2.ExcecuteTransaction();
            if (operation2._product == null)
            {
                return(HttpNotFound());
            }

            ViewBag.IsSave = false;
            return(View(new ProductModel {
                Categories = operation._categories, Product = operation2._product
            }));
        }
Ejemplo n.º 2
0
        // GET: Cabinet/menu/List
        public ActionResult Detail(int id)
        {
            if (!SessionHelpers.IsAuthentificated())
            {
                return(RedirectToAction("Login", "Authorize"));
            }

            if (id < 1)
            {
                return(HttpNotFound());
            }

            var operation2 = new LoadProductOperation(id);

            operation2.ExcecuteTransaction();
            if (operation2._product == null)
            {
                return(HttpNotFound());
            }

            return(View(operation2._product));
        }