示例#1
0
        public void CloseAmazonListing(AmazonSyncModel model)
        {
            AmazonProgressBarHelper.Clean(model.Task);

            var amazonListing = _amazonListingService.Get(model.Id);

            if (amazonListing != null)
            {
                _amazonLogService.Add(AmazonLogType.Listings, AmazonLogStatus.Stage, null, null, AmazonApiSection.Feeds, null, null, amazonListing,
                                      null, "Preparing request to close Amazon Listing");
                AmazonProgressBarHelper.Update(model.Task, "Push", "Preparing request to close Amazon Listing", 100, 0);

                _closeAmazonListingService.CloseAmazonListing(model, amazonListing);

                AmazonProgressBarHelper.Update(model.Task, "Push", "Amazon Listing successfully closed",
                                               100, 100);
            }

            else
            {
                AmazonProgressBarHelper.Update(model.Task, "Push", "No listing to close", null, null);
            }

            AmazonProgressBarHelper.Update(model.Task, "Completed", "Completed", 100, 100);
        }
示例#2
0
        public void SyncAmazonListings(AmazonSyncModel model)
        {
            AmazonProgressBarHelper.Clean(model.Task);

            var amazonListingGroup = _amazonListingGroupService.Get(model.Id);

            if (amazonListingGroup != null)
            {
                _amazonLogService.Add(AmazonLogType.Listings, AmazonLogStatus.Stage, null, null, AmazonApiSection.Feeds, null, null, null,
                                      amazonListingGroup, "Preparing listings for Amazon");
                AmazonProgressBarHelper.Update(model.Task, "Push", "Preparing listings for Amazon", 100, 0);

                _exportAmazonListingService.SubmitProductFeeds(model, amazonListingGroup);

                AmazonProgressBarHelper.Update(model.Task, "Push", "Amazon Listings successfully synced", 100, 100);
            }

            else
            {
                AmazonProgressBarHelper.Update(model.Task, "Push", "No listing to sync", null, null);
            }

            AmazonProgressBarHelper.Update(model.Task, "Completed", "Completed", 100, 100);
        }