internal IList<CmsContent> GetAllContent(Data.Guid siteGuid) { CmsContentDao dao = new CmsContentDao(); return dao.FindAllContent(siteGuid); }
public IList<CmsContent> GetUnapprovedContent(Data.Guid siteGuid) { CmsContentDao dao = new CmsContentDao(); return dao.FindUnapprovedContent(siteGuid); }
public void Save(CmsContent item) { CmsContentDao dao = new CmsContentDao(); using (Transaction tx = new Transaction()) { dao.Save<CmsContent>(item); tx.Commit(); } SitePageCacheRefreshInvoker.InvokeRefresh(item.SubscriptionId, SitePageRefreshRequest.PageRefreshType.All); }
public CmsContent GetFile(Data.Guid siteGuid, string filename) { CmsContentDao dao = new CmsContentDao(); return dao.FindByFilename(siteGuid, filename); }
public IList<CmsContent> GetFileContent(Data.Guid siteGuid) { CmsContentDao dao = new CmsContentDao(); return dao.FindFilesBySite(siteGuid); }
public IList<CmsContent> GetExistingContent(Data.Guid siteGuid, CmsContentType filter) { CmsContentDao dao = new CmsContentDao(); IList<CmsContent> results; if (filter == null) { results = dao.FindAllContent(siteGuid); } else { results = dao.FindContentByType(siteGuid,filter); } return results; }
public CmsContent GetContent(Data.Guid siteGuid, Data.Guid contentGuid) { CmsContentDao dao = new CmsContentDao(); return dao.FindByGuid(siteGuid,contentGuid); }
public void Delete(CmsContent content) { if (content != null) { CmsContentDao dao = new CmsContentDao(); using (Transaction tx = new Transaction()) { dao.Delete<CmsContent>(content); tx.Commit(); } } }
public CmsContent CreateContent(CmsContent content, System.Web.UI.WebControls.Table dynamicControls) { if (content.SubscriptionId == null) throw new ApplicationException("The subscription id must not be null. This is a programming error."); IList<CmsContentField> fields = new List<CmsContentField>(); PopulateFields(content.SubscriptionId,dynamicControls, content, null); CmsContentDao dao = new CmsContentDao(); using (Transaction tx = new Transaction()) { dao.Save<CmsContent>(content); tx.Commit(); } return content; }
private void loadContentFromQuerystring(String contentType) { String guid = WebRequestContext.Instance.Request[contentType]; //If the guid is null, check if they used the default identifier instead of a content type identifier if (guid == null) guid = WebRequestContext.Instance.Request.QueryString["cid"]; if (guid != null) { CmsContentDao dao = new CmsContentDao(); loadedContent = dao.FindByGuid(CurrentSite.Guid, guid); loadedContentType = contentType; } }