Exemplo n.º 1
0
        private void pbKatalog_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormHome home = new FormHome();

            home.Show();
        }
Exemplo n.º 2
0
        private void btLogin_Click(object sender, EventArgs e)
        {
            User u = new User();

            u.username = Convert.ToString(tbUsername.Text);
            u.password = Convert.ToString(tbPassword.Text);

            if (tbUsername.Text == "" || tbPassword.Text == "")
            {
                MessageBox.Show("Login gagal! Username/Password salah. Silahkan coba lagi.");
            }
            else
            {
                if (tbPassword.Text == "pbo123")
                {
                    this.Hide();
                    FormHome home = new FormHome();
                    home.Show();
                }
                else
                {
                    MessageBox.Show("Login gagal! Username/Password salah. Silahkan coba lagi.");
                }
            }
        }
Exemplo n.º 3
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {//logo, direct ke home
            FormHome FormHome = new FormHome();

            FormHome.Show();
            this.Hide();
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {//button back ke home
            FormHome FormHome = new FormHome();

            FormHome.Show();
            this.Hide();
        }
Exemplo n.º 5
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            User   user     = new User();      //instansiasi
            string username = tbUsername.Text; //atribut username
            string password = tbPassword.Text; //atribut password

            user.Username = Convert.ToString(username);
            user.Password = Convert.ToString(password);

            /*verifikasi ketika login*/
            if (username.Trim() == string.Empty || password.Trim() == string.Empty)
            {//jika belum memasukan username atau password
                MessageBox.Show("Please enter username/password.");
            }
            else
            {//jika sudah memasukan username dan password
                if (password == "pbo123")
                {
                    FormHome FormHome = new FormHome();
                    FormHome.Show();
                    this.Hide();//agar form login hilang
                }
                else
                {//jika password yang dimasukan tidak sesuai
                    MessageBox.Show("You have entered a wrong password!");
                }
            }
        }
Exemplo n.º 6
0
        private void button2_Click(object sender, EventArgs e)
        {
            Login login = new Login();

            login.user = Convert.ToString(username.Text);
            login.pass = Convert.ToString(password.Text);

            string pass = login.pass;

            if (string.Compare(pass, "pbo123") == 0)
            {
                FormHome f2 = new FormHome();
                f2.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Username/Password yang anda masukan salah");
            }
        }