public async Task <IActionResult> Edit(long id, [Bind("Id,Nom,Prenom,DateNaissance,LieuNaissance,NumeroIdentification,Telephone,Adresse,Profession,DateInscription")] Client client) { if (id != client.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(client); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientExists(client.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,Label,Status")] Operation operation) { if (id != operation.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(operation); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OperationExists(operation.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(operation)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,Label,Code")] Guichet guichet) { if (id != guichet.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(guichet); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GuichetExists(guichet.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(guichet)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,NomService,Description")] Service service) { if (id != service.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(service); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ServiceExists(service.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(service)); }
public async Task <IActionResult> Edit(int id, [Bind("id,datecreation,description,numticket,id_secretaire")] ticket ticket) { if (id != ticket.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ticket); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ticketExists(ticket.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(ticket)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,SchemeName,state")] SchemeWorkFlowSet schemeWorkFlowSet) { if (id != schemeWorkFlowSet.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(schemeWorkFlowSet); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SchemeWorkFlowSetExists(schemeWorkFlowSet.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(schemeWorkFlowSet)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,NomAgence,Adresse,codeAgence,Pays,Region")] Agence agence) { if (id != agence.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(agence); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AgenceExists(agence.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(agence)); }
public async Task <IActionResult> Edit(long id, [Bind("Id,FirstName,LastName,Email,PasswordHash,PhoneNumber,UserName")] User user) { if (id != user.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(user); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserExists(user.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(user)); }