Skip to content

Commit

Permalink
Merge pull request #2 from Backiaraj/schedule
Browse files Browse the repository at this point in the history
Update the project
  • Loading branch information
rajendranr-5483 authored Oct 22, 2023
2 parents 7b15114 + 3eb3a54 commit 3cc5efc
Show file tree
Hide file tree
Showing 55 changed files with 1,789 additions and 1,495 deletions.
37 changes: 37 additions & 0 deletions AirfareCalendar.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirfareCalendar.Server", "Server\AirfareCalendar.Server.csproj", "{4F0D37C1-C729-42FD-B0EB-3E53C722E52F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirfareCalendar.Client", "Client\AirfareCalendar.Client.csproj", "{3E68A013-6F5B-4730-BFA2-D9EC8285EB2B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirfareCalendar.Shared", "Shared\AirfareCalendar.Shared.csproj", "{8417C007-B531-46D9-88C9-13DAF96F4D64}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F0D37C1-C729-42FD-B0EB-3E53C722E52F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F0D37C1-C729-42FD-B0EB-3E53C722E52F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F0D37C1-C729-42FD-B0EB-3E53C722E52F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F0D37C1-C729-42FD-B0EB-3E53C722E52F}.Release|Any CPU.Build.0 = Release|Any CPU
{3E68A013-6F5B-4730-BFA2-D9EC8285EB2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E68A013-6F5B-4730-BFA2-D9EC8285EB2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E68A013-6F5B-4730-BFA2-D9EC8285EB2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E68A013-6F5B-4730-BFA2-D9EC8285EB2B}.Release|Any CPU.Build.0 = Release|Any CPU
{8417C007-B531-46D9-88C9-13DAF96F4D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8417C007-B531-46D9-88C9-13DAF96F4D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8417C007-B531-46D9-88C9-13DAF96F4D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8417C007-B531-46D9-88C9-13DAF96F4D64}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {08989B12-F5C6-4311-BFEC-DF06A4BD3729}
EndGlobalSection
EndGlobal
20 changes: 20 additions & 0 deletions Client/AirfareCalendar.Client.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.2" PrivateAssets="all" />
<PackageReference Include="Syncfusion.Blazor.Schedule" Version="23.1.41" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.41" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Shared\AirfareCalendar.Shared.csproj" />
</ItemGroup>

</Project>
22 changes: 12 additions & 10 deletions App.razor → Client/App.razor
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
34 changes: 18 additions & 16 deletions Pages/Counter.razor → Client/Pages/Counter.razor
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
@page "/counter"

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
private int currentCount = 0;

private void IncrementCount()
{
currentCount++;
}
}
@page "/counter"

<PageTitle>Counter</PageTitle>

<h1>Counter</h1>

<p role="status">Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
private int currentCount = 0;

private void IncrementCount()
{
currentCount++;
}
}
102 changes: 47 additions & 55 deletions Pages/FetchData.razor → Client/Pages/FetchData.razor
Original file line number Diff line number Diff line change
@@ -1,55 +1,47 @@
@page "/fetchdata"
@inject HttpClient Http

<h1>Weather forecast</h1>

<p>This component demonstrates fetching data from the server.</p>

@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}

@code {
private WeatherForecast[] forecasts;

protected override async Task OnInitializedAsync()
{
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}

public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public string Summary { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}
@page "/fetchdata"
@using AirfareCalendar.Shared
@inject HttpClient Http

<PageTitle>Weather forecast</PageTitle>

<h1>Weather forecast</h1>

<p>This component demonstrates fetching data from the server.</p>

@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}

@code {
private WeatherForecast[]? forecasts;

protected override async Task OnInitializedAsync()
{
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");
}
}
Loading

0 comments on commit 3cc5efc

Please sign in to comment.