private void btnCadastrar_Click(object sender, EventArgs e) { try { NovoTerceirizadoBusiness parceiro = new NovoTerceirizadoBusiness(); parceiro.SaveTerc(txtNomeEmpresa.Text, txtCnpj.Text, dtInicio.Value, dtFinal.Value); } catch (Exception) { throw; } }
private void btnCadastrar_Click(object sender, EventArgs e) { try { NovoTerceirizadoBusiness terceiro = new NovoTerceirizadoBusiness(); terceiro.SaveTerc(txtNomeEmpresa.Text, txtCnpj.Text, dtpInicio.Value, dtpFinal.Value); if (terceiro.Clear == true) { frmCadastroTerceirizado x = new frmCadastroTerceirizado(); x.Show(); this.Close(); } } catch (Exception x) { MessageBox.Show("OCORREU UM PROBLEMA, ESTÁ TUDO CORRETAMENTE FEITO?", "TOPMOVIE - ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); } }