Ejemplo n.º 1
0
        public static void UpdatePatient(AirwayPatient patient)
        {
            AirwayPatients airwayPatients = Deserialize();

            int idx = airwayPatients.IndexOf(airwayPatients.FirstOrDefault(item => item.PatientId == patient.PatientId));

            airwayPatients[idx] = patient;

            AirwayPatients.Serialize(airwayPatients);
        }
Ejemplo n.º 2
0
        public void Save()
        {
            AirwayPatients airwayPatients = AirwayPatients.Deserialize();

            for (int index = 0; index < airwayPatients.Count; index++)
            {
                AirwayPatient patient = airwayPatients[index];
                if (patient.PatientId == this.PatientId)
                {
                    airwayPatients[index] = this;
                }
            }
            AirwayPatients.Serialize(airwayPatients);
        }