private void btLocalizar_Click(object sender, EventArgs e)
 {
     frmConsultaCategoria f = new frmConsultaCategoria();
     f.ShowDialog();
     if (f.codigo != 0)
     {
         DALConexao cx = new DALConexao(DadosDaConexao.StringDeConexao);
         BLLCategoria bll = new BLLCategoria(cx);
         ModeloCategoria modelo = bll.CarregaModeloCategoria(f.codigo);
         txtCodigo.Text = modelo.CatCod.ToString();
         txtNome.Text = modelo.CatNome;
         alteraBotoes(3);
     }
     else
     {
         this.LimpaTela();
         this.alteraBotoes(1);
     }
     f.Dispose();
 }
Esempio n. 2
0
        public ModeloCategoria CarregaModeloCategoria(int codigo)
        {
            BLLCategoria DALobj = new BLLCategoria(conexao);

            return(DALobj.CarregaModeloCategoria(codigo));
        }