| | 1 | | @inject MunityContext dbContext |
| | 2 | |
|
| 0 | 3 | | @if (card != null) |
| 0 | 4 | | { |
| | 5 | | <div class="form-group mb-3"> |
| | 6 | | <label>Titel</label> |
| | 7 | | <input class="form-control" @bind=card.Title /> |
| | 8 | | </div> |
| | 9 | |
|
| | 10 | | <div class="form-group mb-3"> |
| | 11 | | <label>Text</label> |
| | 12 | | <textarea class="form-control" @bind=card.Text /> |
| | 13 | | </div> |
| | 14 | |
|
| 0 | 15 | | <button class="btn btn-primary" @onclick="() => dbContext.SaveChanges()">Speichern</button> |
| 0 | 16 | | } |
| | 17 | |
|
| | 18 | |
|
| | 19 | |
|
| | 20 | | @code { |
| 0 | 21 | | [Parameter] public string ConferenceId { get; set; } |
| | 22 | |
|
| | 23 | | private MUNity.Database.Models.Conference.ConferenceDashboardCard card; |
| | 24 | |
|
| | 25 | | protected override void OnParametersSet() |
| 0 | 26 | | { |
| 0 | 27 | | base.OnParametersSet(); |
| 0 | 28 | | this.card = dbContext.ConferenceDashboardCards.FirstOrDefault(n => n.Conference.ConferenceId == ConferenceId); |
| 0 | 29 | | } |
| | 30 | | } |