Пример #1
0
 private void selectExam(string exam_id_str, string exam_type_no, string type_name_en)
 {
     if (int.Parse(exam_type_no) >= 10000)
     {
         if (Directory.Exists(Application.StartupPath + @"\plugin\" + type_name_en))
         {
             if (File.Exists(Application.StartupPath + @"\plugin\" + type_name_en + @"\" + type_name_en + ".exe"))
             {
                 System.Diagnostics.Process p = System.Diagnostics.Process.Start(Application.StartupPath + @"\plugin\" + type_name_en + @"\" + type_name_en + ".exe",
                                                                                 "/DBSrvIP:" + Settings.DBSrvIP
                                                                                 + " /DBSrvPort:" + Settings.DBSrvPort
                                                                                 + " /DBconnectID:" + Settings.DBconnectID
                                                                                 + " /DBconnectPw:" + Settings.DBconnectPw
                                                                                 + " /exam_id:" + exam_id_str
                                                                                 + " /operator_id:" + db_operator.operatorID);
             }
             else
             {
                 MessageBox.Show("[Plugin]" + FindingsEditor.Properties.Resources.FileNotExist, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         else
         {
             MessageBox.Show("[Plugin]" + FindingsEditor.Properties.Resources.FolderNotExist, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         EditFindings ef = new EditFindings(exam_id_str);
         ef.ShowDialog(this);
         ef.Dispose();
     }
     refreshDgv();
 }
Пример #2
0
 private void editExam(string exam_id_str, string exam_type_no, string type_name_en)
 {
     if (int.Parse(exam_type_no) >= 10000)
     {
         if (Directory.Exists(Application.StartupPath + @"\plugin\" + type_name_en))
         {
             if (File.Exists(Application.StartupPath + @"\plugin\" + type_name_en + @"\" + type_name_en + ".exe"))
             {
                 System.Diagnostics.Process p = System.Diagnostics.Process.Start(Application.StartupPath + @"\plugin\" + type_name_en + @"\" + type_name_en + ".exe",
                     "/DBSrvIP:" + Settings.DBSrvIP
                     + " /DBSrvPort:" + Settings.DBSrvPort
                     + " /DBconnectID:" + Settings.DBconnectID
                     + " /DBconnectPw:" + Settings.DBconnectPw
                     + " /exam_id:" + exam_id_str
                     + " /operator_id:" + db_operator.operatorID);
             }
             else
             { MessageBox.Show("[Plugin]" + Properties.Resources.FileNotExist, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
         }
         else
         { MessageBox.Show("[Plugin]" + Properties.Resources.FolderNotExist, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
     }
     else
     {
         EditFindings ef = new EditFindings(exam_id_str);
         ef.ShowDialog(this);
         ef.Dispose();
     }
 }