Esempio n. 1
0
        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.Close();
            StaffForm form = new StaffForm();

            form.Show();
        }
Esempio n. 2
0
        private void btn_Login_Click(object sender, EventArgs e)
        {
            if (txt_User.Text == "libuser" && txt_Pass.Text == "libpass")
            {
                MessageBox.Show("Login Successful!");
                Form1 libForm = new Form1();
                libForm.Show();
            }

            else if (txt_User.Text == "staffuser" && txt_Pass.Text == "staffpass")
            {
                MessageBox.Show("Login Successful!");
                StaffForm stafForm = new StaffForm();
                stafForm.Show();
            }

            else
            {
                MessageBox.Show("Login is incorrect! Please login again.");
            }
        }