コード例 #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            StudentMenu sm = new StudentMenu();

            this.Hide();
            sm.Show();
        }
コード例 #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Student s1 = new Student();

            s1.readdata();
            for (int i = 0; i < s1.student_list.Count; i++)
            {
                if (txtID.Text == s1.student_list[i].ID && txtPass.Text == s1.student_list[i].pass)
                {
                    s1.login2(txtID.Text);
                    StudentMenu sm = new StudentMenu();
                    this.Hide();
                    sm.Show();
                    return;
                }
            }
            lblReenter.Text = "Wrong ID or Password !";
            txtID.Clear();
            txtPass.Clear();
        }