public IActionResult Save(PatientData patientData)
        {
            var result = patientData.Id == 0 ? _patientDataService.Create(patientData) : _patientDataService.Update(patientData);

            if (result.Success)
            {
                return(Ok(patientData));
            }
            return(BadRequest());
        }
Esempio n. 2
0
 public IActionResult PatientData(DoctorDateViewModel viewModel)
 {
     if (ModelState.IsValid)
     {
         if (viewModel.DoctorDatas.Id == Guid.Empty)
         {
             patientDataService.Create(viewModel.DoctorDatas);
         }
         else
         {
             patientDataService.Update(viewModel.DoctorDatas);
         }
         return(RedirectToAction("AppointmentResult", new { schedId = viewModel.DoctorDatas.ScheduleId }));
     }
     return(View(viewModel));
 }
Esempio n. 3
0
 public async Task <Patient> CreatePatient(Patient patient)
 {
     return(await _patientDataService.Create(patient));
 }