Creation
This commit is contained in:
17
Client/Pages/Counter.razor
Normal file
17
Client/Pages/Counter.razor
Normal file
@ -0,0 +1,17 @@
|
||||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Counter</MudText>
|
||||
<MudText Class="mb-4">Current count: @currentCount</MudText>
|
||||
<MudButton Color="Color.Primary" Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
|
||||
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
32
Client/Pages/FetchData.razor
Normal file
32
Client/Pages/FetchData.razor
Normal file
@ -0,0 +1,32 @@
|
||||
@page "/fetchdata"
|
||||
@using Expose.MyIT.Shared
|
||||
@using Expose.MyIT.Shared.ViewModels
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Weather forecast</MudText>
|
||||
<MudText Class="mb-8">This component demonstrates fetching data from the server.</MudText>
|
||||
@if (_Forecasts == null)
|
||||
{
|
||||
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTable Items="_Forecasts" Hover="true" SortLabel="Sort By" Elevation="0">
|
||||
<HeaderContent>
|
||||
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<WeatherForecast, object>(x=>x.Date)">Date</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureC)">Temp. (C)</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureF)">Temp. (F)</MudTableSortLabel></MudTh>
|
||||
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.Summary!)">Summary</MudTableSortLabel></MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Date">@context.Date</MudTd>
|
||||
<MudTd DataLabel="Temp. (C)">@context.TemperatureC</MudTd>
|
||||
<MudTd DataLabel="Temp. (F)">@context.TemperatureF</MudTd>
|
||||
<MudTd DataLabel="Summary">@context.Summary</MudTd>
|
||||
</RowTemplate>
|
||||
<PagerContent>
|
||||
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
|
||||
</PagerContent>
|
||||
</MudTable>
|
||||
}
|
22
Client/Pages/FetchData.razor.cs
Normal file
22
Client/Pages/FetchData.razor.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Expose.MyIT.Shared.ViewModels;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
namespace Expose.MyIT.Client.Pages;
|
||||
|
||||
public partial class FetchData
|
||||
{
|
||||
|
||||
[Inject] protected HttpClient? Http { get; set; }
|
||||
|
||||
private WeatherForecast[]? _Forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (Http is null)
|
||||
throw new NullReferenceException(nameof(Http));
|
||||
string controllerName = MyIT.Shared.Models.Stateless.Methods.IWeatherForecastController.GetRouteName();
|
||||
// _SsaOrders = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
|
||||
_Forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>($"api/{controllerName}");
|
||||
}
|
||||
}
|
34
Client/Pages/FetchServiceShopOrders.razor
Normal file
34
Client/Pages/FetchServiceShopOrders.razor
Normal file
@ -0,0 +1,34 @@
|
||||
@page "/fetchServiceShoporders"
|
||||
@using Expose.MyIT.Shared
|
||||
@using Expose.MyIT.Shared.ViewModels
|
||||
|
||||
<PageTitle>Service-Shop Orders</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Service-Shop Orders</MudText>
|
||||
@if (_ServiceShopOrders == null)
|
||||
{
|
||||
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTable Items="_ServiceShopOrders" Hover="true" SortLabel="Sort By" Elevation="0">
|
||||
<HeaderContent>
|
||||
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<ServiceShopOrder, object>(x=>x.CreatedDate)">CreatedDate</MudTableSortLabel></MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Id">@context.Id</MudTd>
|
||||
<MudTd DataLabel="Name">@context.Name</MudTd>
|
||||
<MudTd DataLabel="BookingNames">@context.BookingNames</MudTd>
|
||||
<MudTd DataLabel="Type">@context.Type</MudTd>
|
||||
<MudTd DataLabel="State">@context.State</MudTd>
|
||||
<MudTd DataLabel="ItemNumber">@context.ItemNumber</MudTd>
|
||||
<MudTd DataLabel="CreatedDate">@context.CreatedDate</MudTd>
|
||||
<MudTd DataLabel="DecidedDate">@context.DecidedDate</MudTd>
|
||||
<MudTd DataLabel="Recipient">@context.Recipient</MudTd>
|
||||
<MudTd DataLabel="Requestor">@context.Requestor</MudTd>
|
||||
</RowTemplate>
|
||||
<PagerContent>
|
||||
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
|
||||
</PagerContent>
|
||||
</MudTable>
|
||||
}
|
32
Client/Pages/FetchServiceShopOrders.razor.cs
Normal file
32
Client/Pages/FetchServiceShopOrders.razor.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Expose.MyIT.Shared.ViewModels;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
namespace Expose.MyIT.Client.Pages;
|
||||
|
||||
public partial class FetchServiceShopOrders
|
||||
{
|
||||
|
||||
[Inject] protected HttpClient? Http { get; set; }
|
||||
|
||||
private ServiceShopOrder[]? _ServiceShopOrders;
|
||||
|
||||
//Id
|
||||
//Name
|
||||
//BookingNames
|
||||
//Type
|
||||
//State
|
||||
//ItemNumber
|
||||
//CreatedDate
|
||||
//DecidedDate
|
||||
//Recipient
|
||||
//Requestor
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (Http is null)
|
||||
throw new NullReferenceException(nameof(Http));
|
||||
string controllerName = MyIT.Shared.Models.Stateless.Methods.IServiceShopOrderController.GetRouteName();
|
||||
_ServiceShopOrders = await Http.GetFromJsonAsync<ServiceShopOrder[]>($"api/{controllerName}");
|
||||
}
|
||||
}
|
34
Client/Pages/FetchSsaOrders.razor
Normal file
34
Client/Pages/FetchSsaOrders.razor
Normal file
@ -0,0 +1,34 @@
|
||||
@page "/fetchssaorders"
|
||||
@using Expose.MyIT.Shared
|
||||
@using Expose.MyIT.Shared.ViewModels
|
||||
|
||||
<PageTitle>SSA Orders</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">SSA Orders</MudText>
|
||||
@if (_SsaOrders == null)
|
||||
{
|
||||
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudTable Items="_SsaOrders" Hover="true" SortLabel="Sort By" Elevation="0">
|
||||
<HeaderContent>
|
||||
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<SsaOrder, object>(x=>x.CreatedDate)">CreatedDate</MudTableSortLabel></MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="Id">@context.Id</MudTd>
|
||||
<MudTd DataLabel="Name">@context.Name</MudTd>
|
||||
<MudTd DataLabel="BookingNames">@context.BookingNames</MudTd>
|
||||
<MudTd DataLabel="Type">@context.Type</MudTd>
|
||||
<MudTd DataLabel="State">@context.State</MudTd>
|
||||
<MudTd DataLabel="ItemNumber">@context.ItemNumber</MudTd>
|
||||
<MudTd DataLabel="CreatedDate">@context.CreatedDate</MudTd>
|
||||
<MudTd DataLabel="DecidedDate">@context.DecidedDate</MudTd>
|
||||
<MudTd DataLabel="Recipient">@context.Recipient</MudTd>
|
||||
<MudTd DataLabel="Requestor">@context.Requestor</MudTd>
|
||||
</RowTemplate>
|
||||
<PagerContent>
|
||||
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
|
||||
</PagerContent>
|
||||
</MudTable>
|
||||
}
|
32
Client/Pages/FetchSsaOrders.razor.cs
Normal file
32
Client/Pages/FetchSsaOrders.razor.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using Expose.MyIT.Shared.ViewModels;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http.Json;
|
||||
|
||||
namespace Expose.MyIT.Client.Pages;
|
||||
|
||||
public partial class FetchSsaOrders
|
||||
{
|
||||
|
||||
[Inject] protected HttpClient? Http { get; set; }
|
||||
|
||||
private SsaOrder[]? _SsaOrders;
|
||||
|
||||
//Id
|
||||
//Name
|
||||
//BookingNames
|
||||
//Type
|
||||
//State
|
||||
//ItemNumber
|
||||
//CreatedDate
|
||||
//DecidedDate
|
||||
//Recipient
|
||||
//Requestor
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (Http is null)
|
||||
throw new NullReferenceException(nameof(Http));
|
||||
string controllerName = MyIT.Shared.Models.Stateless.Methods.ISsaOrderController.GetRouteName();
|
||||
_SsaOrders = await Http.GetFromJsonAsync<SsaOrder[]>($"api/{controllerName}");
|
||||
}
|
||||
}
|
7
Client/Pages/Index.razor
Normal file
7
Client/Pages/Index.razor
Normal file
@ -0,0 +1,7 @@
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<MudText Typo="Typo.h3" GutterBottom="true">Hello, world!</MudText>
|
||||
<MudText Class="mb-8">Welcome to your new app, powered by MudBlazor!</MudText>
|
||||
<MudAlert Severity="Severity.Normal">You can find documentation and examples on our website here: <MudLink Href="https://mudblazor.com" Typo="Typo.body2" Color="Color.Inherit"><b>www.mudblazor.com</b></MudLink></MudAlert>
|
Reference in New Issue
Block a user