Ejemplo n.º 1
0
        private void Form_AddDatabase_MySql_Load(object sender, EventArgs e)
        {
            Common.Config_Servers CS = new Common.Config_Servers();
            csList = CS.GetAll().Where(p => p.Type == this.dbType.ToString());
            foreach (var li in csList)
            {
                this.comboBox_mysql_server.Items.Add(li.ServerName);
            }

            Model.ConfigServers cs = CS.GetDefault(this.dbType);
            if (cs != null)
            {
                this.comboBox_mysql_server.Text = cs.ServerName;
                this.textBox_mysql_pwd.Text     = cs.Pwd;
                this.textBox_mysql_uid.Text     = cs.Uid;
                this.checkBox1.Checked          = !cs.Pwd.IsNullOrEmpty();
            }
        }
        private void Form_AddDatabase_SqlServer_Load(object sender, EventArgs e)
        {
            this.label8.Text = this.dbType.ToString();
            Common.Config_Servers CS=new Common.Config_Servers();
            csList = CS.GetAll().Where(p => p.Type == this.dbType.ToString());
            foreach (var li in csList)
            {
                this.sqlserver_server.Items.Add(li.ServerName);
            }

            Model.ConfigServers cs = CS.GetDefault(this.dbType);
            if (cs != null)
            {
                this.sqlserver_server.Text = cs.ServerName;
                this.sqlserver_pwd.Text = cs.Pwd;
                this.sqlserver_uid.Text = cs.Uid;
                this.checkBox1.Checked = !cs.Pwd.IsNullOrEmpty();
            }
        }