示例#1
0
        public static bool Delete(int questionId)
        {
            bool flag = dal.Delete(questionId);

            if (flag)
            {
                RemoveFavoriteById(questionId.ToString());
            }
            return(flag);
        }
示例#2
0
        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 }));
        }
示例#3
0
        /// <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));
            }
        }
示例#4
0
 public IHttpActionResult Delete(int id)
 {
     _adapter.Delete(id);
     return(Ok());
 }
示例#5
0
        public async Task <IActionResult> Delete(int id)
        {
            await _questionImplementation.Delete(id);

            return(RedirectToAction("Index", "Home"));
        }