private void subCategoriaToolStripMenuItem1_Click(object sender, EventArgs e) { frmConsultaSubCategoria f = new frmConsultaSubCategoria(); f.ShowDialog(); f.Dispose(); }
private void btLocalizar_Click(object sender, EventArgs e) { frmConsultaSubCategoria f = new frmConsultaSubCategoria(); f.ShowDialog(); if (f.codigo != 0) { DALConexao cx = new DALConexao(DadosDaConexao.StringDeConexao); BLLSubCategoria bll = new BLLSubCategoria(cx); ModeloSubCategoria modelo = bll.CarregaModeloSubCategoria(f.codigo); txtScatCod.Text = modelo.ScatCod.ToString(); txtNome.Text = modelo.ScatNome; cbCatCod.SelectedValue = modelo.CatCod; alteraBotoes(3); } else { this.LimpaTela(); this.alteraBotoes(1); } f.Dispose(); }