private void btnExport_Click(object sender, EventArgs e)
        {
            SaveFileDialog dialog = new SaveFileDialog();

            dialog.Filter = "Excel文件|*.xls";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                StringBuilder builder = new StringBuilder();
                builder.Append(MethodName.SdQmTable);
                builder.Append(" ");
                builder.Append(Path.GetDirectoryName(_filePath));
                builder.Append(" ");
                builder.Append(dialog.FileName);
                string result = RunExeHelper.RunMethodExit(builder.ToString());
                //输出字符串过多!
                if (result.Contains("导出完成"))
                {
                    MsgBox.ShowInfo("导出完成!");
                    System.Diagnostics.Process.Start("Explorer.exe", Path.GetDirectoryName(dialog.FileName));
                }
                else
                {
                    MsgBox.ShowInfo(result);
                }
            }
        }
Beispiel #2
0
        private void bgwCaculate_DoWork(object sender, DoWorkEventArgs e)
        {
            CvCure        cv      = e.Argument as CvCure;
            StringBuilder builder = new StringBuilder();

            builder.Append(MethodName.ResearchCure);
            builder.Append(" ");
            builder.Append(cv.X);
            builder.Append(" ");
            builder.Append(cv.Cv);
            builder.Append(" ");
            builder.Append(cv.Cs);
            builder.Append(" ");
            builder.Append("c3-" + cv.State + "-" + cv.Time);
            e.Result = RunExeHelper.RunMethodExit(builder.ToString());
        }
Beispiel #3
0
 /// <summary>
 /// 概率反查
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         //反查值
         if (numQm.Value == 0)
         {
             StringBuilder builder = new StringBuilder();
             builder.Append(MethodName.ResearchCure);
             builder.Append(" ");
             builder.Append(numX.Value.ToString());
             builder.Append(" ");
             builder.Append(numCv.Value.ToString());
             builder.Append(" ");
             builder.Append(numCs.Value.ToString());
             builder.Append(" ");
             builder.Append("c1-" + numkik.Value);
             string result = RunExeHelper.RunMethodExit(builder.ToString());
             numQm.Value = Convert.ToDecimal(result);
         }
         else if (numkik.Value == 0)
         {
             StringBuilder builder = new StringBuilder();
             builder.Append(MethodName.ResearchCure);
             builder.Append(" ");
             builder.Append(numX.Value.ToString());
             builder.Append(" ");
             builder.Append(numCv.Value.ToString());
             builder.Append(" ");
             builder.Append(numCs.Value.ToString());
             builder.Append(" ");
             builder.Append("c2-" + numQm.Value);
             string result = RunExeHelper.RunMethodExit(builder.ToString());
             numkik.Value = Convert.ToDecimal(result);
         }
         else
         {
             MsgBox.ShowInfo("请将需要反查的值设置为0");
         }
     }
     catch (Exception ex)
     {
         MsgBox.ShowError(ex.Message);
     }
 }