public HttpResponseMessage Delete(int Id) { _faqService.Delete(Id); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse())); }
public ActionResult Delete(int id) { faqService.Delete(id); faqService.Commit(); SuccessMessage(FormMessages.DeleteSuccess); return(RedirectToAction("Index")); }
public async Task <IActionResult> Delete(string id) { var result = await _faqService.Delete(CurrentUser.TenantId, id); if (result.Code <= 0) { return(BadRequest(result)); } return(Ok(result)); }
public void Delete(Guid id, string searchQueryId = null) { using (var transaction = ContextManager.NewTransaction()) { faqService.Delete(id); transaction.Commit(); } RefreshGridItem(searchQueryId, null, model => model.Id == id); }
public IActionResult Delete(string id) { var entity = _manager.GetByPrimaryKey(id); if (entity == null) { return(NoResult()); } _manager.Delete(entity); return(ResponseJson(entity)); }
public HttpResponseMessage Delete(int id) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } SucessResponse response = new SucessResponse(); _faqService.Delete(id); return(Request.CreateResponse(response)); }
public HttpResponseMessage Delete(int id) { try { _faqService.Delete(id); return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse())); } catch (Exception ex) { _errorService.LogError(ex); return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); } }
public ActionResult Delete(int id) { Faq faq = faqService.Get(id); if (faq != null) { faqService.Delete(faq); faqService.Commit(); SuccessMessage(FormMessages.DeleteSuccess); } return(RedirectToAction("Index")); }
public ActionResult <SuccessResponse> Delete(int id) { int responseCode = 200; BaseResponse responseData = null; try { _service.Delete(id); responseData = new SuccessResponse(); } catch (Exception exception) { responseCode = 500; responseData = new ErrorResponse(exception.Message); base.Logger.LogError(exception.ToString()); } return(StatusCode(responseCode, responseData)); }
public RedirectToRouteResult Delete_POST(Faq item) { _faqService.Delete(item); return(RedirectToAction("Edit", "Webpage", new { id = item.ShowFaqs.Id })); }
public ActionResult Delete(int id) { var result = _faqService.Delete(id); return(Json(Server.FormatResultToJson(result))); }