示例#1
0
        public static List <ListItem> ComboGeneralDinamico(String Grupo, String defaultVal, String idPadre = null)
        {
            List <ListItem> lstComboBean = OportunidadController.GetGrupos(Grupo, idPadre).Select(x => new ListItem()
            {
                Text     = x.Nombre,
                Value    = x.Codigo.ToString(),
                Selected = (x.Codigo.ToString() == defaultVal ? true : false),
            }).ToList();

            return(lstComboBean);
        }