public static string Process(string description, string value) { Form_AddMetricValue dlg = new Form_AddMetricValue(value); dlg.Description = description; if (dlg.ShowDialog() == DialogResult.OK) { // Escape any single quotes ' for SQL string text = dlg.textBox_Values.Text.Replace("'", "''"); return(text); } return(string.Empty); }
public static string[] Process(string description) { Form_AddMetricValue dlg = new Form_AddMetricValue(); dlg.Description = description; if (dlg.ShowDialog() == DialogResult.OK) { // Escape any single quotes ' for SQL string text = dlg.textBox_Values.Text.Replace("'", "''"); return(text.Split('\n')); } return(new string[] {}); }
public static string[] Process(string description, string[] values) { Form_AddMetricValue dlg = new Form_AddMetricValue(values); dlg.Description = description; if (dlg.ShowDialog() == DialogResult.OK) { // Escape any single quotes ' for SQL string text = dlg.textBox_Values.Text.Replace("'", "''"); return(text.Split('\n')); } // If not ok, then return the original list back return(values); }