예제 #1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormMenuAdmin menu = new FormMenuAdmin();

            menu.Show();
        }
예제 #2
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (textBoxUsername.Text != "" && textBoxPassword.Text != "")
     {
         try
         {
             if (admin.CekBerdasarkan(textBoxUsername.Text, textBoxPassword.Text))
             {
                 MessageBox.Show("Login Berhasil!");
                 FormMenuAdmin menu = new FormMenuAdmin();
                 menu.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("Username atau password salah!!");
             }
         }
         catch (Exception err) { MessageBox.Show(err.Message); }
     }
     else if (textBoxUsername.Text == "" && textBoxPassword.Text == "")
     {
         MessageBox.Show("Username dan password belum diisi");
     }
     else if (textBoxPassword.Text == "")
     {
         MessageBox.Show("Password belum diisi");
     }
     else
     {
         MessageBox.Show("Username belum diisi");
     }
 }