コード例 #1
0
        public ActionResult FeaturedCategory()
        {
            SAPO.BrandInput brand = new SAPO.BrandInput();
            Retrieve <SAPO.BrandInput, SAPO.Brands> retrieve = new Retrieve <SAPO.BrandInput, SAPO.Brands>(new SmartBAL.Brands());
            List <SAPO.Brands> lstbrands = new List <SAPO.Brands>();

            lstbrands = retrieve.ListRetreive(brand);
            return(PartialView("_FeaturedCategory", lstbrands));
        }
コード例 #2
0
        public ActionResult Header()
        {
            SAPO.MenuRequest menu = new SAPO.MenuRequest();
            Retrieve <SAPO.MenuRequest, SAPO.Category> retrieve = new Retrieve <SAPO.MenuRequest, SAPO.Category>(new Categories());
            List <SAPO.Category> categories = new List <SAPO.Category>();

            categories = retrieve.ListRetreive(menu);
            return(PartialView("_Header", categories));
        }
コード例 #3
0
        public ActionResult PopularProducts()
        {
            SAPO.BrandInput brand = new SAPO.BrandInput();
            Retrieve <SAPO.BrandInput, SAPO.Brands> retrieve = new Retrieve <SAPO.BrandInput, SAPO.Brands>(new SmartBAL.Brands());
            List <SAPO.Brands> lstbrands = new List <SAPO.Brands>();

            lstbrands = retrieve.ListRetreive(brand);
            return(PartialView("_PopularProducts", lstbrands));
        }
コード例 #4
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));
        }
コード例 #5
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));
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        public ActionResult Products(Models.CalculatorModel calculatorModel)
        {
            var retrieve = new Retrieve <SAPO.CalculatorCategory, SAPO.CalculatorCategory>(new Calculator());
            var products = new List <SAPO.CalculatorCategory>();

            products = retrieve.ListRetreive(new SAPO.CalculatorCategory());
            //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));
        }
コード例 #8
0
        // GET: Calculator
        public ActionResult Index()
        {
            var calculatorModel = new Models.CalculatorModel();
            var menu            = new SAPO.MenuRequest();

            menu.IsShowOnCalculator = true;

            var retrieveCategories = new Retrieve <SAPO.MenuRequest, SAPO.Category>(new Categories());

            calculatorModel.Categories = retrieveCategories.ListRetreive(menu);

            var brand         = new SAPO.BrandInput();
            var retrievebrand = new Retrieve <SAPO.BrandInput, SAPO.Brands>(new SmartBAL.Brands());

            calculatorModel.Brands = retrievebrand.ListRetreive(brand);


            return(View(calculatorModel));
        }