Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #3
0
 private void detach_Interventions(Interventions entity)
 {
     this.SendPropertyChanging();
     entity.Repertoire = null;
 }
Пример #4
0
 partial void DeleteInterventions(Interventions instance);
Пример #5
0
 partial void UpdateInterventions(Interventions instance);
Пример #6
0
 partial void InsertInterventions(Interventions instance);