private Page CopyPage(Page sourcePage) { var pageCopy = new Page { ActionName = sourcePage.ActionName, ControllerName = sourcePage.ControllerName, Order = (sourcePage.Order + 1), PageParentId = sourcePage.PageParentId, PageTemplateId = sourcePage.PageTemplateId, PortalId = sourcePage.PortalId, ShowOnMenu = sourcePage.ShowOnMenu, Title = string.Format("Copy of {0}", sourcePage.Title) }; return pageCopy; }
/// <summary> /// Initializes a new instance of the <see cref="PageViewModel"/> class. /// </summary> /// <param name="page"> /// The page. /// </param> public PageViewModel(Page page) { this.Page = page; }
private Page AddPage(Page sourcePage) { var pageCopy = new Page { ActionName = sourcePage.ActionName, ControllerName = sourcePage.ControllerName, Order = (sourcePage.Order + 1), PageParentId = sourcePage.PageParentId, PageTemplateId = sourcePage.PageTemplateId, PortalId = sourcePage.PortalId, ShowOnMenu = sourcePage.ShowOnMenu, Title = "New Page" }; return pageCopy; }