public IActionResult AddDiagnos(AppliedDiagnos appliedDiagnos) { if (ModelState.IsValid) { _db.Create(appliedDiagnos); _db.Save(); return(RedirectToAction(nameof(Index))); } ViewData["AppointmentId"] = new SelectList(_context.Appointments, "Id", "Id", appliedDiagnos.AppointmentId); ViewData["DiagnosId"] = _context.AppliedDiagnoses.Include(p => p.Diagnos).ToList(); return(View(appliedDiagnos)); }
public IActionResult Create(Diagnos diagnos) { if (ModelState.IsValid) { _db.Create(diagnos); _db.Save(); return(RedirectToAction(nameof(Index))); } return(View(diagnos)); }
public IActionResult Create(Appointment appointment) { if (ModelState.IsValid) { _db.Create(appointment); _db.Save(); return(RedirectToAction(nameof(Index))); } return(View(appointment)); }
public IActionResult Create(Patient p) { if (ModelState.IsValid) { _db.Create(p); _db.Save(); return(RedirectToAction(nameof(Index))); } return(View(p)); }
/// <summary> /// Creates a new clinic /// </summary> /// <param name="clinic">The clinic that is being created</param> // POST: api/clinic public void Post([FromBody] API.DAL.Models.Clinic clinic) { _clinicRepository.Create(clinic); }
/// <summary> /// Create /// </summary> /// <param name="data">The record passed in.</param> /// <returns>The record created for the result.</returns> public ClinicModel Create(ClinicModel data) { var myData = repository.Create(data); return(myData); }