Ejemplo n.º 1
0
        public async Task Add()
        {
            await TraineeshipService.AddAsync(Current).ConfigureAwait(false);

            Collection = await TraineeshipService.GetAsync().ConfigureAwait(false);

            StateHasChanged();
        }
Ejemplo n.º 2
0
 public async Task Update()
 {
     if (Collection is List <Traineeship> controls)
     {
         controls[controls.FindIndex(r => r.Id == Current.Id)] = Current;
     }
     else
     {
         Collection = await TraineeshipService.GetAsync().ConfigureAwait(false);
     }
     StateHasChanged();
     Current = await TraineeshipService.UpdateAsync(Current).ConfigureAwait(false);
 }
Ejemplo n.º 3
0
        public async Task ShowModal(int id)
        {
            Current = await TraineeshipService.GetAsync(id).ConfigureAwait(false);

            Current.Lecturers = await LecturerService.GetAsync();
        }
Ejemplo n.º 4
0
 protected override async Task OnInitAsync()
 {
     Collection = await TraineeshipService.GetAsync().ConfigureAwait(false);
 }