Exemplo n.º 1
0
        public IActionResult Edit(int appointmentID)
        {
            var appointment = appointmentManagment.GetAppointmentByID(appointmentID);
            var gotRecord   = appointmentManagment.IsAppointmentGotRecord(appointmentID);
            var model       = new AppointementViewModel()
            {
                Time          = appointment.Time,
                UserID        = appointment.UserID,
                PatientID     = appointment.PatientID,
                Urgent        = appointment.Urgently,
                AppointmentID = appointment.Id,
                GotRecord     = gotRecord
            };

            var patients = db.Patients.Select(c => new SelectListItem()
            {
                Value = c.Id.ToString(),
                Text  = c.Firstname.ToString() + " " + c.Lastname.ToString()
            }).ToList();

            var users = usermanager.Users.Where(c => c.Title.Name == "Specijalista").Select(c => new SelectListItem()
            {
                Value = c.Id.ToString(),
                Text  = c.Firstname.ToString() + " " + c.Lastname.ToString()
            }).ToList();

            model.Users    = users;
            model.Patients = patients;


            return(View(model));
        }
Exemplo n.º 2
0
        public IActionResult AddRecord(int appointmentID)
        {
            var appointment = appointmentManagment.GetAppointmentByID(appointmentID);
            var model       = new MedicalRecordViewModel()
            {
                Appointment = appointment
            };

            return(View(model));
        }