Пример #1
0
        private void returnbutton_Click(object sender, EventArgs e)
        {
            studentaflogin afterlogin = new studentaflogin();

            this.Hide();
            afterlogin.Show();
        }
Пример #2
0
        private void loginbutton_Click(object sender, EventArgs e)
        {
            if (idtextBox.Text == student1.Idnumber && passwordtextBox.Text == student1.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student2.Idnumber && passwordtextBox.Text == student2.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }

            else if (idtextBox.Text == student3.Idnumber && passwordtextBox.Text == student3.Password)
            {
                studentaflogin afterlogin = new studentaflogin();

                afterlogin.Show();
            }

            else if (idtextBox.Text == student4.Idnumber && passwordtextBox.Text == student4.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student5.Idnumber && passwordtextBox.Text == student5.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student6.Idnumber && passwordtextBox.Text == student6.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student7.Idnumber && passwordtextBox.Text == student7.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student8.Idnumber && passwordtextBox.Text == student8.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student9.Idnumber && passwordtextBox.Text == student9.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student10.Idnumber && passwordtextBox.Text == student10.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student11.Idnumber && passwordtextBox.Text == student11.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student12.Idnumber && passwordtextBox.Text == student12.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student13.Idnumber && passwordtextBox.Text == student13.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student14.Idnumber && passwordtextBox.Text == student14.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == student15.Idnumber && passwordtextBox.Text == student15.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else
            {
                MessageBox.Show("Login Invalid");
                idtextBox.Clear();
                passwordtextBox.Clear();
            }
        }
Пример #3
0
        private void loginbutton_Click(object sender, EventArgs e)
        {
            if (idtextBox.Text == lecture1.Idnumber && passwordtextBox.Text == lecture1.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture2.Idnumber && passwordtextBox.Text == lecture2.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }

            else if (idtextBox.Text == lecture3.Idnumber && passwordtextBox.Text == lecture3.Password)
            {
                studentaflogin afterlogin = new studentaflogin();

                afterlogin.Show();
            }

            else if (idtextBox.Text == lecture4.Idnumber && passwordtextBox.Text == lecture4.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture5.Idnumber && passwordtextBox.Text == lecture5.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture6.Idnumber && passwordtextBox.Text == lecture6.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture7.Idnumber && passwordtextBox.Text == lecture7.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture8.Idnumber && passwordtextBox.Text == lecture8.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture9.Idnumber && passwordtextBox.Text == lecture9.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else if (idtextBox.Text == lecture10.Idnumber && passwordtextBox.Text == lecture10.Password)
            {
                studentaflogin afterlogin = new studentaflogin();
                this.Hide();
                afterlogin.Show();
            }
            else
            {
                MessageBox.Show("Login Invalid");
                idtextBox.Clear();
                passwordtextBox.Clear();
            }
        }