Beispiel #1
0
        public string DelCategory(string nId)
        {
            if (string.IsNullOrEmpty(nId))
            {
                return("没有找到要删除的数据,请检查");
            }
            Guid gId = Guid.Empty;

            if (!Guid.TryParse(nId, out gId))
            {
                return("当前行的主键ID不合法,请检查");
            }

            BLL.Category cBll   = new BLL.Category();
            int          effect = cBll.Delete(nId);

            if (effect > 0)
            {
                return("操作成功");
            }
            else
            {
                return("操作失败");
            }
        }
Beispiel #2
0
        public async Task <IActionResult> Delete([FromBody] int[] ids)
        {
            var bcategory = new BLL.Category(unitOfWork);

            await bcategory.Delete(ids);

            return(Json("Success!"));
        }