private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(constr); con.Open(); string i = textBox1.Text; string p = textBox2.Text; if (i != "") { if (i == p) { mdiform m = new mdiform(); this.Visible = false; m.Visible = true; } else { MessageBox.Show("Ivalid ID"); } } else { MessageBox.Show("Ivalid ID"); } con.Close(); }
private void button1_Click(object sender, EventArgs e) { mdiform m = new mdiform(); this.Visible = false; m.Visible = true; }