示例#1
0
        public async Task <IActionResult> UpdateCategory(int id, string name)
        {
            var result = await goodsBs.ListGoodCategory();

            var cate = (result.Data as List <GoodCategory>).FirstOrDefault(x => x.Id == id);

            cate.Name = name;
            var nReesult = await goodsBs.UpdateCategory(cate);

            return(Json(nReesult));
        }
示例#2
0
        public async Task <IActionResult> GetListGoodCategory()
        {
            var result = await goodsBs.ListGoodCategory();

            return(Json(result));
        }