コード例 #1
0
 internal void UpdateConn( ConnectionNode conn )
 {
     this.Connection = conn;
     this.txtConnectionString.Text = conn.ConncetionString;
     this.txtName.Text = conn.Name;
     this.cmbDbType.SelectedValue = conn.DbType.ToString();
 }
コード例 #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (this.Connection == null)
     {
         this.Connection = new ConnectionNode();
     }
     this.Connection.Name = this.txtName.Text.Trim();
     this.Connection.ConncetionString = this.txtConnectionString.Text.Trim();
     this.Connection.DbType = ((KeyValuePair<DatabaseType, string>)this.cmbDbType.SelectedItem).Key;
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.Close();
 }
コード例 #3
0
        public void Reset(System.Collections.IEnumerable connectionTypes)
        {
            this.Children.Clear();

            foreach (ConnectionType connType in connectionTypes)
            {
                ConnectionNode connNode = new ConnectionNode();
                connNode.DataInfo = connType;
                connNode.Parent   = this;

                GlobalService.ModelManager.RegistDb(connType);
            }
        }
コード例 #4
0
        public void Reset(System.Collections.IEnumerable connectionTypes)
        {
            this.Children.Clear();

            foreach (ConnectionType connType in connectionTypes)
            {
                ConnectionNode connNode = new ConnectionNode();
                connNode.DataInfo = connType;
                connNode.Parent = this;

                GlobalService.ModelManager.RegistDb(connType);

            }
        }
コード例 #5
0
        void NewConnection_Click(object sender, EventArgs args)
        {
            ConnectionNode child = new ConnectionNode();

            child.Text=child.Name = Guid.NewGuid().ToString();
            child.DataInfo =  DBGlobalService.CurrentProject.CreateConnectionType();
            ConnectionEditFrm frm = new ConnectionEditFrm();
            frm.UpdateConn(child);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                child.Text = child.Name;
                child.Parent = this;
                this.OnRefresh(sender, args);
            }
        }
コード例 #6
0
        void NewConnection_Click(object sender, EventArgs args)
        {
            ConnectionNode child = new ConnectionNode();

            child.Text     = child.Name = Guid.NewGuid().ToString();
            child.DataInfo = DBGlobalService.CurrentProject.CreateConnectionType();
            ConnectionEditFrm frm = new ConnectionEditFrm();

            frm.UpdateConn(child);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                child.Text   = child.Name;
                child.Parent = this;
                this.OnRefresh(sender, args);
            }
        }