Example #1
0
        public async Task <JsonResult> Delete(int Id)
        {
            try
            {
                if (Id == 0)
                {
                    return(Json(new AjaxResponse {
                        Success = false, Error = new ErrorInfo("Id为空"), Result = ""
                    }));
                }
                await documentAppService.DeleteDocument(Id);

                return(Json(new AjaxResponse {
                    Success = true, Result = ""
                }));
            }
            catch (Exception ex)
            {
                return(Json(new AjaxResponse {
                    Success = false, Result = ex.Message
                }));
            }
        }