private void button1_Click(object sender, EventArgs e) { InserareAntrenori ina = new InserareAntrenori(); ina.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { try { SqlConnection con = new SqlConnection(sqlCon); con.Open(); if (con.State == ConnectionState.Open) { InserareAntrenori ia = new InserareAntrenori(); ia.Show(); this.Close(); } } catch (Exception exp) { MessageBox.Show(exp.Message, "Eroare aparuta in urma operatiunilor desfasuarate!", MessageBoxButtons.OK, MessageBoxIcon.Error); } }