コード例 #1
0
 private void GetPage(Guid pageGuid)
 {
     using (IDataReader reader = DBPageSettings.GetPage(pageGuid))
     {
         LoadFromReader(reader);
     }
 }
コード例 #2
0
ファイル: PageSettings.cs プロジェクト: wqshabib/mojoportal
 private bool Update()
 {
     return(DBPageSettings.UpdatePage(
                this.siteID,
                this.pageID,
                this.parentID,
                this.pageName,
                this.pageTitle,
                this.skin,
                this.pageOrder,
                this.authorizedRoles,
                this.editRoles,
                this.draftEditOnlyRoles,
                this.draftApprovalRoles,
                this.createChildPageRoles,
                this.createChildDraftRoles,
                this.requireSSL,
                this.allowBrowserCache,
                this.showBreadcrumbs,
                this.showChildPageBreadcrumbs,
                this.pageMetaKeyWords,
                this.pageMetaDescription,
                this.pageMetaEncoding,
                this.pageMetaAdditional,
                this.useUrl,
                this.url,
                this.openInNewWindow,
                this.showChildPageMenu,
                this.hideMainMenu,
                this.includeInMenu,
                this.menuImage,
                this.changeFrequency.ToString(),
                this.siteMapPriority,
                this.parentGuid,
                this.hideAfterLogin,
                this.compiledMeta,
                this.compiledMetaUtc,
                this.includeInSiteMap,
                this.isClickable,
                this.showHomeCrumb,
                this.isPending,
                this.canonicalOverride,
                this.includeInSearchMap,
                this.enableComments,
                this.includeInChildSiteMap,
                this.expandOnSiteMap,
                this.pubTeamId,
                this.bodyCssClass,
                this.menuCssClass,
                this.publishMode,
                this.createdUtc,
                this.createdBy,
                this.lastModBy,
                this.lastModFromIp,
                this.menuDescription,
                this.linkRel,
                this.pageHeading,
                this.showPageHeading,
                this.pubDateUtc));
 }
コード例 #3
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
 private bool Update()
 {
     return(DBPageSettings.UpdatePage(
                this.SiteId,
                this.PageId,
                this.ParentId,
                this.PageName,
                this.PageTitle,
                this.Skin,
                this.PageOrder,
                this.AuthorizedRoles,
                this.EditRoles,
                this.DraftEditOnlyRoles,
                this.DraftApprovalRoles,
                this.CreateChildPageRoles,
                this.CreateChildDraftRoles,
                this.RequireSsl,
                this.AllowBrowserCache,
                this.ShowBreadcrumbs,
                this.ShowChildPageBreadcrumbs,
                this.PageMetaKeyWords,
                this.PageMetaDescription,
                this.PageMetaEncoding,
                this.PageMetaAdditional,
                this.UseUrl,
                this.Url,
                this.OpenInNewWindow,
                this.ShowChildPageMenu,
                this.HideMainMenu,
                this.IncludeInMenu,
                this.MenuImage,
                this.ChangeFrequency.ToString(),
                this.SiteMapPriority,
                this.ParentGuid,
                this.HideAfterLogin,
                this.CompiledMeta,
                this.CompiledMetaUtc,
                this.IncludeInSiteMap,
                this.IsClickable,
                this.ShowHomeCrumb,
                this.IsPending,
                this.CanonicalOverride,
                this.IncludeInSearchMap,
                this.EnableComments,
                this.IncludeInChildSiteMap,
                this.ExpandOnSiteMap,
                this.PubTeamId,
                this.BodyCssClass,
                this.MenuCssClass,
                this.PublishMode,
                this.CreatedUtc,
                this.CreatedBy,
                this.LastModBy,
                this.LastModFromIp,
                this.MenuDescription,
                this.LinkRel,
                this.PageHeading,
                this.ShowPageHeading,
                this.PubDateUtc));
 }
コード例 #4
0
        public static bool DeletePage(int pageId)
        {
            bool result = DBPageSettings.DeletePage(pageId);

            DBPageSettings.CleanupOrphans();
            return(result);
        }
コード例 #5
0
 private void GetPage(int siteId, int pageId)
 {
     using (IDataReader reader = DBPageSettings.GetPage(siteId, pageId))
     {
         LoadFromReader(reader);
     }
 }
コード例 #6
0
        //public static IDataReader GetChildPagesByPageId(int pageId)
        //{
        //    return DBPageSettings.GetChildPages(pageId);
        //}

        public static bool Exists(Guid pageGuid)
        {
            bool result = false;

            using (IDataReader reader = DBPageSettings.GetPage(pageGuid))
            {
                if (reader.Read())
                {
                    result = true;
                }
            }

            return(result);
        }
コード例 #7
0
        private void GetBreadcrumbs(int pageId)
        {
            using (IDataReader reader = DBPageSettings.GetBreadcrumbs(pageId))
            {
                if (reader.Read())
                {
                    this.pageID   = Convert.ToInt32(reader["PageID"], CultureInfo.InvariantCulture);
                    this.pageName = reader["PageName"].ToString();

                    this.parent1ID    = Convert.ToInt32(reader["Parent1ID"], CultureInfo.InvariantCulture);
                    this.parent1Name  = reader["Parent1Name"].ToString();
                    this.parent2ID    = Convert.ToInt32(reader["Parent2ID"], CultureInfo.InvariantCulture);
                    this.parent2Name  = reader["Parent2Name"].ToString();
                    this.parent3ID    = Convert.ToInt32(reader["Parent3ID"], CultureInfo.InvariantCulture);
                    this.parent3Name  = reader["Parent3Name"].ToString();
                    this.parent4ID    = Convert.ToInt32(reader["Parent4ID"], CultureInfo.InvariantCulture);
                    this.parent4Name  = reader["Parent4Name"].ToString();
                    this.parent5ID    = Convert.ToInt32(reader["Parent5ID"], CultureInfo.InvariantCulture);
                    this.parent5Name  = reader["Parent5Name"].ToString();
                    this.parent6ID    = Convert.ToInt32(reader["Parent6ID"], CultureInfo.InvariantCulture);
                    this.parent6Name  = reader["Parent6Name"].ToString();
                    this.parent7ID    = Convert.ToInt32(reader["Parent7ID"], CultureInfo.InvariantCulture);
                    this.parent7Name  = reader["Parent7Name"].ToString();
                    this.parent8ID    = Convert.ToInt32(reader["Parent8ID"], CultureInfo.InvariantCulture);
                    this.parent8Name  = reader["Parent8Name"].ToString();
                    this.parent9ID    = Convert.ToInt32(reader["Parent9ID"], CultureInfo.InvariantCulture);
                    this.parent9Name  = reader["Parent9Name"].ToString();
                    this.parent10ID   = Convert.ToInt32(reader["Parent10ID"], CultureInfo.InvariantCulture);
                    this.parent10Name = reader["Parent10Name"].ToString();
                    this.parent11ID   = Convert.ToInt32(reader["Parent11ID"], CultureInfo.InvariantCulture);
                    this.parent11Name = reader["Parent11Name"].ToString();
                    this.parent12ID   = Convert.ToInt32(reader["Parent12ID"], CultureInfo.InvariantCulture);
                    this.parent12Name = reader["Parent12Name"].ToString();
                }
            }
        }
コード例 #8
0
 public static bool UpdateTimestamp(
     int pageId,
     DateTime lastModifiedUtc)
 {
     return(DBPageSettings.UpdateTimestamp(pageId, lastModifiedUtc));
 }
コード例 #9
0
 public static bool UpdatePageOrder(int pageId, int pageOrder)
 {
     return(DBPageSettings.UpdatePageOrder(pageId, pageOrder));
 }
コード例 #10
0
 public static IDataReader GetPendingPageListPage(Guid siteGuid, int pageNumber, int pageSize, out int totalPages)
 {
     return(DBPageSettings.GetPendingPageListPage(siteGuid, pageNumber, pageSize, out totalPages));
 }
コード例 #11
0
 public static IDataReader GetPageList(int siteId)
 {
     return(DBPageSettings.GetPageList(siteId));
 }
コード例 #12
0
        private bool Create()
        {
            int newID = -1;

            if (this.pageGuid == Guid.Empty)
            {
                this.pageGuid = Guid.NewGuid();
            }

            newID = DBPageSettings.Create(
                this.siteID,
                this.parentID,
                this.pageName,
                this.pageTitle,
                this.skin,
                this.pageOrder,
                this.authorizedRoles,
                this.editRoles,
                this.draftEditOnlyRoles,
                this.createChildPageRoles,
                this.createChildDraftRoles,
                this.requireSSL,
                this.allowBrowserCache,
                this.showBreadcrumbs,
                this.showChildPageBreadcrumbs,
                this.pageMetaKeyWords,
                this.pageMetaDescription,
                this.pageMetaEncoding,
                this.pageMetaAdditional,
                this.useUrl,
                this.url,
                this.openInNewWindow,
                this.showChildPageMenu,
                this.hideMainMenu,
                this.includeInMenu,
                this.menuImage,
                this.changeFrequency.ToString(),
                this.siteMapPriority,
                this.pageGuid,
                this.parentGuid,
                this.hideAfterLogin,
                this.siteGuid,
                this.compiledMeta,
                this.compiledMetaUtc,
                this.includeInSiteMap,
                this.isClickable,
                this.showHomeCrumb,
                this.isPending,
                this.canonicalOverride,
                this.includeInSearchMap,
                this.enableComments);

            this.pageID = newID;

            bool result = (newID > -1);


            if (result)
            {
                PageCreatedEventArgs e = new PageCreatedEventArgs();
                OnPageCreated(e);
            }

            return(result);
        }
コード例 #13
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
 private IDataReader GetChildPages()
 {
     return(DBPageSettings.GetChildPages(this.SiteId, this.ParentId));
 }
コード例 #14
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
 public static IDataReader GetChildPagesSortedAlphabetic(int siteId, int parentId)
 {
     return(DBPageSettings.GetChildPagesSortedAlphabetic(siteId, parentId));
 }
コード例 #15
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
 public static int GetCountChildPages(int parentPageId, bool includePending)
 {
     return(DBPageSettings.GetCountChildPages(parentPageId, includePending));
 }
コード例 #16
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
        private bool Create()
        {
            int newID = -1;

            if (this.PageGuid == Guid.Empty)
            {
                this.PageGuid = Guid.NewGuid();
            }

            newID = DBPageSettings.Create(
                this.SiteId,
                this.ParentId,
                this.PageName,
                this.PageTitle,
                this.Skin,
                this.PageOrder,
                this.AuthorizedRoles,
                this.EditRoles,
                this.DraftEditOnlyRoles,
                this.DraftApprovalRoles,
                this.CreateChildPageRoles,
                this.CreateChildDraftRoles,
                this.RequireSsl,
                this.AllowBrowserCache,
                this.ShowBreadcrumbs,
                this.ShowChildPageBreadcrumbs,
                this.PageMetaKeyWords,
                this.PageMetaDescription,
                this.PageMetaEncoding,
                this.PageMetaAdditional,
                this.UseUrl,
                this.Url,
                this.OpenInNewWindow,
                this.ShowChildPageMenu,
                this.HideMainMenu,
                this.IncludeInMenu,
                this.MenuImage,
                this.ChangeFrequency.ToString(),
                this.SiteMapPriority,
                this.PageGuid,
                this.ParentGuid,
                this.HideAfterLogin,
                this.SiteGuid,
                this.CompiledMeta,
                this.CompiledMetaUtc,
                this.IncludeInSiteMap,
                this.IsClickable,
                this.ShowHomeCrumb,
                this.IsPending,
                this.CanonicalOverride,
                this.IncludeInSearchMap,
                this.EnableComments,
                this.IncludeInChildSiteMap,
                this.ExpandOnSiteMap,
                this.PubTeamId,
                this.BodyCssClass,
                this.MenuCssClass,
                this.PublishMode,
                this.CreatedBy,
                this.CreatedFromIp,
                this.MenuDescription,
                this.LinkRel,
                this.PageHeading,
                this.ShowPageHeading,
                this.PubDateUtc);

            this.PageId = newID;

            bool result = (newID > -1);


            if (result)
            {
                PageCreatedEventArgs e = new PageCreatedEventArgs();
                OnPageCreated(e);
            }

            return(result);
        }
コード例 #17
0
 public static int GetNextPageOrder(int siteId, int parentId)
 {
     return(DBPageSettings.GetNextPageOrder(siteId, parentId));
 }
コード例 #18
0
 private IDataReader GetChildPages()
 {
     return(DBPageSettings.GetChildPages(this.siteID, this.parentID));
 }
コード例 #19
0
ファイル: PageSettings.cs プロジェクト: wang2245/mojoportal
 public static int GetCount(int siteId, bool includePending)
 {
     return(DBPageSettings.GetCount(siteId, includePending));
 }