예제 #1
0
 public static void DeleteArticle(string strID)
 {
     UploadBLL.DeleteUploadByRecordID(TableID, strID);
     dal.DeleteArticle(strID);
     CacheHelper.Remove(cacheKey);
     FirstArticleDc = null;
 }
예제 #2
0
        public ActionResult DeleteArticle(int id)
        {
            try
            {
                if (Session["person"] == null)
                {
                    return(RedirectToAction("Index", "Login"));
                }

                Client cli = (Client)Session["person"];
                ViewBag.cli = cli;

                s1.DeleteArticle(id);
                return(RedirectToAction("GestionArticle"));
            }
            catch (Exception)
            {
                return(View("Error"));
            }
        }
예제 #3
0
 public JsonResult DeleteArticle(string articleIds)
 {
     CheckPermission();
     using (var result = new ResponseResult <object>())
     {
         if (articleIds != null)
         {
             var aryStringArticleId = articleIds.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
             var aryIntArticleId    = new int[aryStringArticleId.Length];
             for (var i = 0; i < aryStringArticleId.Length; i++)
             {
                 aryIntArticleId[i] = int.Parse(aryStringArticleId[i]);
             }
             result.Entity = _articleService.DeleteArticle(aryIntArticleId);
         }
         else
         {
             result.IsSuccess         = false;
             result.State.Id          = (int)ResponseStatusCode.InvalidArgument;
             result.State.Description = ResponseStatusCode.InvalidArgument.GetDescription();
         }
         return(new JsonResultEx(result));
     }
 }
예제 #4
0
 public static int DeleteArticle(int Art_id)
 {
     return(iarticle.DeleteArticle(Art_id));
 }
예제 #5
0
 public ActionResult <bool> DeleteArticle([FromBody] int id)
 {
     return(_article.DeleteArticle(id));
 }