public override async Task OnBeforeSaveAsync(BeforeSaveEventArgs e) { IEditEntry editEntryNom = Controls.OfType<IEditEntry>().FirstOrDefault(x => x.Source == "c_nom"); if (editEntryNom == null) { await Dialogs.Stop(Page, "L'entry associé à C_NOM est introuvable !"); e.CancelSave = true; return; } IEditEntry editEntryRemise = Controls.OfType<IEditEntry>().FirstOrDefault(x => x.Source == "c_remise"); if (editEntryRemise == null) { await Dialogs.Stop(Page, "L'entry associé à C_REMISE est introuvable !"); e.CancelSave = true; return; } decimal? remise = await Dialogs.AskDecimal(Page, "Confirmez la remise pour ce client ?", 0, editEntryRemise.DecimalValue); if (remise == null) { e.CancelSave = true; return; } editEntryRemise.DecimalValue = remise.Value; if (!await Dialogs.AnswerYesNo(Page, $"Voulez-vous vraiment enregistrer les modifications sur le client \"{editEntryNom.Text}\" ?")) { e.CancelSave = true; } }