Esempio n. 1
0
        // OK
        private void siB_Ok_Click(object sender, EventArgs e)
        {
            WaitDialogForm frmWait = new WaitDialogForm("正在生成...", "提示信息");

            try
            {
                frmWait.Owner   = this;
                frmWait.TopMost = false;
                SampleAduit Aduit = new SampleAduit();
                if (cBEMethod.Text == "分层比率估计")
                {
                    if (Aduit.RatioPreprocessing(cBSamplePopu.Text, cBESample.Text, cBESamSurvey.Text, cBEPopuLayer.Text, cBESamLayer.Text, cBEPopuBasis.Text, cBESampleClassic.Text, cBExport.Text, cBESamBasis.Text, cBECunName.Text))
                    {
                        BLL.ProductMeta meta = new BLL.ProductMeta(cBExport.Text.TrimEnd(), "", "", "总体估计", "抽样和推算结果");
                        meta.WriteDocMeta();
                        BLL.ProductQuickView view = new BLL.ProductQuickView(cBExport.Text.TrimEnd());
                        view.Create();
                        MessageBox.Show("估算成功!");
                        ExportData.report = cBExport.Text;
                    }
                }
                else
                {
                    if (Aduit.ProbabilityProcessing(cBSamplePopu.Text, cBESample.Text, cBEPopuBasis.Text, cBEPopuLayer.Text, cBESamLayer.Text, cBESamBasis.Text, cBESamSurvey.Text, cBECunName.Text, cBExport.Text))
                    {
                        MessageBox.Show("估算成功!");
                        ExportData.report = cBExport.Text;
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                Log.WriteLog(typeof(frmSampleSimulation), ex);
            }
            finally
            {
                frmWait.Close();
                this.Close();
            }
        }
Esempio n. 2
0
        // OK
        private void siB_Ok_Click(object sender, EventArgs e)
        {
            frmWaitDialog frmWait = new frmWaitDialog("正在生成...", "提示信息");

            try
            {
                frmWait.Owner   = this;
                frmWait.TopMost = false;
                SampleAduit Aduit = new SampleAduit();
                if (cBEMethod.Text == "分层比率估计")
                {
                    if (Aduit.RatioPreprocessing(cBSamplePopu.Text, cBESample.Text, cBESamSurvey.Text, cBEPopuLayer.Text, cBESamLayer.Text, cBEPopuBasis.Text, cBESamCunName.Text, cBExport.Text, cBESamBasis.Text))
                    {
                        MessageBox.Show("估算成功!");
                        ExportData.report = cBExport.Text;
                    }
                }
                else
                {
                    if (Aduit.ProbabilityProcessing(cBSamplePopu.Text, cBESample.Text, cBEPopuBasis.Text, cBEPopuLayer.Text, cBESamLayer.Text, cBESamBasis.Text, cBESamSurvey.Text, cBESamCunName.Text, cBExport.Text))
                    {
                        MessageBox.Show("估算成功!");
                        ExportData.report = cBExport.Text;
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                Log.WriteLog(typeof(frmSampleSimulation), ex);
            }
            finally
            {
                frmWait.Close();
                this.Close();
            }
        }