private void button1_Click(object sender, EventArgs e) { conn.oleDbConnection1.Open(); OleDbCommand cmd = new OleDbCommand("Select * from Login", conn.oleDbConnection1); OleDbDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { if (this.textBox1.Text == dr["Username"].ToString() && this.textBox2.Text == dr["Password"].ToString()) { ERP form = new ERP(); this.Hide(); form.Show(); } else { MessageBox.Show("Incorrect Username or Password!"); } } conn.oleDbConnection1.Close(); }
public Capproval(ERP er1) { er = er1; InitializeComponent(); }
public approval(ERP ff2) { frm2 = ff2; InitializeComponent(); }