123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- @page "/verifying"
- @using Microsoft.AspNetCore.Components.Web;
- @attribute [Authorize]
- <h1>Верификация</h1>
- <table class="table">
- <thead>
- <tr>
- <th>№</th>
- <th>Файл</th>
- <th>Название</th>
- <th>Дата издания</th>
- <th>Авторы</th>
- @*<th></th>*@
- </tr>
- </thead>
- <tbody>
- @foreach (var articleModel in articleModels)
- {
- <tr>
- <td>@(counter++)</td>
- <td>@articleModel.Value.Filename</td>
- <td><a href="@($"/docedit/{articleModel.Key}")">@articleModel.Value.Name</a></td>
- <td>@articleModel.Value.PublishDate.ToString("d")</td>
- <td>@articleModel.Value.Authors</td>
- @*<td><button @onclick="(() => VerifyArticle(articleModel.Key))">Верифицировать</button></td>*@
- </tr>
- }
- </tbody>
- </table>
- @code {
- private Dictionary<int, Models.ArticleModel> articleModels;
- private int counter = 1;
- protected override async Task OnInitializedAsync()
- {
- MySQLConnector dbCon = MySQLConnector.Instance();
- string stringSQL = $"SELECT id, filename, article_name, date_publish, authors FROM articles";
- articleModels = await dbCon.SQLSelectArticles(stringSQL);
- dbCon.Close();
- //status = results;
- }
- //private void VerifyArticle(int id)
- //{
- // Console.WriteLine($"Verifyed arcticle ID: {id}!");
- //}
- }
|