private void PhysicianInterface_Load(object sender, EventArgs e) { PatientChain patientChain = new PatientChain(); patients = patientChain.GetPatients(); foreach (var i in patients) { ListViewItem lvi = new ListViewItem(i.Firstname); lvi.SubItems.Add(i.Lastname); lvi.SubItems.Add(i.BsnNumber); patientView.Items.Add(lvi); } docId.SelectedIndex = 0; type.SelectedIndex = 0; }
public PatientsResponse GetAllPatients() { var myPatients = new List <Patient>(); PatientChain patientChain = new PatientChain(); var patients = patientChain.GetPatients(); foreach (var patient in patients) { var p = new Patient { Address = patient.Address, BsnNumber = patient.BsnNumber, Firstname = patient.Firstname, Lastname = patient.Lastname, Initials = patient.Initials, Streetname = patient.Streetname, Housenumber = patient.Housenumber, City = patient.City, Country = patient.Country, DateLastMutation = patient.DateLastMutation, }; p.ItemsList = patient.ItemsList.Select(f => new ContentItems { ContentId = f.PhysicianIdentification, //DateTimeMutation = f.DateTimeMutation, DataBlockCount = f.DataBlocks }).ToArray(); myPatients.Add(p); } return(new PatientsResponse { Patients = myPatients.ToArray() }); }