Exemplo n.º 1
0
 public ViewPage ToResult(ControllerConfiguration configuration)
 {
     if (!(_requiresMetaData))
     {
         Fields.Clear();
         Expressions = null;
     }
     else
     {
         XPathNodeIterator viewIterator = configuration.Navigator.Select("/c:dataController/c:views/c:view[not(@virtualViewId!=\'\')]", configuration.Resolver);
         while (viewIterator.MoveNext())
         {
             Views.Add(new View(viewIterator.Current, configuration.Resolver));
         }
         XPathNodeIterator actionGroupIterator = configuration.Navigator.Select("/c:dataController/c:actions//c:actionGroup", configuration.Resolver);
         while (actionGroupIterator.MoveNext())
         {
             ActionGroups.Add(new ActionGroup(actionGroupIterator.Current, configuration.Resolver));
         }
         foreach (DataField field in Fields)
         {
             PopulateStaticItems(field, null);
         }
     }
     if (_originalFilter != null)
     {
         _filter = _originalFilter;
     }
     return(this);
 }
Exemplo n.º 2
0
        ControllerConfiguration IPlugIn.Create(ControllerConfiguration config)
        {
            XmlDocument document = new XmlDocument();

            document.LoadXml(config.Navigator.OuterXml);
            return(new ControllerConfiguration(document.CreateNavigator()));
        }
Exemplo n.º 3
0
 public ViewPage ToResult(ControllerConfiguration configuration, XPathNavigator mainView)
 {
     if (!(_requiresMetaData))
     {
         Fields.Clear();
         Expressions = null;
     }
     else
     {
         XPathNodeIterator viewIterator = configuration.Navigator.Select("/c:dataController/c:views/c:view[not(@virtualViewId!=\'\')]", configuration.Resolver);
         while (viewIterator.MoveNext())
         {
             Views.Add(new View(viewIterator.Current, mainView, configuration.Resolver));
         }
         XPathNodeIterator actionGroupIterator = configuration.Navigator.Select("/c:dataController/c:actions//c:actionGroup", configuration.Resolver);
         while (actionGroupIterator.MoveNext())
         {
             ActionGroups.Add(new ActionGroup(actionGroupIterator.Current, configuration.Resolver));
         }
         foreach (DataField field in Fields)
         {
             PopulateStaticItems(field, null);
         }
     }
     if (_originalFilter != null)
     {
         _filter = _originalFilter;
     }
     if (RequiresMetaData && ((HttpContext.Current != null) && (HttpContext.Current.Session != null)))
     {
         LEVs = ((FieldValue[])(HttpContext.Current.Session[String.Format("{0}$LEVs", _controller)]));
     }
     AddPivotHeadersToFields();
     return(this);
 }