Ejemplo n.º 1
0
        public static void EditClient(EcommerceDb db, ClientEditView clientEditView)
        {
            var client = db.Clients.Where(s => s.clientId == clientEditView.clientId).FirstOrDefault();

            client.Adresse      = clientEditView.Adresse;
            client.EmailAdresse = clientEditView.EmailAdresse;
            client.Nom          = clientEditView.Nom;
            client.Password     = clientEditView.Password;
            client.Prenom       = clientEditView.Prenom;
            client.Province     = clientEditView.Province;
            client.Ville        = clientEditView.Ville;
            db.SaveChanges();
        }
Ejemplo n.º 2
0
        public static ClientEditView copyClientToClientEditView(Client source)
        {
            ClientEditView destinataire = new ClientEditView();

            destinataire.clientId     = source.clientId;
            destinataire.Nom          = source.Nom;
            destinataire.Prenom       = source.Prenom;
            destinataire.Province     = source.Province;
            destinataire.Ville        = source.Ville;
            destinataire.Adresse      = source.Adresse;
            destinataire.EmailAdresse = source.EmailAdresse;
            destinataire.Password     = source.Password;
            return(destinataire);
        }
Ejemplo n.º 3
0
 public ActionResult Edit(ClientEditView clientEditView)
 {
     ClientUtilitaire.EditClient(db, clientEditView);
     return(View());
 }