protected async Task UpdateStudent() { var response = await StudentiService.UpdateStudent(Id, Student); if (response != null) { NavigationManager.NavigateTo($"/students/{Id}/details"); } }
protected override async Task OnInitializedAsync() { try { Student = await StudentiService.GetStudent(Id); FetchSuccess = true; } catch (Exception) { FetchSuccess = false; } }
protected override async Task OnInitializedAsync() { try { Student = await StudentiService.GetStudentView(Id); Courses = await PredmetiService.GetCoursesView(); FetchSuccess = true; } catch (Exception) { FetchSuccess = false; } }
protected async Task CreateStudent() { try { var response = await StudentiService.AddStudent(Student); if (response != null) { NavigationManager.NavigateTo("/students"); } } catch (Exception) { // Display error // Log exception } }