public ItemObjectTranslation GetTranslation(String userLanguageCode, Int32 idDefaultLanguage) { ItemObjectTranslation translation = (Translations == null || (Translations.Any() && !Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Any())) ? DefaultTranslation : (Translations.Where(t => t.Deleted == BaseStatusDeleted.None && t.LanguageCode == userLanguageCode).Any()) ? Translations.Where(t => t.Deleted == BaseStatusDeleted.None && t.LanguageCode == userLanguageCode).Select(t => t.Translation).FirstOrDefault() : Translations.Where(t => t.Deleted == BaseStatusDeleted.None && t.IdLanguage == idDefaultLanguage).Select(t => t.Translation).FirstOrDefault(); if (translation == null || !translation.IsValid()) { translation = DefaultTranslation; } return(translation); }
public dtoSelectMethod() { Translation = new ItemObjectTranslation(); RatingSets = new List <dtoSelectRatingSet>(); }
public TemplateRatingValue() { DefaultTranslation = new ItemObjectTranslation(); Translations = new List <DssTemplateTranslation>(); }
public dtoSelectRatingSet() { Translation = new ItemObjectTranslation(); Values = new List <dtoSelectRatingValue>(); }
public dtoSelectRatingValue() { Translation = new ItemObjectTranslation(); }
public DssTemplateTranslation() { Translation = new ItemObjectTranslation(); }
public TemplateMethod() { DefaultTranslation = new ItemObjectTranslation(); Translations = new List <DssTemplateTranslation>(); Rating = RatingType.simple | RatingType.intermediateValues; }
public TemplateRatingSet() { Translations = new List <DssTemplateTranslation>(); DefaultTranslation = new ItemObjectTranslation(); Values = new List <TemplateRatingValue>(); }