Exemplo n.º 1
0
        public async Task ModifierLigneProduit(LigneProduit ligneProduit, LigneProduitDTO ligneProduitDTO)
        {
            ligneProduit.Id = ligneProduitDTO.Id;
            context.Entry(ligneProduit).OriginalValues["RowVersion"] = ligneProduitDTO.RowVersion;

            await context.SaveChangesAsync();
        }
Exemplo n.º 2
0
        public async Task ModifierLigneCommande(LigneCommande ligneCommande, LigneCommandeDTO ligneCommandeDTO)
        {
            ligneCommande.Id       = ligneCommandeDTO.Id;
            ligneCommande.Commande = ligneCommandeDTO.Commande;
            ligneCommande.Box      = ligneCommandeDTO.Box;
            ligneCommande.Produit  = ligneCommandeDTO.Produit;
            context.Entry(ligneCommande).OriginalValues["RowVersion"] = ligneCommandeDTO.RowVersion;

            await context.SaveChangesAsync();
        }
Exemplo n.º 3
0
 public async Task ModifierUtilisateur(Utilisateur utilisateur, UtilisateurDTO utilisateurDTO)
 {
     //utilisateur = mapper.Map<UtilisateurDTO, Utilisateur>(utilisateurDTO, utilisateur);
     utilisateur.Id            = utilisateurDTO.Id;
     utilisateur.Nom           = utilisateurDTO.Nom;
     utilisateur.Prenom        = utilisateurDTO.Prenom;
     utilisateur.DateNaissance = utilisateurDTO.DateNaissance;
     utilisateur.Mail          = utilisateurDTO.Mail;
     utilisateur.Telephone     = utilisateurDTO.Telephone;
     utilisateur.Gsm           = utilisateurDTO.Gsm;
     utilisateur.Username      = utilisateurDTO.Username;
     utilisateur.Adresse       = utilisateurDTO.Adresse;
     context.Entry(utilisateur).OriginalValues["RowVersion"] = utilisateurDTO.RowVersion;
     await context.SaveChangesAsync();
 }
Exemplo n.º 4
0
        public async Task ModifierBox(Box box, BoxDTO boxDTO)
        {
            box.Id  = boxDTO.Id;
            box.Nom = boxDTO.Nom;
            box.PrixUnitaireHtva = boxDTO.PrixUnitaireHtva;
            box.Tva          = boxDTO.Tva;
            box.Promotion    = boxDTO.Promotion;
            box.Description  = boxDTO.Description;
            box.Photo        = boxDTO.Photo;
            box.Affichable   = boxDTO.Affichable;
            box.DateCreation = boxDTO.DateCreation;
            context.Entry(box).OriginalValues["RowVersion"] = boxDTO.RowVersion;

            await context.SaveChangesAsync();
        }