Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            databaseConnection db = new databaseConnection();
            DataTable          dt = new DataTable();

            db.open();
            if (db.readdata(int.Parse(textBox1.Text), (textBox2.Text)) == true)
            {
                menu obj = new menu(textBox1.Text);
                obj.Show();
            }
            else
            {
                MessageBox.Show("incorrect userID or Password");
            }
            db.close();
            text = textBox1.Text;
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            databaseConnection db = new databaseConnection();
            DataTable          dt = new DataTable();

            db.open();
            try
            {
                if (db.readdata(int.Parse(textBox1.Text), (textBox2.Text)) == true)
                {
                    menu obj = new menu(textBox1.Text);
                    obj.Show();
                }
                else
                {
                    MessageBox.Show("invalid user id or password");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            db.close();
        }