private static ExecutionContext GetContextFromUser() { bool bTryAgain = true; ExecutionContext oContext = null; while (bTryAgain && oContext == null) { using (UI.DBSelectionForm oDBSelect = new UI.DBSelectionForm()) { bTryAgain = (oDBSelect.ShowDialog() == DialogResult.OK); if (bTryAgain) { try { oContext = ExecutionContext.Create(oDBSelect.SelectedConnectionDetails); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } } } return(oContext); }
private static ExecutionContext GetContextFromUser() { bool bTryAgain = true; ExecutionContext oContext = null; while (bTryAgain && oContext == null) { using (UI.DBSelectionForm oDBSelect = new UI.DBSelectionForm()) { bTryAgain = (oDBSelect.ShowDialog() == DialogResult.OK); if (bTryAgain) { try { oContext = ExecutionContext.Create(oDBSelect.SelectedConnectionDetails); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } } } return (oContext); }