Example #1
0
        internal void CarregaForm()
        {
            var categ = _docappservice.BuscaCategoria(cod_categoria);

            txtDescCategoria.Text         = categ.NMCATEGORY;
            cboCodCategoria.SelectedValue = categ.IDCATEGORY;

            gpbCategoria.Enabled = false;

            atributos = _docappservice.ListarVinculo(cod_categoria);
            dgvAtributos.DataSource = atributos;
            Support.DataGridView_ConfigGrid(dgvAtributos, false);

            Support.DataGridView_ConfigCol(dgvAtributos, "nmAtributo", "Atributo SE", 1, "", 0, DataGridViewAutoSizeColumnMode.DisplayedCells);
            Support.DataGridView_ConfigCol(dgvAtributos, "NmCampoImagem", "Campo Imagem", 2, "", 0, DataGridViewAutoSizeColumnMode.Fill);
            Support.DataGridView_ConfigCol(dgvAtributos, "NmTipoCampo", "Tipo do Atributo", 3, "", 0, DataGridViewAutoSizeColumnMode.DisplayedCells);
            Support.DataGridView_ConfigCol(dgvAtributos, "Ind_Titulo", "Título", 4, "", 0, DataGridViewAutoSizeColumnMode.DisplayedCells);
            Support.DataGridView_ConfigCol(dgvAtributos, "ind_LocalFisico", "Local Fisico", 5, "", 0, DataGridViewAutoSizeColumnMode.DisplayedCells);

            if (acesso == ModoAcesso.Consulta)
            {
                gpbAtributo.Enabled = false;
                btnGravar.Enabled   = false;
            }
        }