Exemple #1
0
        private void wpselectdb_ShowFromNext(object sender, EventArgs e)
        {
            m_conn = new GenericSqlStoredConnection();
            m_conn.ConnectionString = m_builder.ConnectionString;
            m_conn.FactoryName      = m_factoryName;
            m_conn.DriverName       = m_driverName;

            commonConnectionEditFrame1.Connection = m_conn;
        }
Exemple #2
0
        public GenericConnEditor(GenericSqlStoredConnection conn)
        {
            InitializeComponent();

            m_conn = conn;
            DbProviderFactory factory = conn.GetFactory();

            m_builder = factory.CreateConnectionStringBuilder();
            m_builder.ConnectionString = conn.ConnectionString;

            SelectedObject = m_builder;
        }
Exemple #3
0
        public override bool Create(ITreeNode parent, string name)
        {
            GenericConnWizard wiz = new GenericConnWizard();

            wiz.ShowDialogEx();
            if (wiz.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                GenericSqlStoredConnection con = wiz.GetConnection();
                con.FileName = Path.Combine(parent.FileSystemPath, name + ".con");
                con.Save();
                return(true);
            }
            return(false);
        }