public async Task <IActionResult> Edit(string id, [Bind("typeOfPain,MTId,patientId,availabilityQueues")] AppointmentSystems appointmentSystems) { if (id != appointmentSystems.typeOfPain) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(appointmentSystems); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AppointmentSystemsExists(appointmentSystems.typeOfPain)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(appointmentSystems)); }
public async Task <IActionResult> Create([Bind("typeOfPain,MTId,patientId,availabilityQueues")] AppointmentSystems appointmentSystems) { if (ModelState.IsValid) { _context.Add(appointmentSystems); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(appointmentSystems)); }