Ejemplo n.º 1
0
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            bool   blnProceed = false;
            string strMessage = null;

            if (true == (txtMySQLHost.Text.Length == 0))
            {
                strMessage = "Please enter MySQL host name";
            }
            else if (true == (txtMySQLPort.Text.Length == 0))
            {
                strMessage = "Please enter MySQL port number";
            }
            else if (true == (txtMySQLUserName.Text.Length == 0))
            {
                strMessage = "Please enter MySQL user name";
            }
            else
            {
                blnProceed = true;
            }
            if (blnProceed == true)
            {
                //create the dsn
                Create_DSN();
                //setup the progress form
                frmProgress frmProgressForm = new frmProgress(txtJCMSDb.Text, txtMySQLUserName.Text, txtMySQLPwd.Text, txtMySQLPort.Text, txtMySQLHost.Text, textBoxDatabaseName.Text, chkDisable.Checked);
                frmProgressForm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show(strMessage);
            }
        }
Ejemplo n.º 2
0
        private void btnOk_Click(object sender, System.EventArgs e)
        {
            bool blnProceed = false;
            string strMessage = null;

            if (true == (txtMySQLHost.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL host name";
            }
            else if (true == (txtMySQLPort.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL port number";
            }
            else if (true == (txtMySQLUserName.Text.Length == 0))
            {
                    strMessage = "Please enter MySQL user name";
            }
            else
            {
                    blnProceed = true;
            }
            if (blnProceed == true)
            {

                //create the dsn
                Create_DSN();
                //setup the progress form
                frmProgress frmProgressForm = new frmProgress(txtJCMSDb.Text, txtMySQLUserName.Text, txtMySQLPwd.Text, txtMySQLPort.Text, txtMySQLHost.Text, textBoxDatabaseName.Text, chkDisable.Checked);
                frmProgressForm.Show();
                this.Hide();
            }
            else
            {
                 MessageBox.Show(strMessage);
            }
        }