public async Task <IActionResult> Edit(string id, [Bind("id,Role")] roles roles) { if (id != roles.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(roles); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!rolesExists(roles.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(roles)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,fULL_NAME,d_O_b,GENDER,uSERNAME,ROLE,uniqueId,LOCATION,PHONE")] Users users) { if (id != users.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(users); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UsersExists(users.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(users)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,UswerId,date,DocId,Institution,IsDiagnosed,Problem,Comment")] UserDetails userDetails) { if (id != userDetails.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userDetails); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserDetailsExists(userDetails.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userDetails)); }
public async Task <IActionResult> Edit(string id, [Bind("Id,fULL_NAME,uSERNAME,ROLE,PHONE,serviceNo,PASSWORD")] Doc_Res doc_Res) { if (id != doc_Res.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(doc_Res); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Doc_ResExists(doc_Res.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(doc_Res)); }