Ejemplo n.º 1
0
        public ActionResult GetProductCatalog(int id)
        {
            Product_Category productCatalog = _productManager.GetProductCatalog(id);

            if (productCatalog == null)
            {
                return(FailedResult("指定的数据不存在。"));
            }

            Product_CategoryDto productCatalogDto = Mapper.Map <Product_CategoryDto>(productCatalog);

            return(DataResult(productCatalogDto));
        }
Ejemplo n.º 2
0
        public ActionResult UpdateProductCatalog()
        {
            Product_CategoryDto args = RequestArgs <Product_CategoryDto>();

            if (args == null)
            {
                return(FailedResult("参数无效。"));
            }

            Product_Category productCatalog = Mapper.Map <Product_Category>(args);

            NormalResult result = _productManager.UpdateProductCatalog(productCatalog);

            return(ApiResult(result.Successful, result.Message));
        }