Exemple #1
0
        //
        // GET: /Checkout/Edit/5

        public ActionResult Edit()
        {
            string          id        = Request.Form["txtID"];
            string          qty       = Request.Form["txtQty"];
            CartModel       cartModel = GetCartModelFromSession();
            ProductModel    pModel    = GetProductModelFromSession();
            CategoriesModel cModel    = GetCategoriesModelFromSession();

            cartModel.EditCart(Convert.ToInt32(id), Convert.ToInt32(qty));
            ViewData["Cart"]       = cartModel.GetCarts();
            ViewData["Categories"] = cModel.GetCategories();
            return(View("Details"));
        }
Exemple #2
0
        public ActionResult Details(string ID)
        {
            //Brings all Products data
            ProductModel pModel = GetProductModelFromSession();

            //Brings Category data
            CategoriesModel cModel = GetCategoriesModelFromSession();

            //Brings Carts data
            CartModel cartModel = GetCartModelFromSession();

            ViewData["Categories"] = cModel.GetCategories();
            ViewData["Cart"]       = cartModel.GetCarts();
            ViewData["Product"]    = pModel.GetProductByID(Convert.ToInt32(ID));

            return(View());
        }
Exemple #3
0
        public ActionResult Index()
        {
            //Brings Index Sales Schema
            //HomeModel hModel = GetHomeModelFromSession();

            //Brings all Products data
            ProductModel pModel = GetProductModelFromSession();

            //Brings Category data
            CategoriesModel cModel = GetCategoriesModelFromSession();

            //Brings Carts data
            CartModel cartModel = GetCartModelFromSession();


            //ViewData["Contents"] = hModel.GetContents();
            ViewData["OnSale"]     = pModel.GetProductsOnSale();
            ViewData["MainSale"]   = pModel.GetMainSales();
            ViewData["Categories"] = cModel.GetCategories();
            ViewData["Cart"]       = cartModel.GetCarts();

            return(View());
        }