Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string          conn    = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\Personal\\Documents\\Login.accdb";
            OleDbConnection con     = new OleDbConnection(conn);
            string          command = "select * from student_login where  Register_name = '" + textBox1.Text + "' and Password = '******'";

            con.Open();
            OleDbCommand    comm = new OleDbCommand(command, con);
            OleDbDataReader dr   = comm.ExecuteReader();

            if (dr.Read())
            {
                MessageBox.Show("Login Success");
                Thread.Sleep(2000);
                student_login s = new student_login();
                s.Close();
                mark_list mm = new mark_list();
                mm.Show();
            }
            else
            {
                MessageBox.Show("Incorrect Register Number or Password");
            }
        }
Ejemplo n.º 2
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            student_login ss = new student_login();

            ss.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            student_login ss = new student_login();

            ss.Show();
        }