Exemplo n.º 1
0
        public static SqlConnection ShowConnectDialog()
        {
            var dlg    = new ConnectDialog();
            var result = dlg.ShowDialog();

            return(result.HasValue & result.Value ? dlg.Connection : null);
        }
Exemplo n.º 2
0
        private void CreateConnection_Click(object sender, RoutedEventArgs e)
        {
            var connection = ConnectDialog.ShowConnectDialog();

            if (connection != null)
            {
                warehouse = new Warehouse(connection);
            }
        }