private void btnAlterFunc_Click(object sender, EventArgs e) { try { Cad_Func_DTO obj = new Cad_Func_DTO(); obj.Nome = txtNome.Text.ToUpper(); obj.Endereco = txtEndereco.Text.ToUpper(); obj.Numero = txtNumero.Text.ToUpper(); obj.Cpf = txtCpf.Text; obj.Rg = txtRg.Text; obj.Cidade = txtCidade.Text.ToUpper(); obj.Bairro = txtBairro.Text.ToUpper(); obj.Conta = txtConta.Text.ToUpper(); obj.Agencia = txtAgencia.Text.ToUpper(); obj.Banco = txtBanco.Text.ToUpper(); obj.Telefone = txtTel.Text; string nome = txtNomeBuscFunc.Text.ToUpper(); string msg = Cad_Func_BLL.AlterFunc(obj, nome); MessageBox.Show(msg, "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); limparFunc(); }catch (Exception ex) { MessageBox.Show(ex.Message, "ERRO", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void panel5_MouseClick(object sender, MouseEventArgs e) { try { Cad_Func_DTO obj = new Cad_Func_DTO(); string msg = txtNomeBuscFunc.Text.ToUpper(); Cad_Func_BLL.bucFunc(obj, msg); txtNome.Text = obj.Nome; txtEndereco.Text = obj.Endereco; txtNumero.Text = obj.Numero; txtCpf.Text = obj.Cpf; txtRg.Text = obj.Rg; txtCidade.Text = obj.Cidade; txtBairro.Text = obj.Bairro; txtConta.Text = obj.Conta; txtAgencia.Text = obj.Agencia; txtBanco.Text = obj.Banco; txtTel.Text = obj.Telefone; }catch (Exception ex) { MessageBox.Show(ex.Message, "ERRO", MessageBoxButtons.OK, MessageBoxIcon.Error); } }