Exemple #1
0
        private void Go_back_button_Click(object sender, EventArgs e)
        {
            this.Hide();
            Student_Homepage SHForm = new Student_Homepage(this.student_id);

            SHForm.ShowDialog();
            this.Close();
        }
Exemple #2
0
        private void BackBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            Student_Homepage SHForm = new Student_Homepage(StudentInfoManager.Instance.getStudentID());

            SHForm.ShowDialog();
            this.Close();
        }
Exemple #3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            int student_id;

            if (Int32.TryParse(login_input.Text, out student_id))
            {
                student_id = Int32.Parse(login_input.Text);

                if (collegeDB.executeFetchCommand("SELECT * FROM student s WHERE s.s_id = '" + student_id.ToString() + "';").Tables[0].Rows.Count > 0)
                {
                    this.Hide();
                    Student_Homepage StudentHomepageForm = new Student_Homepage(student_id);
                    StudentHomepageForm.ShowDialog();
                    this.Close();
                }
                else
                {
                    // shame them
                    shameText.Text      = "Shame on you. Pwease enter a valid student ID";
                    shameText.ForeColor = Color.FromName("Red");
                    shameText.Visible   = true;
                }
            }
        }