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();
            }
        }
示例#2
0
 public static void AddServerToXml(Model.ConfigServers cs)
 {
     new Common.Config_Servers().Add(cs);
 }