public void FetchAndUpdateStudentsList()
        {
            // use DBRepo to get the list of students from the db
            studentsList = DBRepo.FetchAllStudents();

            //clear existing students and add them to the list
            studentsListView.Items.Clear();
            foreach (Student s in studentsList)
            {
                Console.WriteLine(s.ToString());
                string[] items = new string[7];
                items[0] = s.StudentId;
                items[1] = s.FirstName;
                items[2] = s.LastName;
                items[3] = s.Year.ToString();
                items[4] = s.Branch;
                items[5] = s.Cgpa.ToString();
                items[6] = s.Campus;
                // append the students to the listView
                studentsListView.Items.Add(new ListViewItem(items));
            }

            // Event handler to get more details of students
        }