private void SubCategoriaToolStripMenuItem1_Click(object sender, EventArgs e) { frmConsultaSubCategoria f = new frmConsultaSubCategoria(); f.ShowDialog(); f.Dispose(); }
private void BtnLocalizar_Click(object sender, EventArgs e) { frmConsultaSubCategoria f = new frmConsultaSubCategoria(); f.ShowDialog(); if (f.codigo != 0) { DALConexao cx = new DALConexao(DadosDaConexao.stringDeConexao); DAOSubCategoria bll = new DAOSubCategoria(cx); ModeloSubCategoria modelo = bll.carregaModeloCategoria(f.codigo); txtCodigoSCategoria.Text = modelo.scat_cod.ToString(); txtNomeSCategoria.Text = modelo.scat_nome.ToString(); cboCatCod.SelectedValue = modelo.cat_cod; alteraBotoes(3); } else { this.limpaTela(); this.alteraBotoes(1); } f.Dispose(); }