コード例 #1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form dashboard = new dashboard();

            dashboard.Show();
        }
コード例 #2
0
        private void bt_login_Click(object sender, EventArgs e)
        {
            var db     = new sembarangkasirEntities();
            var uname  = tb_username.Text;
            var passwd = tb_password.Text;

            var mhs = (from a in db.master_user where a.username == uname && a.password == passwd select a).Count();

            if (mhs > 0)
            {
                this.Hide();
                Form dashboard = new dashboard();
                dashboard.Show();
            }
            else
            {
                MessageBox.Show("Login Gagal");
            }
        }