public async Task <IActionResult> Edit(int id, [Bind("CompleteListID,MedicalRecord,LastName,FirstName,Physician,DOB,TreatmentDays,Age,Gender,Address,PhoneNumber,Email,TreatmentTime,AccessType,KBath,CaBath,NaBath,BiCarb,Temp,DialyzerSize,Comments")] CompleteList completeList) { if (id != completeList.CompleteListID) { return(NotFound()); } if (ModelState.IsValid) { try { context.Update(completeList); await context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompleteListExists(completeList.CompleteListID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(completeList)); }
public async Task <IActionResult> AddPhysician([Bind("PhysicianID,LastName,FirstName,CellPhone,OfficePhone")] Physician physician) { if (ModelState.IsValid) { context.Add(physician); await context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(Redirect("/Physician/index")); }