Ejemplo n.º 1
0
        protected void CreateCompressUpload()
        {
            try
            {
                FeedOptions   options  = GetPostedOptions();
                List <string> messages = new List <string>();
                feedProvider = new ShoppingComFeed();
                // handle using asynchronous way
                if (feedOperationStatus == null)
                {
                    feedOperationStatus = feedProvider.FeedOperationStatus;
                    SetApplicationVariable(KeyFeedStatus, feedOperationStatus);
                }

                feedProvider.BeginCreateCompressUploadFeed(options, new AsyncCallback(this.EndAsynFeedOperationCallBack), "");
                feedOperationStatus.Messages.Add("Creating  feed File.");
                feedOperationStatus.StatusMessage = "Creating feed File.";
                feedOperationStatus.Percent       = 0;
                ProgressBar1.ProgressText         = "Creating feed File.";
                ProgressBar1.Value = 0;
                FeedCreationProgressPanel.Visible = true;
                FeedInputPanel.Visible            = false;
                Timer1.Enabled = true;
            }
            catch (Exception exp)
            {
                ProgressBar1.ProgressText = "Error creating, compressing uploading feed file.";
                feedOperationStatus.Messages.Add("Error occured : " + exp.ToString() + " " + exp.Message);
                ProgressBar1.Value = 100;
                Timer1.Enabled     = false;
            }
        }
Ejemplo n.º 2
0
        protected void UploadCompressed()
        {
            FeedOptions options = GetPostedOptions();

            feedProvider = new ShoppingComFeed();
            bool success = feedProvider.UploadCompressedFeed(options);

            UpdateMessagePanel(feedProvider.FeedOperationStatus.Success, feedProvider.FeedOperationStatus.Messages);
        }