示例#1
0
        private void tipoDePagamentoToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaTipoDePagamento f = new frmConsultaTipoDePagamento();

            f.ShowDialog();
            f.Dispose();
        }
        private void btnLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaTipoDePagamento f = new frmConsultaTipoDePagamento();

            f.ShowDialog();

            if (f.codigo != 0)
            {
                DALConexao            cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLTipoDePagamento    bll    = new BLLTipoDePagamento(cx);
                ModeloTipoDePagamento modelo = bll.CarregaModeloTipoDePagamento(f.codigo);
                txtCodigoTP.Text = modelo.TpaCod.ToString();
                txtCodigoTP.Text = modelo.TpaNome;
                AlteraBotoes(3);
            }

            else
            {
                this.LimpaTela();
                this.AlteraBotoes(1);
            }

            f.Dispose();
        }