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


C# Core.ContentPageType类代码示例

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


ContentPageType类属于Carrotware.CMS.Core命名空间,在下文中一共展示了ContentPageType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ContentPage

		public ContentPage(Guid siteID, ContentPageType.PageType pageType) {
			this.Root_ContentID = Guid.NewGuid();
			this.ContentID = Guid.NewGuid();
			this.ContentType = pageType;
			this.SiteID = siteID;
			this.VersionCount = 0;

			this.CreateDate = SiteData.GetSiteByID(siteID).Now;
			this.EditDate = this.CreateDate;
			this.GoLiveDate = this.CreateDate.AddMinutes(-5);
			this.RetireDate = this.CreateDate.AddYears(200);

			this.NavMenuText = "PAGE " + this.Root_ContentID.ToString().ToLower();
			this.FileName = "/" + this.Root_ContentID.ToString().ToLower() + ".aspx";
			this.TemplateFile = SiteData.DefaultTemplateFilename;

			this.BlockIndex = false;
			this.PageActive = true;
			this.ShowInSiteMap = true;
			this.ShowInSiteNav = true;

			this.LeftPageText = PageContentEmpty;
			this.RightPageText = PageContentEmpty;
			this.PageText = PageContentEmpty;

			if (pageType != ContentPageType.PageType.ContentEntry) {
				this.Parent_ContentID = null;
				this.NavOrder = SiteData.BlogSortOrderNumber;
				this.ShowInSiteMap = false;
				this.ShowInSiteNav = false;
			}

			this.ContentCategories = new List<ContentCategory>();
			this.ContentTags = new List<ContentTag>();
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:35,代码来源:ContentPage.cs

示例2: GetAllByTypeList

		internal static IQueryable<vw_carrot_Content> GetAllByTypeList(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly, ContentPageType.PageType entryType) {
			return (from ct in ctx.vw_carrot_Contents
					orderby ct.NavOrder, ct.NavMenuText
					where ct.SiteID == siteID
					&& ct.IsLatestVersion == true
					&& (ct.PageActive == true || bActiveOnly == false)
					&& (ct.GoLiveDate < DateTime.UtcNow || bActiveOnly == false)
					&& (ct.RetireDate > DateTime.UtcNow || bActiveOnly == false)
					&& ct.IsLatestVersion == true
					&& ct.ContentTypeID == ContentPageType.GetIDByType(entryType)
					select ct);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:12,代码来源:CannedQueries.cs

示例3: GetLatestContentPagedList

		public List<SiteNav> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber, string sortField, string sortDir) {
			return SiteNavHelper.GetSamplerFakeNav(pageSize);
		}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:3,代码来源:SiteNavHelperMock.cs

示例4: GetSitePageCount

 public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly)
 {
     int iCount = CannedQueries.GetAllByTypeList(db, siteID, bActiveOnly, entryType).Count();
     return iCount;
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:5,代码来源:ContentPageHelper.cs

示例5: GetPagedSortedContent

        public List<ContentPage> GetPagedSortedContent(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly, int pageSize, int pageNumber, string sSortParm)
        {
            string sortField = "";
            string sortDir = "";
            IQueryable<vw_carrot_Content> query1 = null;

            if (!String.IsNullOrEmpty(sSortParm)) {
                int pos = sSortParm.LastIndexOf(" ");
                sortField = sSortParm.Substring(0, pos).Trim();
                sortDir = sSortParm.Substring(pos).Trim();
            }

            query1 = CannedQueries.GetAllByTypeList(db, siteID, bActiveOnly, entryType);

            return PerformDataPagingQueryableContent(siteID, bActiveOnly, pageSize, pageNumber, sortField, sortDir, query1);
        }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:16,代码来源:ContentPageHelper.cs

示例6: GetLatestContentPagedList

 public List<ContentPage> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber)
 {
     return GetLatestContentPagedList(siteID, postType, bActiveOnly, pageSize, pageNumber, "", "");
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:4,代码来源:ContentPageHelper.cs

示例7: GetContentByDateRange

        public List<ContentPage> GetContentByDateRange(Guid siteID, DateTime dateMidpoint, int iDayRange, ContentPageType.PageType pageType, bool? bActive, bool? bSiteMap, bool? bSiteNav, bool? bBlock)
        {
            //assiging SQL min dates because of 1753 vs 0001 year issues
            DateTime dateBegin = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; //DateTime.MinValue;
            DateTime dateEnd = (DateTime)System.Data.SqlTypes.SqlDateTime.MaxValue; //DateTime.MaxValue;

            if (iDayRange > 0) {
                dateBegin = dateMidpoint.AddDays(0 - iDayRange);
                dateEnd = dateMidpoint.AddDays(iDayRange);
            }

            List<ContentPage> lstContent = CannedQueries.GetContentByStatusAndDateRange(db, siteID, pageType, dateBegin, dateEnd, bActive, bSiteMap, bSiteNav, bBlock).Select(ct => new ContentPage(ct)).ToList();

            return lstContent;
        }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:15,代码来源:ContentPageHelper.cs

示例8: GetSitePageCount

 public int GetSitePageCount(ContentPageType.PageType entryType)
 {
     using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
         int iCount = CannedQueries.GetAllByTypeList(_db, this.SiteID, false, entryType).Count();
         return iCount;
     }
 }
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:7,代码来源:SiteData.cs

示例9: GetCommentsBySitePageNumber

        public static List<PostComment> GetCommentsBySitePageNumber(Guid siteID, int iPageNbr, int iPageSize, string SortBy, ContentPageType.PageType pageType, bool? approved, bool? spam)
        {
            int startRec = iPageNbr * iPageSize;
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
                IQueryable<vw_carrot_Comment> lstComments = (from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType, approved, spam)
                                                             select c);

                return PaginateComments(lstComments, iPageNbr, iPageSize, SortBy).ToList();
            }
        }
开发者ID:sunsiz,项目名称:CarrotCakeCMS,代码行数:10,代码来源:PostComment.cs

示例10: GetCommentCountBySiteAndType

 public static int GetCommentCountBySiteAndType(Guid siteID, ContentPageType.PageType pageType, bool? approved, bool? spam)
 {
     using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
         return (from c in CannedQueries.GetSiteContentCommentsByPostType(_db, siteID, pageType, approved, spam)
                 select c).Count();
     }
 }
开发者ID:sunsiz,项目名称:CarrotCakeCMS,代码行数:7,代码来源:PostComment.cs

示例11: GetSitePageCount

 public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType, bool bActiveOnly)
 {
     return _navHelper.GetSitePageCount(siteID, entryType, bActiveOnly);
 }
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:4,代码来源:SiteNavHelper.cs

示例12: GetLatestContentPagedList

 public List<SiteNav> GetLatestContentPagedList(Guid siteID, ContentPageType.PageType postType, bool bActiveOnly, int pageSize, int pageNumber)
 {
     return _navHelper.GetLatestContentPagedList(siteID, postType, bActiveOnly, pageSize, pageNumber);
 }
开发者ID:mjohn,项目名称:CarrotCakeCMS,代码行数:4,代码来源:SiteNavHelper.cs

示例13: GetSitePageCount

		public int GetSitePageCount(Guid siteID, ContentPageType.PageType entryType) {
			return 50;
		}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:3,代码来源:SiteNavHelperMock.cs

示例14: GetContentByStatusAndDateRange

        internal static IQueryable<vw_carrot_Content> GetContentByStatusAndDateRange(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType pageType,
            DateTime dateBegin, DateTime dateEnd, bool? bActive, bool? bSiteMap, bool? bSiteNav, bool? bBlock)
        {
            Guid gContent = ContentPageType.GetIDByType(ContentPageType.PageType.ContentEntry);
            Guid gBlog = ContentPageType.GetIDByType(ContentPageType.PageType.BlogEntry);
            Guid contentTypeID = ContentPageType.GetIDByType(pageType);

            return (from ct in ctx.vw_carrot_Contents
                    orderby ct.ContentTypeValue, ct.NavMenuText
                    where ct.SiteID == siteID
                        && ct.IsLatestVersion == true
                        && ct.GoLiveDate >= dateBegin
                        && ct.GoLiveDate <= dateEnd
                        && (ct.ContentTypeID == contentTypeID || pageType == ContentPageType.PageType.Unknown)
                        && (ct.PageActive == Convert.ToBoolean(bActive) || bActive == null)
                        && (ct.BlockIndex == Convert.ToBoolean(bBlock) || bBlock == null)
                        && ((ct.ShowInSiteMap == Convert.ToBoolean(bSiteMap) && ct.ContentTypeID == gContent) || bSiteMap == null)
                        && ((ct.ShowInSiteNav == Convert.ToBoolean(bSiteNav) && ct.ContentTypeID == gContent) || bSiteNav == null)
                    select ct);
        }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:20,代码来源:CannedQueries.cs

示例15: GetSiteContentCommentsByPostType

 internal static IQueryable<vw_carrot_Comment> GetSiteContentCommentsByPostType(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType contentEntry)
 {
     return (from r in ctx.vw_carrot_Comments
             orderby r.CreateDate descending
             where r.SiteID == siteID
                 && r.ContentTypeID == ContentPageType.GetIDByType(contentEntry)
             select r);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:8,代码来源:CannedQueries.cs


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