Skip to content

Commit b3f320b

Browse files
committed
add cs solution
1 parent 0e0fd6a commit b3f320b

22 files changed

+861
-0
lines changed

CS/MvcDashboard_UnderlyingData.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.2.32602.215
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcDashboard_UnderlyingData", "MvcDashboard_UnderlyingData\MvcDashboard_UnderlyingData.csproj", "{8BD9CD1A-9656-42EE-9358-61E224CD7C59}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{8BD9CD1A-9656-42EE-9358-61E224CD7C59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{8BD9CD1A-9656-42EE-9358-61E224CD7C59}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{8BD9CD1A-9656-42EE-9358-61E224CD7C59}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{8BD9CD1A-9656-42EE-9358-61E224CD7C59}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {97F20957-32B0-4536-A7EE-3947A557BD4A}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Dashboard>
3+
<Title Text="Dashboard" />
4+
<DataSources>
5+
<SqlDataSource Name="SalesPerson" ComponentName="DataSource1">
6+
<Connection Name="nwindConnection" FromAppConfig="true" />
7+
<Query Type="SelectQuery" Name="SalesPerson">
8+
<Tables>
9+
<Table Name="SalesPerson" />
10+
</Tables>
11+
<Columns>
12+
<AllColumns Table="SalesPerson" />
13+
</Columns>
14+
</Query>
15+
<ConnectionOptions CloseConnection="true" />
16+
</SqlDataSource>
17+
</DataSources>
18+
<Items>
19+
<Chart ComponentName="chartDashboardItem1" Name="Chart 1" DataSource="DataSource1" DataMember="SalesPerson" Rotated="true">
20+
<DataItems>
21+
<Dimension DataMember="CategoryName" TopNEnabled="true" TopNMeasure="DataItem0" DefaultId="DataItem1" />
22+
<Measure DataMember="Extended Price" DefaultId="DataItem0" />
23+
</DataItems>
24+
<Arguments>
25+
<Argument DefaultId="DataItem1" />
26+
</Arguments>
27+
<Panes>
28+
<Pane Name="Pane 1">
29+
<Series>
30+
<Simple>
31+
<Value DefaultId="DataItem0" />
32+
</Simple>
33+
</Series>
34+
</Pane>
35+
</Panes>
36+
<ChartLegend Visible="false" />
37+
</Chart>
38+
<Card ComponentName="cardDashboardItem1" Name="Card 1" DataSource="DataSource1" DataMember="SalesPerson">
39+
<DataItems>
40+
<Measure DataMember="Extended Price" DefaultId="DataItem0" />
41+
<Dimension DataMember="Sales Person" DefaultId="DataItem1" />
42+
<Dimension DataMember="OrderDate" DateTimeGroupInterval="MonthYear" DefaultId="DataItem2" />
43+
</DataItems>
44+
<SeriesDimensions>
45+
<SeriesDimension DefaultId="DataItem1" />
46+
</SeriesDimensions>
47+
<Card>
48+
<ActualValue DefaultId="DataItem0" />
49+
<AbsoluteVariationNumericFormat />
50+
<PercentVariationNumericFormat />
51+
<PercentOfTargetNumericFormat />
52+
<LayoutTemplate Type="Stretched">
53+
<TopValue Visible="true" ValueType="ActualValue" DimensionIndex="0" />
54+
<MainValue Visible="true" ValueType="Title" DimensionIndex="0" />
55+
<SubValue Visible="true" ValueType="Subtitle" DimensionIndex="0" />
56+
<BottomValue1 Visible="true" ValueType="PercentVariation" DimensionIndex="0" />
57+
<BottomValue2 Visible="true" ValueType="AbsoluteVariation" DimensionIndex="0" />
58+
<DeltaIndicator Visible="true" />
59+
<Sparkline Visible="true" />
60+
</LayoutTemplate>
61+
</Card>
62+
<SparklineArgument DefaultId="DataItem2" />
63+
</Card>
64+
</Items>
65+
<LayoutTree>
66+
<LayoutGroup Weight="100">
67+
<LayoutGroup Orientation="Vertical" Weight="100">
68+
<LayoutItem DashboardItem="cardDashboardItem1" Weight="100" />
69+
<LayoutItem DashboardItem="chartDashboardItem1" Weight="100" />
70+
</LayoutGroup>
71+
</LayoutGroup>
72+
</LayoutTree>
73+
</Dashboard>
1.3 MB
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System.Web.Routing;
2+
using DevExpress.DashboardWeb;
3+
using DevExpress.DashboardWeb.Mvc;
4+
using DevExpress.DataAccess.Web;
5+
6+
namespace MvcDashboard_UnderlyingData {
7+
public class DashboardConfig {
8+
public static void RegisterService(RouteCollection routes) {
9+
routes.MapDashboardRoute("api/dashboard", "DefaultDashboard");
10+
11+
// Uncomment this line to save dashboards to the App_Data folder.
12+
DashboardConfigurator.Default.SetDashboardStorage(new DashboardFileStorage(@"~/App_Data/Dashboards"));
13+
14+
DashboardConfigurator.Default.SetConnectionStringsProvider(new ConfigFileConnectionStringsProvider());
15+
16+
// Uncomment these lines to create an in-memory storage of dashboard data sources. Use the DataSourceInMemoryStorage.RegisterDataSource
17+
// method to register the existing data source in the created storage.
18+
//var dataSourceStorage = new DataSourceInMemoryStorage();
19+
//DashboardConfigurator.Default.SetDataSourceStorage(dataSourceStorage);
20+
}
21+
}
22+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Web;
2+
using System.Web.Mvc;
3+
4+
namespace MvcDashboard_UnderlyingData {
5+
public class FilterConfig {
6+
public static void RegisterGlobalFilters(GlobalFilterCollection filters) {
7+
filters.Add(new HandleErrorAttribute());
8+
}
9+
}
10+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace MvcDashboard_UnderlyingData {
9+
public class RouteConfig {
10+
public static void RegisterRoutes(RouteCollection routes) {
11+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
12+
routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");
13+
14+
routes.MapRoute(
15+
name: "Default", // Route name
16+
url: "{controller}/{action}/{id}", // URL with parameters
17+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
18+
);
19+
}
20+
}
21+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web.Http;
5+
6+
namespace MvcDashboard_UnderlyingData {
7+
public static class WebApiConfig {
8+
public static void Register(HttpConfiguration config) {
9+
config.Routes.MapHttpRoute(
10+
name: "DefaultApi",
11+
routeTemplate: "api/{controller}/{id}",
12+
defaults: new { id = RouteParameter.Optional }
13+
);
14+
}
15+
}
16+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using DevExpress.DashboardWeb.Mvc;
2+
3+
namespace MvcDashboard_UnderlyingData.Controllers {
4+
public class DefaultDashboardController : DashboardController {
5+
6+
}
7+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
7+
namespace MvcDashboard_UnderlyingData.Controllers
8+
{
9+
public class HomeController : Controller
10+
{
11+
public ActionResult Index()
12+
{
13+
return View();
14+
}
15+
}
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<%@ Application Codebehind="Global.asax.cs" Inherits="MvcDashboard_UnderlyingData.MvcApplication" Language="C#" %>

0 commit comments

Comments
 (0)