private void btn_update_Click(object sender, EventArgs e) { Utils.WriteLog("Demande de modification de la fiche du " + current.DateDebut.ToShortDateString() + " de " + current.Employe.NomPrenom); if (Messages.Confirmation_Infos("modifier") == System.Windows.Forms.DialogResult.Yes) { current.DateFinPrevu = dtp_date.Value; current.HeureFinPrevu = dtp_heure.Value; if (PresenceBLL.Update(current)) { int idx = parent.presences.FindIndex(x => x.Id == current.Id); if (idx > -1) { parent.presences[idx] = current; } Utils.WriteLog("-- Modification de la fiche du " + current.DateDebut.ToShortDateString() + " de " + current.Employe.NomPrenom + " reussie"); this.Dispose(); } else { Utils.WriteLog("-- Modification de la fiche du " + current.DateDebut.ToShortDateString() + " de " + current.Employe.NomPrenom + " échouée"); } } else { Utils.WriteLog("-- Modification de la fiche du " + current.DateDebut.ToShortDateString() + " de " + current.Employe.NomPrenom + " annulée"); } }