Beispiel #1
0
        private void btnAddStudent_Click(object sender, EventArgs e)
        {
            frmAdminAddStudent temp = new frmAdminAddStudent();

            temp.Show();
            this.Close();
        }
Beispiel #2
0
        private void btLogin_Click(object sender, EventArgs e)
        {
            bool isValid  = false;
            bool isValidS = false;

            server.Service1 ser = new server.Service1();
            if (txtUserName.Text == "" || txtPassword.Text == "")
            {
                MessageBox.Show("Incorrect username or password!");
            }
            else
            {
                ser.sValidAdmin(txtUserName.Text, txtPassword.Text, out isValid, out isValidS);
                if (!isValid)
                {
                    MessageBox.Show("Incorrect username or password!");
                }
                else
                {
                    frmAdminAddStudent temp = new frmAdminAddStudent();
                    temp.Show();
                    this.Hide();
                }
            }
        }