Exemple #1
0
        public static bool Push(
            this evolib.Databases.common1.OpsNotice rec,
            TopicsDesc topicsDesc
            )
        {
            var edited = rec.Push((CommonDesc)topicsDesc) ||
                         (rec.priority != topicsDesc.priority) ||
                         (rec.enabledEnglish && rec.titleEnglish != topicsDesc.titleEnglish) ||
                         (rec.enabledFrench && rec.titleFrench != topicsDesc.titleFrench) ||
                         (rec.enabledGerman && rec.titleGerman != topicsDesc.titleGerman) ||
                         (rec.enabledJapanese && rec.titleJapanese != topicsDesc.titleJapanese) ||
                         (rec.redirectUI != topicsDesc.redirectUI);

            rec.optNoticeType = evolib.OptNoticeType.Topics;

            rec.priority      = topicsDesc.priority;
            rec.titleEnglish  = topicsDesc.titleEnglish;
            rec.titleFrench   = topicsDesc.titleFrench;
            rec.titleGerman   = topicsDesc.titleGerman;
            rec.titleJapanese = topicsDesc.titleJapanese;
            rec.redirectUI    = topicsDesc.redirectUI;

            if (edited)
            {
                rec.version++;
            }

            return(edited);
        }
Exemple #2
0
        public static TopicsDesc Pop(
            this evolib.Databases.common1.OpsNotice rec,
            TopicsDesc topicsDesc
            )
        {
            rec.Pop((CommonDesc)topicsDesc);

            topicsDesc.priority      = rec.priority;
            topicsDesc.titleEnglish  = rec.titleEnglish;
            topicsDesc.titleFrench   = rec.titleFrench;
            topicsDesc.titleGerman   = rec.titleGerman;
            topicsDesc.titleJapanese = rec.titleJapanese;
            topicsDesc.redirectUI    = rec.redirectUI;

            return(topicsDesc);
        }