Exemple #1
0
        public IList <CreatedArticle> CreateArticles(IList <ArticleForCreate> articles)
        {
            var list             = new List <CreatedArticle>();
            var connection       = _vismaConnection.Open();
            var articleComponent = connection.GetBusinessComponent(GLOBAL_Components.BC_Article);

            _colZUsrPimSku = articleComponent.bcGetTableObjectName(ZUsrFields.ArticleZUsrPimSku);

            foreach (var article in articles)
            {
                if (ArticleExists(article.PimSku, articleComponent))
                {
                    Log.ForCurrent.InfoFormat("Article with PIM SKU '{0}' already exists and will not be created.", article.PimSku);
                    continue;
                }

                var articleNo = CreateArticle(article, articleComponent);
                if (!string.IsNullOrEmpty(articleNo))
                {
                    list.Add(new CreatedArticle(articleNo, article.PimSku));
                }
            }

            System.Runtime.InteropServices.Marshal.ReleaseComObject(articleComponent);
            return(list);
        }
Exemple #2
0
        private void Initialize()
        {
            var connection = _vismaConnection.Open();

            _articleServerComponent = (ArticleServerComponent)connection.bcBusinessComponent[(int)GLOBAL_Components.BC_Article];
            _articleServerComponent.bcEstablishData();
            _articleServerComponent.bcBindData();

            _articleNoColumnName = _articleServerComponent.bcGetTableObjectName((int)Article_Properties.ART_ArticleNo);

            _customerComponent = connection.GetBusinessComponent(GLOBAL_Components.BC_Customer);
        }
 private static void InitializeCustomVismaFields(IVismaConnection vismaConnection)
 {
     ZUsrFields.Initialize(vismaConnection.Open());
 }
Exemple #4
0
 private static void InitializeCustomVismaFields(IVismaConnection vismaConnection)
 {
     ZUsrFields.Initialize(vismaConnection.Open());
 }