Esempio n. 1
0
        private void btnStudentLogin_Click(object sender, EventArgs e)
        {
            string userName     = txtStudentUsername.Text;
            string userPassword = txtStudentPassword.Text;

            if (userName.Equals(""))
            {
                MessageBox.Show("Please enter your Username!");
            }
            else if (userPassword.Equals(""))
            {
                MessageBox.Show("Please enter your Password!");
            }
            else
            {
                string query = "Select * from UserSignUp Where Username= '******' AND Password = '******'";

                objDbAccess.readDatathroughAdapter(query, dtUsers);

                if (dtUsers.Rows.Count == 1)
                {
                    Student_class.username = dtUsers.Rows[0]["Username"].ToString();
                    MessageBox.Show("Congratulations, You are logged in Successfully!!");
                    objDbAccess.closeConn();

                    this.Hide();
                    Student_Portal student = new Student_Portal();
                    student.Show();
                }
                else
                {
                    MessageBox.Show("Invalid Credentials!!. Provide Correct Username and Password");
                }
            }
        }
Esempio n. 2
0
        private void btnUpdateFileRegister_Click(object sender, EventArgs e)
        {
            this.Hide();
            Student_Portal portal = new Student_Portal();

            portal.Show();
        }
        private void btnStudentPortal_Click(object sender, EventArgs e)
        {
            this.Hide();
            Student_Portal portal = new Student_Portal();

            portal.Show();
        }