public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nom,Ville")] Banque banque) { if (id != banque.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(banque); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BanqueExists(banque.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(banque)); }
public async Task <IActionResult> Edit(Guid id, [Bind("Id,Numero,Type,IdPersonne,IdBanque")] Compte compte) { if (id != compte.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(compte); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompteExists(compte.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(compte)); }
public async Task <IActionResult> Edit(Guid id, [Bind("Id,Date,Libelle,Debit,Montant")] Ecriture ecriture) { if (id != ecriture.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ecriture); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EcritureExists(ecriture.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(ecriture)); }
public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nom,Prenom,DateDeNaissance,Mail")] Personne personne) { if (id != personne.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(personne); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonneExists(personne.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(personne)); }