Exemple #1
0
        public ProductDependency GetDependencyDetails()
        {
            ProductDependency dependency = new ProductDependency();

            dependency.Categories = productCategoryLogic.GetAll();
            dependency.Features   = featureLogic.GetFeatureList();
            return(dependency);
        }
        public void GetFeatureList()
        {
            HttpClient client   = WebApiServiceLogic.CreateClient(ServiceType.CentralizeWebApi);
            var        response = client.GetAsync("api/Product/ProductDependency").Result;

            if (response.IsSuccessStatusCode)
            {
                var jsonData = response.Content.ReadAsStringAsync().Result;
                ProductDependency dependencyObj = JsonConvert.DeserializeObject <ProductDependency>(jsonData);
                ViewBag.Categories = dependencyObj.Categories;
                ViewBag.Features   = dependencyObj.Features;
            }
            else
            {
                ViewBag.Categories = new List <ProductCategory>();
                ViewBag.Features   = new List <Feature>();
            }
        }