public static HitblPagePag CreateNewPage(Guid communityID, string pageType, string page, string pageTitle) { int newPageOrder = (int)SPs.HispCommunityGetMaxPageOrder(communityID).ExecuteScalar() + 1; HitblPagePag NewPage = new HitblPagePag(); NewPage.CtyId = communityID; NewPage.PagCreatedDate = DateTime.Now; NewPage.PagId = Guid.NewGuid(); NewPage.PagLastUpdate = DateTime.Now; NewPage.PagTitle = pageTitle; NewPage.PagOrderNr = newPageOrder; NewPage.Save(); Community.CreateDefaultWidgets(NewPage.PagId, pageType, page, "de-CH"); return(NewPage); }
public void Insert(Guid PagId, string PagTitle, DateTime PagCreatedDate, DateTime PagLastUpdate, Guid CtyId, int PagOrderNr) { HitblPagePag item = new HitblPagePag(); item.PagId = PagId; item.PagTitle = PagTitle; item.PagCreatedDate = PagCreatedDate; item.PagLastUpdate = PagLastUpdate; item.CtyId = CtyId; item.PagOrderNr = PagOrderNr; item.Save(UserName); }
public bool Destroy(object PagId) { return(HitblPagePag.Destroy(PagId) == 1); }
public bool Delete(object PagId) { return(HitblPagePag.Delete(PagId) == 1); }
/// <summary> /// Gets the first Page of the community (The non deletable page with sort order 1) /// </summary> /// <param name="n"></param> /// <returns></returns> public static HitblPagePag GetFirstPage(Guid communityID) { Guid fisrtPageID = (Guid)SPs.HispCommunityGetFirstPageID(communityID).ExecuteScalar(); return(HitblPagePag.FetchByID(fisrtPageID)); }
/// <summary> /// Gets the current Page of the community and set it in the user settings /// If the user has already visitetd the page it will be read form his settings, else page id with order 1 will come /// </summary> /// <param name="n"></param> /// <returns></returns> public static HitblPagePag GetCurrPage(Guid communityID, Guid userId) { Guid fisrtPageID = (Guid)SPs.HispCommunityGetCurrPageID(communityID, userId).ExecuteScalar(); return(HitblPagePag.FetchByID(fisrtPageID)); }