Beispiel #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            FmMenuUtama menu = new FmMenuUtama();

            this.Hide();
            menu.Show();
        }
Beispiel #2
0
        private void BTlogin_Click(object sender, EventArgs e)
        {
            string User = txtname.Text;
            string Pass = txtpassword.Text;

            Con = new OleDbConnection(koneksi);
            Cmd = new OleDbCommand();
            Con.Open();
            Cmd.Connection  = Con;
            Cmd.CommandText = "SELECT * From TB_USER Where Username='******'And Password='******'";
            Dr = Cmd.ExecuteReader();
            if (Dr.Read())
            {
                FmMenuUtama F1 = new FmMenuUtama();
                F1.LabelText = this.txtname.Text;
                F1.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Username Or Password Is Incorrect!");
            }
            Con.Close();
        }