public async Task <IActionResult> Edit(int id, [Bind("did,dname,dphone,daddress,dgender,demail,dpassword,ddate_of_brith,dqualification,VillageId")] Doctor doctor) { if (id != doctor.did) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(doctor); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DoctorExists(doctor.did)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(doctor)); }
public async Task <IActionResult> Edit(int id, [Bind("pid,pname,pphone,paddress,pgender,pweight,phight,pbmi,pbmr,pbp,pdate_of_brith,ppassword")] Patient patient) { if (id != patient.pid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(patient); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PatientExists(patient.pid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(patient)); }
public async Task <IActionResult> Edit(int id, [Bind("VillageId,VillageName,District")] VillageDetails villageDetails) { if (id != villageDetails.VillageId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(villageDetails); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VillageDetailsExists(villageDetails.VillageId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(villageDetails)); }
public async Task <IActionResult> Edit(int id, [Bind("mid,mname,minfo")] test test) { if (id != test.mid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(test); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!testExists(test.mid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(test)); }
public async Task <IActionResult> Edit(int id, [Bind("aid,aname,aphone,aaddress,agender,aemail,apassword,adate_of_brith")] AdminMediCare adminMediCare) { if (id != adminMediCare.aid) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(adminMediCare); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AdminMediCareExists(adminMediCare.aid)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(adminMediCare)); }