예제 #1
0
        // GET: Cafe
        public ActionResult Index()
        {
            var op = new LoadPagesDescOperation("cafe", "index");

            op.ExcecuteTransaction();
            return(View(op._pageDescription));
        }
예제 #2
0
        public ActionResult Products(int id)
        {
            if (id < 1)
            {
                return(HttpNotFound());
            }
            var op = new LoadProductsOperation(1, ConstV.ItemsPerPage, id);

            op.ExcecuteTransaction();
            if (!op.Success)
            {
                return(HttpNotFound());
            }

            var op2 = new LoadPagesDescOperation("menu", "index");

            op2.ExcecuteTransaction();
            var op3 = new LoadCategoriesOperation();

            op3.ExcecuteTransaction();
            var model = new MenuModel
            {
                PageDescription = op2._pageDescription,
                Categories      = op3._categories,
                Products        = op._products,
            };

            ViewBag.Main = false;
            return(View("Index", model));
        }
예제 #3
0
        // GET: Lazertag
        public ActionResult Index()
        {
            var op = new LoadPagesDescOperation("lazertag", "index");

            op.ExcecuteTransaction();
            var op2 = new LoadPagesDescOperation("shtab", "index");

            op2.ExcecuteTransaction();
            return(View(new PageDescription[] { op._pageDescription, op2._pageDescription }));
        }
예제 #4
0
        // GET: Cabinet/Main
        public ActionResult Index()
        {
            if (!SessionHelpers.IsAuthentificated())
            {
                return(RedirectToAction("Login", "Authorize"));
            }

            var operation = new LoadPagesDescOperation("home", "index");

            operation.ExcecuteTransaction();
            if (operation._pageDescription == null)
            {
                return(HttpNotFound());
            }

            return(View(operation._pageDescription));
        }
예제 #5
0
        // GET: Menu
        public ActionResult Index()
        {
            var op = new LoadPagesDescOperation("menu", "index");

            op.ExcecuteTransaction();
            var op2 = new LoadCategoriesOperation();

            op2.ExcecuteTransaction();
            var op3 = new LoadHotProductsOperation(1, ConstV.ItemsPerPage);

            op3.ExcecuteTransaction();
            var model = new MenuModel
            {
                PageDescription = op._pageDescription,
                Categories      = op2._categories,
                Products        = op3._products,
            };

            ViewBag.Main = true;
            return(View(model));
        }