@using System.ComponentModel.DataAnnotations @using Syncfusion.Blazor.Grids; @using Syncfusion.Blazor.Buttons; @using Syncfusion.Blazor.Spinner; @using Syncfusion.Blazor.Navigations; @using Syncfusion.Blazor.Popups; @using Syncfusion.Blazor.DropDowns @using BlazorApp.Helper @using BWPMModels; @*
Neuer Schüler 
*@
Name
Vorname
Bemerkung
Klasse
Typ
@DialogHeader
@DialogText
@if (DialogShowYesNO == true) { } else { }
@code { [Parameter] public string iSchuelerID { get; set; } = ""; [Parameter] public EventCallback OnSchuelerChanged { get; set; } public int hiddenschuelerid = 0; public string DialogHeader { get; set; } = ""; public string DialogText { get; set; } = ""; public bool DialogShowYesNO { get; set; } = true; public bool ShowDeleteConfirmation { get; set; } = false; public string userid = ""; public bool FieldDisabled = true; public string SchuelerklasseID = "0"; public string KlasseTypID = "0"; public string KlasseID = "0"; private Schueler _schueler { get; set; } = new BWPMModels.Schueler(); public List klassentyp { get; set; } = BlazorApp.Controller.KlassentypController.GetAllAktiveData(); public List klasse { get; set; } = BlazorApp.Controller.KlasseController.GetAllActiveData(); public List Schueler { get; set; } public bool DropDownEnabled = false; protected override async Task OnInitializedAsync() { } public void Submit() { BlazorApp.Controller.SchuelerController.PUT(_schueler); } public void InvalidSubmit() { } private void DeleteClick() { DialogHeader = "Löschbestätigung"; DialogText = "Schüler '" + _schueler.name + ' ' + _schueler.vorname + "' wirklich löschen?'"; DialogShowYesNO = true; ShowDeleteConfirmation = true; } private void DeleteConfirmed() { _schueler.aktiv = false; _schueler.mutierer = userid; _schueler.mutiert_am = DateTime.Now; BlazorApp.Controller.SchuelerController.PUT(_schueler); BlazorApp.Controller.SchuelerBerufController.DeleteBerufswunsch(_schueler.ID, userid); ShowDeleteConfirmation = false; } private void AbortDelete() { ShowDeleteConfirmation = false; } private void DialogConfirmed() { ShowDeleteConfirmation = false; } public void ReloadData(string Schuelerid) { Schueler = BlazorApp.Controller.SchuelerController.GetByID(Convert.ToInt32(Schuelerid)); _schueler = Schueler.First(); KlasseID = _schueler.klasseID.ToString(); KlasseTypID = _schueler.klassentypID.ToString(); FieldDisabled = false; DropDownEnabled = false; } }