Esempio n. 1
0
        void StartDownload()
        {
            PromptForm prompt = new PromptForm();

            prompt.Owner = this;
            prompt.Show(this);

            StartDownloadProductInfos(prompt);
        }
Esempio n. 2
0
        private void PreparationQueryForm_Load(object sender, EventArgs e)
        {
            PromptForm prompt = new PromptForm();

            prompt.MaxLine = 2;
            prompt.Owner   = this;
            prompt.Show(this);
            StartDownloadPrepareHistory(prompt);
        }
Esempio n. 3
0
        void StartDownload()
        {
            PromptForm prompt = new PromptForm();

            prompt.MaxLine = 2;
            prompt.Owner   = this;
            prompt.Show(this);

            StartDownloadDhlOrders(prompt);
        }
Esempio n. 4
0
        private void StartDownloadRefunds()
        {
            PromptForm prompt = new PromptForm();

            prompt.Owner = this;
            prompt.Show(this);
            prompt.AddMessage("正在下载退货记录...");

            WebClient wc = new WebClient();

            wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(wc_DownloadProgressChanged);
            wc.DownloadDataCompleted   += new DownloadDataCompletedEventHandler(wc_DownloadDataCompleted);
            wc.DownloadDataAsync(new Uri(Common.URL_REFUND), prompt);
        }
Esempio n. 5
0
        private void tsbtnImportOrders_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            try
            {
                if (null != _orders)
                {
                    DialogResult dr = MessageBox.Show(
                        this,
                        "重新导入订单将会覆盖未同步到服务器的数据(例如出单状态).\n是否继续导入?",
                        this.Text,
                        MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
                    if (DialogResult.No == dr)
                    {
                        return;
                    }
                }

                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Filter       = "XML Files (*.xml)|*.xml";
                ofd.Multiselect  = false;
                ofd.ShowReadOnly = false;

                if (DialogResult.OK == ofd.ShowDialog(this))
                {
                    PromptForm dof = new PromptForm();
                    dof.Owner = this;
                    dof.AddMessage("正在解析订单...");
                    dof.Show();
                    Application.DoEvents();

                    XmlDocument doc = new XmlDocument();
                    doc.Load(ofd.FileName);
                    LoadOrdersFormXmlStream(doc.OuterXml, dof);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString(), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
Esempio n. 6
0
        private void StockStatForm_Shown(object sender, EventArgs e)
        {
            //HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(string.Format(MainForm.URL_DATA_CENTER, "getstockhistorysh"));
            //request.Method = "GET";
            //request.ContentType = "text/xml";
            //WebResponse response = request.GetResponse();
            //StreamReader reader = new StreamReader(response.GetResponseStream());
            ////Trace.WriteLine(reader.ReadToEnd());
            ////Trace.WriteLine("");

            PromptForm prompt = new PromptForm();

            prompt.MaxLine = 2;
            prompt.Owner   = this;
            prompt.Show(this);

            StartDownloadProductInfos(prompt);
        }
Esempio n. 7
0
        private void StockStatForm_Shown(object sender, EventArgs e)
        {
            //HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(string.Format(MainForm.URL_DATA_CENTER, "getstockhistorysh"));
            //request.Method = "GET";
            //request.ContentType = "text/xml";
            //WebResponse response = request.GetResponse();
            //StreamReader reader = new StreamReader(response.GetResponseStream());
            ////Trace.WriteLine(reader.ReadToEnd());
            ////Trace.WriteLine("");

            PromptForm prompt = new PromptForm();

            prompt.Owner = this;
            prompt.Show(this);
            prompt.AddMessage("正在下载出入库数据...");

            WebClient wc = new WebClient();

            wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(wc_DownloadProgressChanged);
            wc.DownloadDataCompleted   += new DownloadDataCompletedEventHandler(wc_DownloadDataCompleted);
            wc.DownloadDataAsync(new Uri(Common.URL_STOCK_SH), prompt);
        }