public bool UpdateIntervention(Interventions i) { try { Interventions interv = DataContext.Interventions.Where(p => p.IDContact == i.IDContact && p.IDUtilisateur == i.IDUtilisateur && p.DateHeure == i.DateHeure).SingleOrDefault(); if (interv.Data != i.Data) { interv.Data = i.Data; } if (interv.GPSLocation != i.GPSLocation) { interv.GPSLocation = i.GPSLocation; } if (interv.UrgenceLevel != i.UrgenceLevel) { interv.UrgenceLevel = i.UrgenceLevel; } return(true); } catch (Exception) { return(false); } }
public bool RemoveIntervention(Interventions i) { try { if (DataContext == null) { throw new Exception("DAL empty"); } DataContext.Interventions.DeleteOnSubmit(i); return(true); } catch (Exception) { return(false); } }
private void detach_Interventions(Interventions entity) { this.SendPropertyChanging(); entity.Repertoire = null; }
partial void DeleteInterventions(Interventions instance);
partial void UpdateInterventions(Interventions instance);
partial void InsertInterventions(Interventions instance);