public bool SaveItem(ITreeNodeContent node, ItemChanges changes) { if (!changes.HasFieldsChanged) { return(false); } var store = ProductCatalogGroup.Get(int.Parse(node.ItemId)); if (store == null) { string message = string.Format("Store with id: {0} not found for ITreeNodeContent. ", node.ItemId); _loggingService.Log <ProductCatalogGroupTemplateBuilder>(message); throw new InvalidDataException(message); } foreach (FieldChange fieldChange in changes.FieldChanges) { UpdateStoreValueFor(fieldChange, store, changes); } ObjectFactory.Instance.Resolve <IPipeline <ProductCatalogGroup> >("SaveProductCatalogGroup").Execute(store); return(true); }
public void AddFieldValues(ITreeNodeContent node, FieldList list, VersionUri version) { var store = ProductCatalogGroup.Get(int.Parse(node.ItemId)); if (store != null) { _baseProductCatalogGroupTemplate.AddBaseFieldValues(store, list, version); } }