private void pictureBox1_Click(object sender, EventArgs e) { MemberPage mp = new MemberPage("labiba"); this.Hide(); mp.Show(); }
private void button1_Click(object sender, EventArgs e) { nameBox = textBox4.Text; passBox = textBox2.Text; //List<List<string>> result = new List<List<string>>(); string query = "select * from user where name = '" + nameBox + "' and password = '******'"; MessageBox.Show(query); string conq = " where name = '" + nameBox + "' and '" + passBox + "'"; try { if (db.SelectAll("user", conq)) { MemberPage mp = new MemberPage(nameBox); this.Hide(); mp.Show(); } else { MessageBox.Show("invalid input!"); } }catch (Exception ex) { MessageBox.Show(ex.ToString()); } }