private void txtValor_TextChanged(object sender, EventArgs e) { Transacao a = (Transacao)modelo; try { a.Validar(txtValor.Text, "Valor"); } catch (Exception ex) { MessageBox.Show(modelo.exibirMensagemErro(ex, 2)); } }
public Transacao Delete(Transacao entity) { if (entity.Validar()) { this._transacaoRepository.Delete(entity); this._unitOfWork.Commit(); } return(entity); }