예제 #1
0
 public ServerResponse EditPage(WebPage page)
 {
     return page.Save(o => pageProvider.UpdatePage(o));
 }
예제 #2
0
 public ServerResponse AddPage(WebPage page)
 {
     return page.Save(o => pageProvider.AddPage(o));
 }
예제 #3
0
파일: CmsHelper.cs 프로젝트: cairabbit/daf
 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();
 }
예제 #4
0
파일: CmsHelper.cs 프로젝트: cairabbit/daf
 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;
 }
예제 #5
0
 public bool UpdatePage(WebPage page)
 {
     return repoPage.Update(page);
 }
예제 #6
0
 public bool AddPage(WebPage page)
 {
     return repoPage.Insert(page);
 }