private void mnuRemove_Click(object sender, EventArgs e) { BioSeqRemove frm = new BioSeqRemove(); DialogResult rc = frm.ShowDialog(); if (rc == DialogResult.OK) // then the config has the specs { Cursor.Current = Cursors.WaitCursor; //int ret = SeqDBHelper.RemoveSample(); // Parameters are in appsettings. WSLProxyResponse WSLResponse = ServiceCallHelper.RemoveSample(AppConfigHelper.LoggedOnUser, AppConfigHelper.JsonConfig()); // Parameters are in appsettings. ServiceCallHelper.LoadConfig(AppConfigHelper.LoggedOnUser); // To retrieve StandardOutput and LastError. Cursor.Current = Cursors.Default; if (WSLResponse.ExitCode == 0) { MessageBox.Show(AppConfigHelper.RemoveSampleID() + " successfully removed.", "Success", MessageBoxButtons.OK); AppConfigHelper.RemoveSample(string.Empty); // So we don't prompt for it again. ReloadSampleIDs(); // Reload list without sample ID. } else { MessageBox.Show("Remove completed with error code " + WSLResponse.ExitCode.ToString() + "." + Environment.NewLine + Environment.NewLine + AppConfigHelper.StandardOutput + Environment.NewLine + AppConfigHelper.LastError, "Error", MessageBoxButtons.OK); } } }