private void button1_Click(object sender, EventArgs e) { this.Hide(); log_blood_taker taker = new log_blood_taker(); taker.Show(); }
private void button2_Click(object sender, EventArgs e) { con.Open(); OleDbCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "insert into Table1 values('" + name.Text + "','" + location.Text + "','" + weight.Text + "','" + b_g.Text + "'," + "'" + gender.Text + "','" + email.Text + "','" + password.Text + "','" + phone.Text + "','donor')"; cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("You are successfully registered as a blood donor."); this.Hide(); log_blood_taker go = new log_blood_taker(); go.Show(); }