Exemplo n.º 1
0
        public void UpdatePersonne(DTO.Personne Personne, DTO.Personne PersonneUpdated)
        {
            using (MesDepensesContext context = new MesDepensesContext())

                try
                {
                    if (Personne != null && PersonneUpdated != null)
                    {
                        PersonneUpdated.PersonneID = Personne.PersonneID;
                        context.Entry(Personne).CurrentValues.SetValues(Personne);
                    }
                }
                catch
                {
                    throw;
                }
        }
Exemplo n.º 2
0
        public void UpdateDepense(DTO.Depense Depense, DTO.Depense DepenseUpdated)
        {
            using (MesDepensesContext context = new MesDepensesContext())

                try
                {
                    if (Depense != null && DepenseUpdated != null)
                    {
                        DepenseUpdated.DepenseID = Depense.DepenseID;
                        context.Entry(Depense).CurrentValues.SetValues(Depense);
                    }
                }
                catch
                {
                    throw;
                }
        }