Skip to content

Commit f1a9fa0

Browse files
added sample
1 parent 4f774bd commit f1a9fa0

39 files changed

+486138
-0
lines changed
449 KB
Binary file not shown.

BlazorApp1/.vs/BlazorApp1/config/applicationhost.config

Lines changed: 999 additions & 0 deletions
Large diffs are not rendered by default.

BlazorApp1/.vs/BlazorApp1/v16/.suo

51 KB
Binary file not shown.

BlazorApp1/.vs/BlazorApp1/v16/Server/sqlite3/db.lock

Whitespace-only changes.
4.32 MB
Binary file not shown.

BlazorApp1/App.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Router AppAssembly="@typeof(Program).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
</Found>
5+
<NotFound>
6+
<LayoutView Layout="@typeof(MainLayout)">
7+
<p>Sorry, there's nothing at this address.</p>
8+
</LayoutView>
9+
</NotFound>
10+
</Router>

BlazorApp1/BlazorApp1.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageReference Include="Syncfusion.EJ2.Blazor" Version="17.3.0.18-beta" />
8+
</ItemGroup>
9+
</Project>

BlazorApp1/BlazorApp1.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 16
4+
VisualStudioVersion = 16.0.29311.281
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorApp1", "BlazorApp1.csproj", "{8F3D6DA2-ED85-46AA-B5FF-3A02C2F8F0EB}"
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+
{8F3D6DA2-ED85-46AA-B5FF-3A02C2F8F0EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{8F3D6DA2-ED85-46AA-B5FF-3A02C2F8F0EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{8F3D6DA2-ED85-46AA-B5FF-3A02C2F8F0EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{8F3D6DA2-ED85-46AA-B5FF-3A02C2F8F0EB}.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 = {FDDE275F-AAE3-490F-AF8E-B46D5BCF9DDC}
24+
EndGlobalSection
25+
EndGlobal

BlazorApp1/Data/WeatherForecast.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
5+
namespace BlazorApp1.Data
6+
{
7+
public class WeatherForecast
8+
{
9+
10+
public int OrderID { get; set; }
11+
public string CustomerID { get; set; }
12+
public int EmployeeID { get; set; }
13+
public double? Freight { get; set; }
14+
public DateTime? OrderDate { get; set; }
15+
public static List<WeatherForecast> order = new List<WeatherForecast>();
16+
public WeatherForecast()
17+
{
18+
19+
}
20+
public WeatherForecast(int OrderID, string CustomerId, int EmployeeId, double Freight, DateTime OrderDate)
21+
{
22+
this.OrderID = OrderID;
23+
this.CustomerID = CustomerId;
24+
this.EmployeeID = EmployeeId;
25+
this.Freight = Freight;
26+
this.OrderDate = OrderDate;
27+
}
28+
public static List<WeatherForecast> GetAllRecords()
29+
{
30+
if (order.Count() == 0)
31+
{
32+
int code = 10000;
33+
for (int i = 1; i < 10; i++)
34+
{
35+
order.Add(new WeatherForecast(code + 1, "ALFKI", i + 0, 2.3 * i, new DateTime(1991, 05, 15, 12, 57, 10)));
36+
order.Add(new WeatherForecast(code + 2, "ANATR", i + 2, 3.3 * i, new DateTime(1990, 04, 04, 12, 57, 10)));
37+
order.Add(new WeatherForecast(code + 3, "ANTON", i + 1, 4.3 * i, new DateTime(1957, 11, 30, 12, 57, 10)));
38+
order.Add(new WeatherForecast(code + 4, "BLONP", i + 3, 5.3 * i, new DateTime(1930, 10, 22, 12, 57, 10)));
39+
order.Add(new WeatherForecast(code + 5, "BOLID", i + 4, 6.3 * i, new DateTime(1953, 02, 18, 12, 57, 10)));
40+
code += 5;
41+
}
42+
}
43+
return order;
44+
}
45+
}
46+
47+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using System;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace BlazorApp1.Data
7+
{
8+
public class WeatherForecastService
9+
{
10+
public Task<WeatherForecast[]> GetForecastAsync()
11+
{
12+
Task.Delay(500);
13+
return Task.FromResult(WeatherForecast.GetAllRecords().ToArray());
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)