Esempio n. 1
0
        private void FillDoctorListView()
        {
            lvDoctors.Items.Clear();

            using (var client = new HaServiceClient())
            {
                Doctor[] doors = client.GetDoctors();


                foreach (var item in doors)
                {
                    var          spesialty = client.GetSpecialtyById(item.Specialty.SpecialtyId);
                    ListViewItem lvItem    = new ListViewItem(spesialty.SpecialtyName);
                    lvItem.SubItems.Add(item.LastName);  //.ToString());
                    lvItem.SubItems.Add(item.FirstName); //.ToString());
                    lvItem.SubItems.Add(item.SecondName);
                    lvItem.SubItems.Add(item.LoginD);
                    lvItem.SubItems.Add(item.DoctorId.ToString());
                    lvDoctors.Items.Add(lvItem);
                }
            }
        }