public void DeleteByAdvContentId()
        {
            var model = _advContentInfoService.GetLast();

            if (model != null)
            {
                _advContentInfoService.Delete(model.Id);
            }
        }
Пример #2
0
        public ActionResult DeleteAdvContent(int id)
        {
            var model = new BaseReturnModel()
            {
                IsSuccess = false, ReturnMsg = "操作失败"
            };

            try
            {
                _advContentInfoService.Delete(id);
                model.IsSuccess = true;
                model.ReturnMsg = "删除完成";
            }
            catch (Exception ex)
            {
                model.IsSuccess = false;
                model.ReturnMsg = ex.Message;
            }

            return(Json(model));
        }