public PartialViewResult GetFields(PageCompareInfo info) { var pageManager = PageManager.GetManager(); var pfi = new List <PageFieldInfo>(); while (true) { var controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId1, info.Page, "", pfi); if (controlProperty == null) { break; } var fieldInfo = new PageFieldInfo(); fieldInfo.FieldName = controlProperty.Name; fieldInfo.Site1 = controlProperty.Value; controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId2, info.Page, controlProperty.Name, pfi); if (controlProperty == null) { break; } fieldInfo.Site2 = controlProperty.Value; if (info.SiteRootNodeId3 != null) { controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId3, info.Page, controlProperty.Name, pfi); if (controlProperty == null) { break; } fieldInfo.Site3 = controlProperty.Value; } pfi.Add(fieldInfo); } List <PageFieldInfo> pageFieldInfos = pfi; return(PartialView(pageFieldInfos)); }
public PartialViewResult GetFields(PageCompareInfo info) { var pageManager = PageManager.GetManager(); var pfi = new List<PageFieldInfo>(); while (true) { var controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId1, info.Page, "", pfi); if (controlProperty == null) break; var fieldInfo = new PageFieldInfo(); fieldInfo.FieldName = controlProperty.Name; fieldInfo.Site1 = controlProperty.Value; controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId2, info.Page, controlProperty.Name, pfi); if (controlProperty == null) break; fieldInfo.Site2 = controlProperty.Value; if (info.SiteRootNodeId3 != null) { controlProperty = BuildFieldInfo(pageManager, info.SiteRootNodeId3, info.Page, controlProperty.Name, pfi); if (controlProperty == null) break; fieldInfo.Site3 = controlProperty.Value; } pfi.Add(fieldInfo); } List<PageFieldInfo> pageFieldInfos = pfi; return PartialView(pageFieldInfos); }