Beispiel #1
0
        /// <summary>
        /// When clicked, it opens a new window with the Faculty Assignment Form,
        /// and shows a list of all faculties without any assignments,
        /// ordered alphabetically by their last name.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnClickNotAssigned(object sender, EventArgs e)
        {
            // Clears the list
            _facultyAssignmentForm._lstResult.Items.Clear();
            // Runs the query
            var _queryResult = _repo.ListFacultiesNotAssgn(ref _faculties);

            // Populates the list
            foreach (var item in _queryResult)
            {
                if (item != null)
                {
                    _facultyAssignmentForm._lstResult.Items.Add(item.ToString());
                }
            }
            // Opens the window with the list
            _facultyAssignmentForm.ShowDialog();
        }