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); } }
private void cadastroToolStripMenuItem1_Click(object sender, EventArgs e) { frmCadastroTerceirizado terc = new frmCadastroTerceirizado(); terc.Show(); }