Example #1
0
        public void PostDelete(int articleID)
        {
            int    _code    = 0;
            string _message = "删除文章失败";

            _code = _articleService.DeleteArticleByID(articleID);

            if (_code > 0)
            {
                _message = "删除文章成功";
            }
            else
            {
                _message = "对不起,文章失败!";
            }

            RenderText("{\"code\":\"" + _code + "\",\"message\":\"" + _message + "\"}");

            CancelLayout();
        }
Example #2
0
 /// <summary>
 /// 根据编号删除文章
 /// </summary>
 /// <param name="ArticleID"></param>
 /// <returns></returns>
 public static int DeleteArticleByID(int ArticleID)
 {
     return(ArticleService.DeleteArticleByID(ArticleID));
 }