protected void CargarDatos(int?pIdRol)
        {
            RolNegocio nRol = new RolNegocio();

            E_ROL vRol = nRol.ObtieneFuncionesRol(pIdRol);

            txtClRol.Text     = vRol.CL_ROL;
            txtNbRol.Text     = vRol.NB_ROL;
            chkActivo.Checked = vRol.FG_ACTIVO;
            vLstFunciones     = vRol.LST_FUNCIONES;
        }
Example #2
0
        protected void CargarDatos(int?pIdRol)
        {
            RolNegocio nRol = new RolNegocio();

            E_ROL vRol = nRol.ObtieneFuncionesRol(pIdRol);

            txtClRol.Text     = vRol.CL_ROL;
            txtNbRol.Text     = vRol.NB_ROL;
            chkActivo.Checked = vRol.FG_ACTIVO;
            vLstFunciones     = vRol.LST_FUNCIONES;

            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
            List <SPE_OBTIENE_C_PLANTILLA_FORMULARIO_Result> vLstPlantillas = nPlantilla.ObtienePlantillas();

            rcbPlantilla.DataSource     = vLstPlantillas.Where(w => w.CL_FORMULARIO == "INVENTARIO").ToList();
            rcbPlantilla.DataTextField  = "NB_PLANTILLA_SOLICITUD";
            rcbPlantilla.DataValueField = "ID_PLANTILLA_SOLICITUD";
            rcbPlantilla.DataBind();

            if (vRol.ID_PLANTILLA != null)
            {
                rcbPlantilla.ClearSelection();
                rcbPlantilla.SelectedValue = vRol.ID_PLANTILLA.ToString();
            }


            if (vRol.XML_GRUPOS != null)
            {
                vLstGruposPlaza = (XElement.Parse(vRol.XML_GRUPOS).Elements("GRUPOS")).Select(s => new E_GRUPOS
                {
                    ID_GRUPO = int.Parse(s.Attribute("ID_GRUPO").Value),
                    CL_GRUPO = s.Attribute("CL_GRUPO").Value,
                    NB_GRUPO = s.Attribute("NB_GRUPO").Value
                }).ToList();
            }
            else
            {
                vLstGruposPlaza.Add(new E_GRUPOS()
                {
                    ID_GRUPO = 1, CL_GRUPO = "TODOS", NB_GRUPO = "Todos"
                });
            }
        }