示例#1
0
        public async Task <ProductsTypesAllAndThis> GetPropductParentTypesAsync()
        {
            ProductsTypesAllAndThis result           = new ProductsTypesAllAndThis();
            List <ProductTypeMini>  productTypeMinis = await GetProductTypeMinisAsync();

            result.SetProductTypes(productTypeMinis);
            return(result);
        }
示例#2
0
        public async Task <ProductsTypesAllAndThis> GetProductTypeThisAndParentsAsync(int id)
        {
            ProductsTypesAllAndThis result           = new ProductsTypesAllAndThis();
            List <ProductTypeMini>  productTypeMinis = await GetProductTypeMinisAsync();

            result.SetProductTypes(productTypeMinis, id);
            string keyName       = "ProductTypeMini";
            var    productsTypes = _cacheService.Get <List <ProductTypeMini> >(keyName);

            if (productsTypes != null)
            {
                result.ProductType = productsTypes.Where(preProductTypes => preProductTypes.Id == id).First();
            }
            else
            {
                result.ProductType = await _fcdStoreContext.GetProductsTypeAsync(id);
            }
            return(result);
        }
示例#3
0
        public async Task <IActionResult> NewProductsTypes()
        {
            ProductsTypesAllAndThis productsTypesAllAndThis = await _dataProcessingConveyor.GetPropductParentTypesAsync();

            return(View(productsTypesAllAndThis));
        }