using System.Collections.Generic; using System.Linq; using Kreta.BusinessLogic.HelperClasses; using Kreta.BusinessLogic.Helpers.SystemSettings; using Kreta.Enums; using Kreta.Web.Helpers; namespace Kreta.Web.Models { public class ZaradekSzovegModel { public int NyelvId { get; set; } public string Szoveg { get; set; } public static List AdatszotarNyelvCoToZaradekSzovegModel(List coList = null) { coList = coList ?? new List(); return new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSystemSettingValue>(RendszerBeallitasTipusEnum.Nemzeti_Nyelvi_Dokumentum_Nyelvek).ConvertAll(y => new ZaradekSzovegModel { NyelvId = y, Szoveg = coList.SingleOrDefault(x => x.NyelvId == y)?.Name ?? string.Empty }); } } }