Exemple #1
0
        private void btnMySqlConnection_Click(object sender, EventArgs e)
        {
            string str = this.GetMySqlConnectionString(true);

            if (!string.IsNullOrEmpty(str))
            {
                Result result = DataBaseHelper.Test(DataBaseType.MySql, new DbConnectionOptions()
                {
                    ConnectionString = str
                });
                if (!result.IsSuccess)
                {
                    DbConnectionManager.SetResult((DbConnection)this.ParentForm, false, string.Empty);
                    MsgBox.Alert(result.Msg);
                }
                else
                {
                    DbConnectionManager.SetResult((DbConnection)this.ParentForm, true, str);
                    this.ParentForm.Close();
                }
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     DbConnectionManager.SetResult((DbConnection)this.ParentForm, false, string.Empty);
     this.ParentForm.Close();
 }
Exemple #3
0
 private void btnMySqlCancel_Click(object sender, EventArgs e)
 {
     DbConnectionManager.SetResult((DbConnection)this.ParentForm, true, string.Empty);
     this.ParentForm.Close();
 }