Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            HomePsi hp = new HomePsi();

            hp.Show();
            this.Hide();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            HomePsi HP = new HomePsi();

            HP.Show();
            this.Hide();
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string username = tbUser.Text;
            string password = textBox1.Text;


            //Memanggil fungsi static dari class user, jika username & sandi benar maka akan return true
            if (User.auth(username, password))
            {
                MessageBox.Show("Login Berhasil, Selamat Datang " + username);
                HomePsi home = new HomePsi();
                home.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Maaf, Password atau Kata Sandi Salah");
                tbUser.Text   = "";
                textBox1.Text = "";
            }
        }