예제 #1
0
        private void subCategoriaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaSubCategoria f = new frmConsultaSubCategoria();

            f.ShowDialog();
            f.Dispose();
        }
예제 #2
0
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaSubCategoria f = new frmConsultaSubCategoria();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DAOConexao         cx     = new DAOConexao(DAOBanco.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();
        }