当前位置: 首页>>代码示例>>C#>>正文


C# SiteData.ConvertUTCToSiteTime方法代码示例

本文整理汇总了C#中Carrotware.CMS.Core.SiteData.ConvertUTCToSiteTime方法的典型用法代码示例。如果您正苦于以下问题:C# SiteData.ConvertUTCToSiteTime方法的具体用法?C# SiteData.ConvertUTCToSiteTime怎么用?C# SiteData.ConvertUTCToSiteTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Carrotware.CMS.Core.SiteData的用法示例。


在下文中一共展示了SiteData.ConvertUTCToSiteTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PerformCommonSave

        private void PerformCommonSave(SiteData pageSite, carrot_RootContent rc, carrot_Content c)
        {
            c.NavOrder = this.NavOrder;

            if (this.ContentType == ContentPageType.PageType.BlogEntry) {
                this.PageSlug = ContentPageHelper.ScrubFilename(this.Root_ContentID, this.PageSlug);
                this.FileName = ContentPageHelper.CreateFileNameFromSlug(this.SiteID, this.GoLiveDate, this.PageSlug);
                c.NavOrder = SiteData.BlogSortOrderNumber;
            }

            rc.GoLiveDate = pageSite.ConvertSiteTimeToUTC(this.GoLiveDate);
            rc.RetireDate = pageSite.ConvertSiteTimeToUTC(this.RetireDate);

            rc.GoLiveDateLocal = pageSite.ConvertUTCToSiteTime(rc.GoLiveDate);

            rc.PageSlug = this.PageSlug;
            rc.PageThumbnail = this.Thumbnail;

            c.Root_ContentID = this.Root_ContentID;

            rc.Heartbeat_UserId = this.Heartbeat_UserId;
            rc.EditHeartbeat = this.EditHeartbeat;

            rc.FileName = this.FileName;
            rc.PageActive = this.PageActive;
            rc.ShowInSiteNav = this.ShowInSiteNav;
            rc.BlockIndex = this.BlockIndex;
            rc.ShowInSiteMap = this.ShowInSiteMap;

            rc.FileName = ContentPageHelper.ScrubFilename(this.Root_ContentID, rc.FileName);

            c.Parent_ContentID = this.Parent_ContentID;
            c.IsLatestVersion = true;
            c.TitleBar = this.TitleBar;
            c.NavMenuText = this.NavMenuText;
            c.PageHead = this.PageHead;
            c.PageText = this.PageText;
            c.LeftPageText = this.LeftPageText;
            c.RightPageText = this.RightPageText;

            c.EditUserId = this.EditUserId;
            c.CreditUserId = this.CreditUserId;

            c.EditDate = DateTime.UtcNow;
            c.TemplateFile = this.TemplateFile;

            FixMeta();
            c.MetaKeyword = this.MetaKeyword.Replace("\r\n", " ").Replace("\n", " ").Replace("\r", " ").Replace("  ", " ");
            c.MetaDescription = this.MetaDescription.Replace("\r\n", " ").Replace("\n", " ").Replace("\r", " ").Replace("  ", " ");

            this.Root_ContentID = rc.Root_ContentID;
            this.ContentID = c.ContentID;
            this.FileName = rc.FileName;
            this.EditDate = pageSite.ConvertUTCToSiteTime(c.EditDate);
            this.CreateDate = pageSite.ConvertUTCToSiteTime(rc.CreateDate);
            this.GoLiveDate = pageSite.ConvertUTCToSiteTime(rc.GoLiveDate);
            this.RetireDate = pageSite.ConvertUTCToSiteTime(rc.RetireDate);
        }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:58,代码来源:ContentPage.cs


注:本文中的Carrotware.CMS.Core.SiteData.ConvertUTCToSiteTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。