private void button1_Click(object sender, EventArgs e)
        {
            var saveFileDialog = new SaveFileDialog();

            saveFileDialog.DefaultExt = ".xlsx";
            saveFileDialog.Filter     = "xlsx|*.xlsx";
            strFileName             = "System  Info" + "_" + DateTime.Now.ToString("yyyyMMddHHmmss");
            saveFileDialog.FileName = strFileName;
            if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                strFileName = saveFileDialog.FileName.ToString();
            }
            else
            {
                return;
            }


            instertext = textBox1.Text;
            try
            {
                InitialBackGroundWorker();
                bgWorker.DoWork += new DoWorkEventHandler(NEWReadclaimreportfromServer);

                bgWorker.RunWorkerAsync();

                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();

                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                    if (Result != null && Result.Count > 0)
                    {
                        this.label2.Text = "总计/条:" + Result.Count.ToString();
                    }


                    string ZFCEPath = Path.GetDirectoryName(strFileName);;
                    System.Diagnostics.Process.Start("explorer.exe", ZFCEPath);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("存在异常:" + ex.Message);

                return;

                throw ex;
            }
        }
Beispiel #2
0
        private void toolStripButton10_Click(object sender, EventArgs e)
        {
            toolStripLabel2.Text = "读取中,请耐心等待...(打开快慢受网络情况影响)";

            this.webBrowser1.Navigate(ZFCEPath);

            toolStripLabel2.Text = "读取完成,马上显示";

            return;


            try
            {
                InitialBackGroundWorker();
                Control.CheckForIllegalCrossThreadCalls = false;
                bgWorker.DoWork += new DoWorkEventHandler(CheckBankCharge);

                bgWorker.RunWorkerAsync();
                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();
                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }


            // Inputexcel(null);

            //  webBrowser1 = new WebBrowser();

            //Object refmissing = System.Reflection.Missing.Value;



            //object axWebBrowser = this.webBrowser1.ActiveXInstance;
        }
        private void toolStripButton1_Click_1(object sender, EventArgs e)
        {
            axFramerControl1_is = 1;

            this.tabControl1.SelectedIndex = 1;
            toolStripLabel1.Text           = "读取中,请耐心等待...(打开快慢受网络情况影响)";


            Init(ZFCEPath);
            //this.axFramerControl1.Open(ZFCEPath);
            toolStripLabel1.Text           = "读取完成,马上显示";
            this.tabControl1.SelectedIndex = 1;

            MessageBox.Show("读取完成,请查看", "信息", MessageBoxButtons.OK, MessageBoxIcon.Information);

            return;

            try
            {
                InitialBackGroundWorker();
                Control.CheckForIllegalCrossThreadCalls = false;
                bgWorker.DoWork += new DoWorkEventHandler(CheckBankCharge);

                bgWorker.RunWorkerAsync();
                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();
                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                    this.tabControl1.SelectedIndex = 1;
                    this.WindowState = FormWindowState.Maximized;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            folderpath = textBox2.Text;
            try
            {
                InitialBackGroundWorker();
                bgWorker.DoWork += new DoWorkEventHandler(NEWReadclaimreportfromServer);

                bgWorker.RunWorkerAsync();

                // 启动消息显示画面
                frmMessageShow = new frmMessageShow(clsShowMessage.MSG_001,
                                                    clsShowMessage.MSG_007,
                                                    clsConstant.Dialog_Status_Disable);
                frmMessageShow.ShowDialog();

                // 数据读取成功后在画面显示
                if (blnBackGroundWorkIsOK)
                {
                    if (Result != null && Result.Count > 0)
                    {
                        this.label2.Text = "总计/条:" + Result.Count.ToString();
                    }



                    string ZFCEPath = Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Results"), "");
                    System.Diagnostics.Process.Start("explorer.exe", ZFCEPath);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("异常:" + ex);

                return;

                throw ex;
            }
        }