Ejemplo n.º 1
0
        public IActionResult EditThisUserDoctorsAppointments(UserPageViewModel viewModel)
        {
            var enrolledCitizen = receptionRepository.Get(viewModel.EnrolledCitizenId);
            var appointment     = mapper.Map <ReceptionOfPatients>(viewModel);

            appointment.EnrolledCitizen = enrolledCitizen.EnrolledCitizen;
            receptionRepository.Save(appointment);

            return(RedirectToAction("UserPage"));
        }
Ejemplo n.º 2
0
        public IActionResult ReceptionPatient(ReceptionOfPatientsViewModel viewModel)
        {
            var citizen   = citizenRepository.Get(viewModel.EnrolledCitizenId);
            var reception = mapper.Map <ReceptionOfPatients>(viewModel);

            reception.EnrolledCitizen = citizen;
            receptionRepository.Save(reception);


            return(RedirectToAction("HealthDepartment"));
        }