Exemplo n.º 1
0
        private void btnMasuk_Click(object sender, EventArgs e)
        {
            if (txtUsr.Text == "" || txtPswd.Text == "")
            {
                MessageBox.Show("Kode dan Password harus diisi !");
            }
            else
            {
                login.setKode(txtUsr.Text);
                login.setPassword(txtPswd.Text);
                status = LoginDao.Login(login);

                if (status == false)
                {
                    MessageBox.Show("Maaf login gagal");
                    txtUsr.Text  = "";
                    txtPswd.Text = "";
                    txtUsr.Focus();
                }
                else
                {
                    View.FrmDashboard f4 = new View.FrmDashboard();
                    f4.Show();
                    this.Hide();
                }
            }
        }
Exemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUser.Text == "" || txtPassword.Text == "")
            {
                MessageBox.Show("Kode dan Password harus diisi !");
            }
            else
            {
                status = Login.Login(txtUser.Text, txtPassword.Text);

                if (status == false)
                {
                    MessageBox.Show("Maaf login gagal");
                    txtUser.Text     = "";
                    txtPassword.Text = "";
                    txtUser.Focus();
                }
                else
                {
                    Form2      f2 = new Form2(txtUser.Text);
                    View.Form3 f3 = new View.Form3(txtUser.Text);
                    View.Form4 f4 = new View.Form4(txtUser.Text);
                    f4.Show();
                    this.Hide();
                }
            }
        }