예제 #1
0
        /// <summary>
        /// Updates PatientInfo object with specified Id
        /// </summary>
        /// <param name="patientId">Id of PatientInfo object to be updated</param>
        /// <param name="patient">PatientInfo object to be cloned from</param>
        public void UpdatePatient(int patientId, PatientInfo patient)
        {
            PatientInfo patientToUpdate = _data.GetPatient(patientId);

            patientToUpdate.FirstName = patient.FirstName;
            patientToUpdate.LastName  = patient.LastName;
            patientToUpdate.Country   = patient.Country;
            patientToUpdate.City      = patient.City;
            patientToUpdate.Address   = patient.Address;
            patientToUpdate.BirthDate = patient.BirthDate;
            patientToUpdate.Phone     = patient.Phone;
            patientToUpdate.Email     = patient.Email;
            patientToUpdate.Gender    = patient.Gender;
            patientToUpdate.ImageId   = patient.ImageId;
            _data.Save();
        }