public async Task <IActionResult> ConfirmPayment(string id, [Bind("ID,Patient,DateOfVisit,Illness,MedicationGiven,Price,Status")] History history) { if (id != history.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(history); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DoctorsExists(history.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Prescription", "Doctors")); } return(View(history)); }
public async Task<IActionResult> Edit(string id, [Bind("ID,NRIC,Name,Gender,DateOfBirth,Address,History")] Patients patients) { if (id != patients.ID) { return NotFound(); } if (ModelState.IsValid) { try { _context.Update(patients); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PatientsExists(patients.ID)) { return NotFound(); } else { throw; } } return RedirectToAction(nameof(Index)); } return View(patients); }