예제 #1
0
 private void btnBackIV_Click_1(object sender, EventArgs e)
 {
     Form welcomeForm = new frmWelcome();
     welcomeForm.Owner = this;
     welcomeForm.Show();
     this.Hide();
 }
예제 #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (IsValidData())
            {
                string username = Convert.ToString(txtUsername.Text);
                string password = Convert.ToString(txtPassword.Text);
                try
                {
                    this.employeesTableAdapter.GetPassword(capstone_Project_FinalDataSet.Employees, username);
                    if (txtUsername.Text == usernameTextBox.Text)
                    {
                        if (password == passwordTextBox.Text)
                        {
                            Form welcomeForm = new frmWelcome();
                            welcomeForm.Owner = this;
                            welcomeForm.Show();
                            this.Hide();

                        }
                        else
                        {
                            MessageBox.Show("This username or password does not exist or is incorrect", "Invalid Login");
                            txtPassword.Clear();
                            txtPassword.Focus();
                            passwordTextBox.Clear();
                            usernameTextBox.Clear();
                        }
                    }
                    else
                    {
                        MessageBox.Show( "This username or password does not exist or is incorrect", "Invalid Login");
                        txtUsername.Clear();
                        txtPassword.Clear();
                        txtUsername.Focus();

                        passwordTextBox.Clear();
                        usernameTextBox.Clear();
                    }
                }
                catch (System.Exception ex)
                {
                    System.Windows.Forms.MessageBox.Show(ex.Message);
                }
            }
        }
예제 #3
0
 //////////////////////////////////////////////End Resp//////////////////////////////////////////////////////////////////////
 private void tsBtnBackNeuro_Click(object sender, EventArgs e)
 {
     Form welcomeForm = new frmWelcome();
     welcomeForm.Owner = this;
     welcomeForm.Show();
     this.Hide();
 }