Skip to content

Commit

Permalink
Merge pull request #2 from Backiaraj/kanban
Browse files Browse the repository at this point in the history
Update the project
  • Loading branch information
rajendranr-5483 committed Nov 10, 2023
2 parents b1837f3 + c20cc9d commit a8b9981
Show file tree
Hide file tree
Showing 53 changed files with 1,606 additions and 1,328 deletions.
37 changes: 37 additions & 0 deletions BindExpandAndDynamicObject.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}") = "BindExpandAndDynamicObject.Server", "Server\BindExpandAndDynamicObject.Server.csproj", "{78339983-AB23-4084-9A80-9A3BB0FD263E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BindExpandAndDynamicObject.Client", "Client\BindExpandAndDynamicObject.Client.csproj", "{015A98E3-2D7A-44ED-9974-EBEBE4261355}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BindExpandAndDynamicObject.Shared", "Shared\BindExpandAndDynamicObject.Shared.csproj", "{8F5D2E4F-56CC-447C-B6E9-DA37FF0711E7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{78339983-AB23-4084-9A80-9A3BB0FD263E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78339983-AB23-4084-9A80-9A3BB0FD263E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78339983-AB23-4084-9A80-9A3BB0FD263E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78339983-AB23-4084-9A80-9A3BB0FD263E}.Release|Any CPU.Build.0 = Release|Any CPU
{015A98E3-2D7A-44ED-9974-EBEBE4261355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{015A98E3-2D7A-44ED-9974-EBEBE4261355}.Debug|Any CPU.Build.0 = Debug|Any CPU
{015A98E3-2D7A-44ED-9974-EBEBE4261355}.Release|Any CPU.ActiveCfg = Release|Any CPU
{015A98E3-2D7A-44ED-9974-EBEBE4261355}.Release|Any CPU.Build.0 = Release|Any CPU
{8F5D2E4F-56CC-447C-B6E9-DA37FF0711E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F5D2E4F-56CC-447C-B6E9-DA37FF0711E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F5D2E4F-56CC-447C-B6E9-DA37FF0711E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F5D2E4F-56CC-447C-B6E9-DA37FF0711E7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AEC17F38-176E-4CB1-80D6-2E41DC0614B8}
EndGlobalSection
EndGlobal
22 changes: 12 additions & 10 deletions MyBlazorProject/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>
20 changes: 20 additions & 0 deletions Client/BindExpandAndDynamicObject.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.Kanban" Version="23.1.42" />
<PackageReference Include="Syncfusion.Blazor.Themes" Version="23.1.42" />
</ItemGroup>

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

</Project>
18 changes: 18 additions & 0 deletions Client/Pages/Counter.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@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 MyBlazorProject/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 BindExpandAndDynamicObject.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");
}
}
54 changes: 27 additions & 27 deletions MyBlazorProject/Pages/Index.razor → Client/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
@page "/"
@using System.Dynamic;
<SfKanban DataSource="@Tasks" KeyField="Status">
<KanbanColumns>
<KanbanColumn HeaderText="To Do" KeyField="@(new List<string>() {"Open" })"></KanbanColumn>
<KanbanColumn HeaderText="In Progress" KeyField="@(new List<string>() {"InProgress" })"></KanbanColumn>
<KanbanColumn HeaderText="Testing" KeyField="@(new List<string>() {"Testing" })"></KanbanColumn>
<KanbanColumn HeaderText="Done" KeyField="@(new List<string>() {"Close" })"></KanbanColumn>
</KanbanColumns>
<KanbanCardSettings HeaderField="Id" ContentField="Summary"></KanbanCardSettings>
</SfKanban>

@code{
public List<ExpandoObject> Tasks { get; set; } = new List<ExpandoObject>();

protected override void OnInitialized()
{
Tasks = Enumerable.Range(1, 20).Select((x) =>
{
dynamic d = new ExpandoObject();
d.Id = "Task 1000" + x;
d.Status = (new string[] { "Open", "In Progress", "Testing", "Close" })[new Random().Next(4)];
d.Summary = (new string[] { "Analyze the new requirements gathered from the customer.", "Improve application performance", "Fix the issues reported in the IE browser.", "Validate new requirements", "Test the application in the IE browser." })[new Random().Next(5)];
return d;
}).Cast<ExpandoObject>().ToList<ExpandoObject>();
}
}
@page "/"
@using System.Dynamic;
<SfKanban DataSource="@Tasks" KeyField="Status">
<KanbanColumns>
<KanbanColumn HeaderText="To Do" KeyField="@(new List<string>() {"Open" })"></KanbanColumn>
<KanbanColumn HeaderText="In Progress" KeyField="@(new List<string>() {"InProgress" })"></KanbanColumn>
<KanbanColumn HeaderText="Testing" KeyField="@(new List<string>() {"Testing" })"></KanbanColumn>
<KanbanColumn HeaderText="Done" KeyField="@(new List<string>() {"Close" })"></KanbanColumn>
</KanbanColumns>
<KanbanCardSettings HeaderField="Id" ContentField="Summary"></KanbanCardSettings>
</SfKanban>

@code {
public List<ExpandoObject> Tasks { get; set; } = new List<ExpandoObject>();

protected override void OnInitialized()
{
Tasks = Enumerable.Range(1, 20).Select((x) =>
{
dynamic d = new ExpandoObject();
d.Id = "Task 1000" + x;
d.Status = (new string[] { "Open", "In Progress", "Testing", "Close" })[new Random().Next(4)];
d.Summary = (new string[] { "Analyze the new requirements gathered from the customer.", "Improve application performance", "Fix the issues reported in the IE browser.", "Validate new requirements", "Test the application in the IE browser." })[new Random().Next(5)];
return d;
}).Cast<ExpandoObject>().ToList<ExpandoObject>();
}
}
12 changes: 12 additions & 0 deletions Client/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using BindExpandAndDynamicObject.Client;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Syncfusion.Blazor;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddSyncfusionBlazor();
await builder.Build().RunAsync();
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60407",
"sslPort": 44391
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"MyBlazorProject": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:8497",
"sslPort": 44345
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5089",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7246;http://localhost:5089",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
17 changes: 17 additions & 0 deletions Client/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@inherits LayoutComponentBase

<div class="page">
<div class="sidebar">
<NavMenu />
</div>

<main>
<div class="top-row px-4">
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div>

<article class="content px-4">
@Body
</article>
</main>
</div>
Loading

0 comments on commit a8b9981

Please sign in to comment.