public static void DeleteArticle(string strID) { UploadBLL.DeleteUploadByRecordID(TableID, strID); dal.DeleteArticle(strID); CacheHelper.Remove(cacheKey); FirstArticleDc = null; }
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")); } }
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)); } }
public static int DeleteArticle(int Art_id) { return(iarticle.DeleteArticle(Art_id)); }
public ActionResult <bool> DeleteArticle([FromBody] int id) { return(_article.DeleteArticle(id)); }