Пример #1
0
        public ActionResult Delete(Guid id)
        {
            var result  = Result.Success;
            var message = "";

            if (id != null)
            {
                var count = service.GetByToCommentsId(id);
                if (count == 0)
                {
                    var info = service.GetById(id);
                    service.DeleteGoogleProduct(info);
                    result  = Result.Success;
                    message = "操作成功";
                }
                else if (count > 0)
                {
                    result  = Result.Warning;
                    message = "子级下含有数据,不能操作!";
                }
            }
            return(Json(new AjaxResult()
            {
                Result = result, Message = message
            }));
        }