public int[] SendProducts(Article[] products, bool isStage, string userName, int userId, bool localize, bool autopublish, string[] forcedСhannels = null) { var token = CallMethod("SendProducts", "isStage = {0}", isStage); var result = _notificationService.SendProducts(products, isStage, userName, userId, localize, autopublish, forcedСhannels); EndMethod(token); return(result); }
public int Publish(ProductItem item, bool localize) { var isLive = !item.IsUnited; if (item.PublishAction == PublishAction.Publish) { var product = _productService.GetProduct(item.ProductId, item.DefinitionId, isLive); _notificationService.SendProducts(new[] { product }, isLive, UserName, UserId, localize, true); } else if (item.PublishAction == PublishAction.Delete) { var product = _productService.GetAbsentProduct(item.ProductId, item.DefinitionId, isLive, item.TypeOld); _notificationService.DeleteProducts(new[] { product }, UserName, UserId, true); } return(item.ProductId); }