public SearchMeasurements(string searchType, string searchValue, int patientID) { Controllers.PatientController pc = new Controllers.PatientController(); List<Models.Patient> patientList = pc.GetPatients(); Patient patient = new Patient(); foreach (Models.Patient p in patientList) { if (patientID == p.ID) { patient = p; } } this.SearchType = searchType; this.SearchValue = searchValue; this.Patient = patient; }
public Patient AddPatient(string name, byte age) { Patient p = new Patient(_id++, name, age); _patients.Add(p); return p; }