/// <summary> /// This is used to update the content in the ContentItems table. Should be called when an Event is updated. /// </summary> internal void UpdateContentEventRecurMaster(EventRecurMasterInfo objEventRecurMaster) { var objContent = Util.GetContentController().GetContentItem(objEventRecurMaster.ContentItemID); if (ReferenceEquals(objContent, null)) { return; } objContent.Content = objEventRecurMaster.EventDesc; objContent.ContentKey = "ItemID=" + objEventRecurMaster.RecurMasterID + "&mctl=EventDetails"; Util.GetContentController().UpdateContentItem(objContent); }
/// <summary> /// This should only run after the Event exists in the data store. /// </summary> /// <returns>The newly created ContentItemID from the data store.</returns> internal ContentItem CreateContentEventRecurMaster(EventRecurMasterInfo objEventRecurMaster, int tabId) { var objContent = new ContentItem { Content = objEventRecurMaster.EventDesc, ContentTypeId = GetContentTypeId(Constants.ContentEventRecurMasterTypeName), Indexed = false, ContentKey = "RecurItemID=" + objEventRecurMaster.RecurMasterID + "&mctl=EventDetails", ModuleID = objEventRecurMaster.ModuleID, TabID = tabId }; objContent.ContentItemId = Convert.ToInt32(Util.GetContentController().AddContentItem(objContent)); return(objContent); }