コード例 #1
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            if (txtpw.Text.Length != 0 && txtuname.Text.Length != 0)
            {
                String  pw    = txtpw.Text;
                String  uname = txtuname.Text;
                DBLogin l     = new DBLogin();
                u_id = l.login(pw, uname);


                if (u_id == 1)
                {
                    ManagerMenu mm = new ManagerMenu();
                    mm.Show();
                    this.Hide();
                    mm.setid(u_id);
                }
                else if (u_id == 2)
                {
                    UserMenu um = new UserMenu();
                    this.Hide();
                    um.Show();
                    um.setid(u_id);
                }
            }
        }
コード例 #2
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Hide();
            ManagerMenu m = new ManagerMenu();

            m.Show();
            m.setid(u_id);
        }