Ejemplo n.º 1
0
        public JsonResult Delete(int id)
        {
            var model = _buttonService.GetModel(id);

            if (model == null)
            {
                return(Json(new ResultInfo()
                {
                    ErrorNo = -1, ErrorMsg = ResWarning.Warn_No_Data
                }));
            }

            if (_buttonService.Delete(model))
            {
                return(Json(new ResultInfo()
                {
                    ErrorNo = 0, ErrorMsg = ResSuggest.DeleteSuccess
                }));
            }
            else
            {
                return(Json(new ResultInfo()
                {
                    ErrorNo = -1, ErrorMsg = ResSuggest.DeleteFail
                }));
            }
        }
Ejemplo n.º 2
0
 public async Task <IActionResult> Delete(int id)
 {
     if (await _btnService.Delete(id))
     {
         return(NoContent());
     }
     throw new Exception("Error deleting the Button");
 }
Ejemplo n.º 3
0
 public Task <IResultModel> Delete([BindRequired] Guid id)
 {
     return(_service.Delete(id));
 }
Ejemplo n.º 4
0
        public ActionResult Delete(int[] ids)
        {
            var result = buttonService.Delete(ids);

            return(Json(result));
        }