Example #1
0
        /// <summary>
        /// An entity list is populated to combo box indicating which
        /// kind of data it needs to CRUD.
        /// </summary>
        private void PoblarListaEntidades()
        {
            if (log.IsDebugEnabled)
            {
                log.Debug("PoblarListaEntidades Starts");
            }
            ParametroSistema           daoPs        = new ParametroSistema();
            List <ParametroSistemaDto> sysParamList = daoPs.getValoresParametroSistema();
            List <KeyValue>            l            = new List <KeyValue>();

            l.Add(new KeyValue()
            {
                key = "-1", value = "-- SELECCIONE --"
            });
            sysParamList.ForEach(sp => l.Add(new KeyValue()
            {
                key = sp.nombreParametro, value = sp.descValorParametro
            }));
            listaEntidades.DataSource     = l;
            listaEntidades.DataTextField  = "value";
            listaEntidades.DataValueField = "key";
            listaEntidades.DataBind();
            if (log.IsDebugEnabled)
            {
                log.Debug("PoblarListaEntidades Ends");
            }
        }