Beispiel #1
0
 protected override IObjectDataSourceCustomFillService CreateViewService(IDashboardData dashboardData)
 {
     if (dashboardData.Title == "Sales Overview")
     {
         return(new DashboardViewDataSourceFillService());
     }
     return(base.CreateViewService(dashboardData));
 }
 private static IObjectDataSourceCustomFillService CreateServiceCore(IDashboardData dashboardData)
 {
     return(dashboardData != null && ((IDashboardDefinition)dashboardData).DataViewService
         ? (IObjectDataSourceCustomFillService) new XpandDashboardViewDataSourceFillService()
         : new XpandDashboardCollectionDataSourceFillService()
     {
         AllowObjectSpaceDisposing = false
     });
 }
        public static void Export(string filename)
        {
            string            fullName = Path.Combine(Globals.HostMapPath, filename);
            XmlWriterSettings settings = new XmlWriterSettings();

            using (XmlWriter writer = XmlWriter.Create(fullName, settings))
            {
                writer.WriteStartElement("dashboard");
                foreach (DashboardControl dashboard in GetDashboardControls(true))
                {
                    IDashboardData controller = Activator.CreateInstance(Reflection.CreateType(dashboard.ControllerClass)) as IDashboardData;
                    if (controller != null)
                    {
                        controller.ExportData(writer);
                    }
                }
                writer.WriteEndElement();
                writer.Flush();
            }
        }
 protected override IObjectDataSourceCustomFillService CreateService(IDashboardData dashboardData)
 {
     return(dashboardData is IDashboardDefinition?CreateServiceCore(dashboardData) : base.CreateService(dashboardData));
 }
Beispiel #5
0
 protected override IObjectDataSourceCustomFillService CreateService(IDashboardData dashboardData)
 {
     return(new ScriptingFillService(this, base.CreateService(dashboardData)));
 }