Exemple #1
0
        public ActionResult Index(string brandName)
        {
            SAPO.GetProduct getProduct = new SAPO.GetProduct();
            getProduct.BrandName = brandName.Replace("-", " ").Replace(".", "_");
            Retrieve <SAPO.GetProduct, SAPO.ProductsPro> retrieve = new Retrieve <SAPO.GetProduct, SAPO.ProductsPro>(new Products());
            List <SAPO.ProductsPro> products = new List <SAPO.ProductsPro>();

            products = retrieve.ListRetreive(getProduct);
            return(View("~/Views/ProductList/Index.cshtml", products));
        }
Exemple #2
0
        public ActionResult Index(string productName)
        {
            SAPO.GetProduct getProduct = new SAPO.GetProduct();
            getProduct.Name = productName.Replace("-", " ").Replace("_", ".");
            var retrieve = new Retrieve <SAPO.GetProduct, SAPO.ProductsPro>(new Products());
            var products = new SAPO.ProductsPro();

            products = retrieve.Retreive(getProduct);
            return(View(products));
        }
Exemple #3
0
        public ActionResult Index(string CategoryName)
        {
            SAPO.GetProduct getProduct = new SAPO.GetProduct();
            getProduct.CategoryName = CategoryName.Replace("-", " ").Replace(".", "_");
            Retrieve <SAPO.GetProduct, SAPO.ProductsPro> retrieve = new Retrieve <SAPO.GetProduct, SAPO.ProductsPro>(new Products());
            List <SAPO.ProductsPro> products = new List <SAPO.ProductsPro>();

            products = retrieve.ListRetreive(getProduct);
            return(View(products));
        }
        public ActionResult ProductList(string CategoryName, string BrandName)
        {
            SAPO.GetProduct getProduct = new SAPO.GetProduct();
            getProduct.CategoryName = CategoryName;
            getProduct.BrandName    = BrandName;
            Retrieve <SAPO.GetProduct, SAPO.ProductsPro> retrieve = new Retrieve <SAPO.GetProduct, SAPO.ProductsPro>(new Products());
            List <SAPO.ProductsPro> products = new List <SAPO.ProductsPro>();

            products = retrieve.ListRetreive(getProduct);
            return(Json(products, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Products(Models.CalculatorModel calculatorModel)
        {
            var getProduct = new SAPO.GetProduct();

            if (calculatorModel.Categories.Count > 0)
            {
                getProduct.CategoryName = calculatorModel.Categories[0].Name;
            }
            if (calculatorModel.Brands.Count > 0)
            {
                getProduct.BrandIds = calculatorModel.Brands;
            }
            Retrieve <SAPO.GetProduct, SAPO.ProductsPro> retrieve = new Retrieve <SAPO.GetProduct, SAPO.ProductsPro>(new Products());
            List <SAPO.ProductsPro> products = new List <SAPO.ProductsPro>();

            products = retrieve.ListRetreive(getProduct);
            return(Json(products, JsonRequestBehavior.AllowGet));
        }