private void OpenSectionView() { if (SelectedSection == null) { CurrentSection = new SectionModel(); } else { var q = new SectionModel(); q = _selectedSection; CurrentSection = SelectedSection ?? new SectionModel(); CurrentSection.SectionName = q.SectionName; CurrentSection.Adviser = q.Adviser; CurrentSection.Department = q.Department; CurrentSection.NumberOfStudents = q.NumberOfStudents; CurrentSection.StudentsEnrolled = q.StudentsEnrolled; } SecView = new SectionView(); SecView.Show(); }