Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        public bool RemoveIntervention(Interventions i)
        {
            try
            {
                if (DataContext == null)
                {
                    throw new Exception("DAL empty");
                }

                DataContext.Interventions.DeleteOnSubmit(i);

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 private void detach_Interventions(Interventions entity)
 {
     this.SendPropertyChanging();
     entity.Repertoire = null;
 }
Ejemplo n.º 4
0
 partial void DeleteInterventions(Interventions instance);
Ejemplo n.º 5
0
 partial void UpdateInterventions(Interventions instance);
Ejemplo n.º 6
0
 partial void InsertInterventions(Interventions instance);