27 lines
990 B
C#
27 lines
990 B
C#
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<ZaradekSzovegModel> AdatszotarNyelvCoToZaradekSzovegModel(List<AdatszotarZaradekNyelvCo> coList = null)
|
|
{
|
|
coList = coList ?? new List<AdatszotarZaradekNyelvCo>();
|
|
return new SystemSettingsHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetSystemSettingValue<List<int>>(RendszerBeallitasTipusEnum.Nemzeti_Nyelvi_Dokumentum_Nyelvek).ConvertAll(y =>
|
|
new ZaradekSzovegModel
|
|
{
|
|
NyelvId = y,
|
|
Szoveg = coList.SingleOrDefault(x => x.NyelvId == y)?.Name ?? string.Empty
|
|
});
|
|
}
|
|
}
|
|
}
|