コード例 #1
0
        private void SubCategoriaToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaSubCategoria f = new frmConsultaSubCategoria();

            f.ShowDialog();
            f.Dispose();
        }
コード例 #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);
                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();
        }