public async Task <IActionResult> Edit(int id, [Bind("CheckinId,Checkindt,FirstName,LastName,Temperature,Question1,Question2,Question3,Question4,Question5")] Checkin checkin)
        {
            if (id != checkin.CheckinId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(checkin);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CheckinExists(checkin.CheckinId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(checkin));
        }
        public async Task <IActionResult> Edit(int id, [Bind("PatientId,RegistrationDate,FirstName,MiddleName,LastName,Age,Email,InsuranceType")] Patient patient)
        {
            if (id != patient.PatientId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(patient);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PatientExists(patient.PatientId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(patient));
        }
Beispiel #3
0
        public async Task <IActionResult> Edit(int id, [Bind("DoctorId,FirstName,LastName,HireDate,Email,ConcentrationType")] Doctor doctor)
        {
            if (id != doctor.DoctorId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(doctor);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DoctorExists(doctor.DoctorId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(doctor));
        }
        public async Task <IActionResult> Edit(int id, [Bind("AppointmentId,DateTime,Location,Description")] Appointment appointment)
        {
            if (id != appointment.AppointmentId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(appointment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AppointmentExists(appointment.AppointmentId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(appointment));
        }