private void btLocalizar_Click(object sender, EventArgs e)
        {
            
            frmConsultaTipoDePagamento consulta = new frmConsultaTipoDePagamento();
            consulta.ShowDialog();
            if (consulta.codigo != 0)
            {
                DALConexao cx = new DALConexao(DadosDaConexao.srtConexao);
                BLLTipoDePagamento bll = new BLLTipoDePagamento(cx);
                ModeloTipoDePagamento modelo = bll.CarregaModeloTipoDePagamento(consulta.codigo);
                txtCodigo.Text = modelo.TpaCod.ToString();
                txtNome.Text = modelo.TpaNome;
                AlteraBotoes(3);
            }
            else
            {
                this.LimpaCampos();
                this.AlteraBotoes(1);
            }
            consulta.Dispose();

        }
Example #2
0
 private void tipoDePagamentoToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     frmConsultaTipoDePagamento pagcon = new frmConsultaTipoDePagamento();
     pagcon.ShowDialog();
     pagcon.Dispose();
 }