Ejemplo n.º 1
0
 public void DeleteArticleToGroup(ArticleToGroup articleToGroup)
 {
     _articleToGroupRepository.Delete(articleToGroup);
     _cacheManager.RemoveByPattern(GROUPS_PATTERN_KEY);
     _cacheManager.RemoveByPattern(ARTICLETOGROUP_PATTERN_KEY);
 }
Ejemplo n.º 2
0
 public ActionResult ArticleGroupInsert(GridCommand command, ArticleModel.ArticleGroupModel model)
 {
     int articleId = model.ArticleId;
     int artileGroupId = int.Parse(model.ArticleGroup);
     if (_articleService.GetArticleToGroupsByArticleId(articleId, 0, 2147483647, true).FindArticleToGroup(artileGroupId, articleId) == null)
     {
         var articleToGroup = new ArticleToGroup
         {
             ArticleId = articleId,
             ArticleGroupId = artileGroupId,
             DisplayOrder = model.DisplayOrder
         };
         _articleService.InsertArticleToGroup(articleToGroup);
     }
     return ArticleGroupList(command, articleId);
 }