Merge branch 'master' of https://codefirst.iut.uca.fr/git/jade.van_brabandt/3.01-QCM_MuscuMaths
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
86cb4700d9
@ -1,47 +1,29 @@
|
||||
@page "/questions"
|
||||
@using Blazor.Data
|
||||
@inject WeatherForecastService ForecastService
|
||||
@using Blazor.ViewClasses;
|
||||
@using Blazorise.DataGrid
|
||||
@using Blazored.Modal;
|
||||
<h3>Chapters</h3>
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
<div>
|
||||
<NavLink class="btn btn-primary" href="addChapter" Match="NavLinkMatch.All">
|
||||
<i class="fa fa-plus"></i> Ajouter
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
<DataGrid TItem="Question"
|
||||
Data="@questions"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalQuestion"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Question" Field="@nameof(Question.Id)" Caption="#" />
|
||||
<DataGridColumn TItem="Question" Field="@nameof(Question.Content)" Caption="Display content" />
|
||||
|
||||
<p>This component demonstrates fetching data from a service.</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 ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now));
|
||||
}
|
||||
}
|
||||
<DataGridColumn TItem="Question" Field="@nameof(Question.Id)" Caption="Action">
|
||||
<DisplayTemplate>
|
||||
<a href="editQuestion/@(context.Id)" class="btn btn-primary"><i class="fa fa-edit"></i> Editer</a>
|
||||
<button type="button" class="btn btn-primary" @onclick="() => OnDelete(context.Id)"><i class="fa fa-trash"></i> Supprimer</button>
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
</DataGrid>
|
@ -1,98 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Zilla"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Silodyne"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Zolarity"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Straloy"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Extro"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Prosely"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Orbalix"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Hatology"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Exodoc"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Cinaster"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Toyletry"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Combogene"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Olympix"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Emoltra"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Macronaut"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Genekom"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"name": "Zaya"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "Elentrix"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "Comvex"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"name": "Exozent"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "Fuelworks"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"name": "Splinx"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "Greeker"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "Martgo"
|
||||
}
|
||||
]
|
Loading…
Reference in new issue