Пример #1
0
        public ActionResult Wishlist()
        {
            var Categories = ApiUtil.GetCategoryList().Result;
            var objects    = ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>();

            objects.Add("SearchCategories", Categories ?? new List <Category>());
            ViewBag.Data = objects;

            return(View());
        }
Пример #2
0
        public ActionResult ProductDetail(Guid Oid)
        {
            var objects    = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>();
            var product    = ApiUtil.GetProduct(Oid).Result;
            var categories = ApiUtil.GetCategoryList().Result;

            objects.Add("SearchCategories", categories ?? new List <Category>());
            ViewBag.Data = objects;

            return(View(product));
        }
Пример #3
0
        public IActionResult Index(string searchProduct)
        {
            var objects    = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>();
            var categories = ApiUtil.GetCategoryList().Result;

            //var product = ApiUtil.Search(searchProduct).Result;
            objects.Add("SearchCategories", categories ?? new List <Category>());
            //objects.Add("Products", product ?? new List<Product>());
            ViewBag.Data = objects;
            return(View());
        }
Пример #4
0
        public ActionResult CategoryResult(Guid id)
        {
            var objects    = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>();
            var categories = ApiUtil.GetCategoryList().Result;

            objects.Add("SearchCategories", categories ?? new List <Category>());
            ViewBag.Data = objects;
            var productList = ApiUtil.GetProductByCategory(id).Result;

            if (productList == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            return(View(new CategoryResultVM()
            {
                ProductList = productList, Category = categories.FirstOrDefault(x => x.Oid == id)
            }));
        }
Пример #5
0
        public ActionResult Index()
        {
            var objects = base.ViewBag.Data as Dictionary <string, dynamic> ?? new Dictionary <string, dynamic>();

            objects.Add("SearchCategories", Categories ?? new List <Category>());
            var mainScreenProducts  = ApiUtil.GetMainScreenProducts().Result;
            var bestSellerProducts  = ApiUtil.GetBestSellerProducts().Result;
            var opportunityProducts = ApiUtil.GetOpportunityProducts().Result;
            var newProducts         = ApiUtil.GetNewProducts().Result;
            var outletProducts      = ApiUtil.GetOutletProducts().Result;
            var brands     = ApiUtil.GetBrandList().Result;
            var categories = ApiUtil.GetCategoryList().Result;

            objects.Add("BestSellerProducts", bestSellerProducts);
            objects.Add("MainScreenProducts", mainScreenProducts);
            objects.Add("OpportunityProducts", opportunityProducts);
            objects.Add("NewProducts", newProducts);
            objects.Add("OutletProducts", outletProducts);
            objects.Add("Categories", categories);
            objects.Add("BrandList", brands);
            ViewBag.Data = objects;
            return(View());
        }