public static bool Delete(int questionId) { bool flag = dal.Delete(questionId); if (flag) { RemoveFavoriteById(questionId.ToString()); } return(flag); }
public async Task <IActionResult> Delete(int id) { var question = _questionImplementation.GetById(id); var CategoryId = question.Category.CategoryId; await _questionImplementation.Delete(id); return(RedirectToAction("Index", "Category", new { id = CategoryId })); }
/// <summary> /// 删除题库 /// </summary> /// <returns></returns> public JsonResult DeleteSelectQuestions() { string delStr = Request.QueryString["ids"]; if (EQuestionBL.Delete(delStr)) { return(Json(new { result = 1, content = CommonLanguage.Common_DeleteSuccess }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { result = 0, content = CommonLanguage.Common_AddFailed }, JsonRequestBehavior.AllowGet)); } }
public IHttpActionResult Delete(int id) { _adapter.Delete(id); return(Ok()); }
public async Task <IActionResult> Delete(int id) { await _questionImplementation.Delete(id); return(RedirectToAction("Index", "Home")); }