public ActionResult GetResultPage(string shop, string category, int page)
        {
            IGlobalShopAnalizerInitiator _createCertainShopAnalizer = new GlobalShopAnalizerInitiator();
            ICertainShopAnalizer         cAnalizer = _createCertainShopAnalizer.CreateCertainShopAnalizer(shop);

            ViewBag.Goods    = cAnalizer.GetPage(page, category);
            ViewBag.ShopName = shop;
            ViewBag.Category = category;
            return(PartialView());
        }
        public ActionResult ViewDetails(string shop, string category)
        {
            ViewBag.ShopName = shop;
            ViewBag.Category = category;
            IGlobalShopAnalizerInitiator _createCertainShopAnalizer = new GlobalShopAnalizerInitiator();
            ICertainShopAnalizer         cAnalizer = _createCertainShopAnalizer.CreateCertainShopAnalizer(shop);

            ViewBag.Pages = cAnalizer.PageTotal(category);

            return(View());
        }
Esempio n. 3
0
        public ActionResult FufullGoodsInfo(string shop, string category)
        {
            IGlobalShopAnalizerInitiator _createCertainShopAnalizer = new GlobalShopAnalizerInitiator();
            ICertainShopAnalizer         cAnalizer = _createCertainShopAnalizer.CreateCertainShopAnalizer(shop);

            ViewBag.Goods            = cAnalizer.FullGoodsInfo(category);
            ViewBag.GoodsDescription = cAnalizer.GetDescription(category).Specification;

            ViewBag.ChangeDynamics = cAnalizer.GetChangeDynamics(category);
            return(View());
        }
        public ActionResult Index()
        {
            IGlobalShopAnalizerInitiator _createCertainShopAnalizer = new GlobalShopAnalizerInitiator();
            ICertainShopAnalizer         cAnalizer = _createCertainShopAnalizer.CreateCertainShopAnalizer(shop);

            ViewBag.Category = cAnalizer.GetAllCategory();
            ViewBag.ShopName = shop;
            ViewBag.Title    = "Home Page";

            return(View());
        }
Esempio n. 5
0
        public string GetValidation(string shop, string category, int start, int end)
        {
            if (_validationContinue)
            {
                return("Processing previous request in progress");
            }
            _validationContinue = true;
            IGlobalShopAnalizerInitiator _createCertainShopAnalizer = new GlobalShopAnalizerInitiator();
            ICertainShopAnalizer         cAnalizer = _createCertainShopAnalizer.CreateCertainShopAnalizer(shop);

            if (cAnalizer == null)
            {
                _validationContinue = false;
                return("Invalid shop");
            }
            if (!cAnalizer.ValidateDiapazone(category, start, end))
            {
                _validationContinue = false;
                return("Invalid category");
            }
            _validationContinue = false;
            return("Ready");
        }