public FacultyPage(Faculty f, DBL d) { InitializeComponent(); faculty = new Faculty(); faculty = f; dbl = d; deans = new List <Dean>(); foreach (Dean dean in dbl.GiveDeans()) { if (dean.University == dbl.LoggedPerson.University) { deans.Add(dean); Dean_Box.Items.Add(dean.SurName + " " + dean.Name + " " + dean.MidleName); } } if (faculty == null) { faculty = new Faculty(); NewFaculty(); } else { EditFaculty(); } }
public DeansGridPage(DBL d) { InitializeComponent(); dbl = d; Deans = new ObservableCollection <Dean>(); foreach (Dean dean in dbl.GiveDeans()) { if (dean.University == dbl.LoggedPerson.University) { Deans.Add(dean); } } DeansGrid.ItemsSource = Deans; }