public ServerResponse EditPage(WebPage page) { return page.Save(o => pageProvider.UpdatePage(o)); }
public ServerResponse AddPage(WebPage page) { return page.Save(o => pageProvider.AddPage(o)); }
public static string GetPageLinks(WebPage page, LinkedListNode<PageTemplate> template) { StringBuilder sb = new StringBuilder(); var node = template; while (node != null) { sb.AppendLine(node.Value.PageLinks); node = node.Next; } sb.AppendLine(page.PageLinks); return sb.ToString().Trim(); }
public static IEnumerable<SectionControl> GetControls(WebPage page, PageTemplate template, string section) { var cons = page.Controls.Where(o => o.Section == section).Select(o => o.ToSectionControl()) .Union(template.Controls.Where(o => o.Section == section).Select(o => o.ToSectionControl())) .OrderBy(o => o.Order); return cons; }
public bool UpdatePage(WebPage page) { return repoPage.Update(page); }
public bool AddPage(WebPage page) { return repoPage.Insert(page); }