public JsonResult GetArticleCategory(long id) { var articleCategory = _iArticleCategoryService.GetArticleCategory(id); var model = new { id = id, name = articleCategory.Name, parentId = articleCategory.ParentCategoryId }; return(Json(model)); }
// private IResult CheckArticleCategoryExist(long categoryId) { var category = _articleCategoryService.GetArticleCategory(categoryId).Data; if (category == null) { return(new ErrorResult(Message.ArticleCategoryNotFound)); } return(new SuccessResult()); }
private string GetCateNameBySecond(long id) { var pid = _iArticleCategoryService.GetCategories().FirstOrDefault(c => c.Id.Equals(id)).ParentCategoryId; return(_iArticleCategoryService.GetArticleCategory(pid).Name); }