private void DeleteStudent_Load(object sender, EventArgs e)
        {
            var StudentList = new StudentList();

            StudentsPickList     = StudentList.StudentsPickList;
            StudentsSelectedList = new List <Students>();
            FillListBoxWithStudents();
        }
Beispiel #2
0
        private void FillStudentsTable(ListView listview)
        {
            var LoadStudents = new StudentList();

            this.StudentsList = LoadStudents.StudentsPickList;

            listview.Items.Clear();

            foreach (var student in StudentsList)
            {
                var item = new ListViewItem(student.Id.ToString());
                item.SubItems.Add(student.Name);
                item.SubItems.Add(student.Surname);
                item.SubItems.Add(student.PhoneNumber.ToString());
                item.SubItems.Add(student.City);
                item.SubItems.Add(student.Street);
                item.SubItems.Add(student.Level);
                item.SubItems.Add(student.SchoolClass.ToString());
                item.SubItems.Add(student.CreatedDate.ToString("dd-MM-yyyy"));

                listview.Items.Add(item);
            }
        }