示例#1
0
        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);
        }
示例#2
0
 public dtoSelectMethod()
 {
     Translation = new ItemObjectTranslation();
     RatingSets  = new List <dtoSelectRatingSet>();
 }
示例#3
0
 public TemplateRatingValue()
 {
     DefaultTranslation = new ItemObjectTranslation();
     Translations       = new List <DssTemplateTranslation>();
 }
示例#4
0
 public dtoSelectRatingSet()
 {
     Translation = new ItemObjectTranslation();
     Values      = new List <dtoSelectRatingValue>();
 }
示例#5
0
 public dtoSelectRatingValue()
 {
     Translation = new ItemObjectTranslation();
 }
 public DssTemplateTranslation()
 {
     Translation = new ItemObjectTranslation();
 }
示例#7
0
 public TemplateMethod()
 {
     DefaultTranslation = new ItemObjectTranslation();
     Translations       = new List <DssTemplateTranslation>();
     Rating             = RatingType.simple | RatingType.intermediateValues;
 }
示例#8
0
 public TemplateRatingSet()
 {
     Translations       = new List <DssTemplateTranslation>();
     DefaultTranslation = new ItemObjectTranslation();
     Values             = new List <TemplateRatingValue>();
 }