示例#1
0
        private void btnProfile_Click(object sender, EventArgs e)
        {
            frmTeacherProfile temp = new frmTeacherProfile();

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

            server.Service1 ser = new server.Service1();
            if (txtEmail.Text == "" || txtPassword.Text == "")
            {
                MessageBox.Show("Incorrect username or password!");
            }
            else
            {
                ser.sValidTeacher(txtEmail.Text, txtPassword.Text, out isValid, out isValidS);
                if (!isValid)
                {
                    MessageBox.Show("Incorrect username or password!");
                }
                else
                {
                    frmTeacherProfile temp = new frmTeacherProfile();
                    temp.Show();
                    this.Close();
                }
            }
        }