Exemple #1
0
        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);
        }
Exemple #2
0
		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);
		}