Пример #1
0
        public List <SelectListItem> GetListLang(ref LoginModel model)
        {
            List <SelectListItem> result = new List <SelectListItem>();
            //List<LanguageModels> lstData = _LanguageFactory.GetListLanguage();
            List <LanguageModels> lstData = _LanguageFactory.GetLanguages();

            foreach (var item in lstData)
            {
                result.Add(new SelectListItem
                {
                    Text     = item.Name,
                    Value    = item.Id,
                    Selected = item.IsDefault
                });
                if (item.IsDefault)
                {
                    model.LanguageId = item.Id;
                }
            }
            return(result);
        }