Example #1
0
        private void subCategoriaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmConsultaSubCategoria f = new frmConsultaSubCategoria();

            f.ShowDialog();
            f.Dispose();
        }
Example #2
0
        private void btnLocalizar_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);
                txtCodigoSubCat.Text    = modelo.ScatCod.ToString();
                txtNomeSubCat.Text      = modelo.SCatNome;
                cbNomeCat.SelectedValue = modelo.CatCod;
                AlteraBotoes(3);
            }

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

            f.Dispose();
        }