You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
using Blazorise;
|
|
using Microsoft.AspNetCore.Components;
|
|
using VeraxShield.modele.utilisateurs;
|
|
using VeraxShield.services.UtilisateursDataService;
|
|
|
|
namespace VeraxShield.composants.modals
|
|
{
|
|
public partial class ConfirmationSuppressionUtilisateur
|
|
{
|
|
private Modal modalRef;
|
|
|
|
[Inject]
|
|
private IUtilisateursDataService utilisateursDataService { get; set; }
|
|
|
|
[Inject]
|
|
private NavigationManager NavigationManager { get; set; }
|
|
|
|
[Parameter]
|
|
public Utilisateur utilisateur { get; set; }
|
|
|
|
[Parameter]
|
|
public List<Utilisateur> listeVueUtilisateurs { get; set; }
|
|
|
|
public async Task fermetureModal(ModalClosingEventArgs e)
|
|
{
|
|
this.NavigationManager.NavigateTo("/utilisateurs/liste");
|
|
}
|
|
|
|
protected async Task suppressionConfirmee()
|
|
{
|
|
await this.utilisateursDataService.SupprimerUtilisateur(this.utilisateur);
|
|
this.listeVueUtilisateurs = await this.utilisateursDataService.getAllUtilisateurs();
|
|
await this.HideModal();
|
|
}
|
|
|
|
protected async Task suppressionAnnulee()
|
|
{
|
|
await this.HideModal();
|
|
}
|
|
|
|
private Task ShowModal()
|
|
{
|
|
return modalRef.Show();
|
|
}
|
|
|
|
private Task HideModal()
|
|
{
|
|
return modalRef.Hide();
|
|
}
|
|
}
|
|
}
|