Пример #1
0
        private void transSectionOne(ContentPost x)
        {
            if (x.PageSection == null || x.PageSection.Id <= 0)
            {
                return;
            }

            int sectionId = x.PageSection.Id;

            ContentPostSection ps = hasTrans(x, sectionId);

            if (ps != null)
            {
                ps.SaveStatus = x.SaveStatus;
                ps.update();
            }
            else
            {
                ContentPostSection newPs = new ContentPostSection();
                newPs.Post       = x;
                newPs.Section    = x.PageSection;
                newPs.SaveStatus = x.SaveStatus;

                newPs.insert();

                logger.Info("transSectionOne=> postId=" + x.Id + ", sectionId=" + x.PageSection.Id);
            }
        }