Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            connect con   = new connect("Data Source=(local);Initial Catalog=login;Integrated Security=True");
            string  query = "select name from tc where name ='" + textBox1.Text + "' and pass = '******'";
            adapter adp   = new adapter(query, con);
            DataSet ds    = new DataSet();

            adp.Fill(ds);
            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count >= 1)
            {
                main ma = new main();
                ma.ShowDialog();
            }
            else
            {
                MessageBox.Show("INVALID USERID OR PASSWORD");
            }
        }
Exemple #2
0
        private void button10_Click(object sender, EventArgs e)
        {
            main ma = new main();

            ma.ShowDialog();
        }