Exemple #1
0
        private void btnSort_Click(object sender, EventArgs e)
        {
            Dictionary <string, FeedbackSortType> sortTypes = new Dictionary <string, FeedbackSortType>()
            {
                { "First Name", FeedbackSortType.FIRST_NAME },
                { "Last Name", FeedbackSortType.LAST_NAME },
                { "DOB", FeedbackSortType.DOB }
            };

            string           selectedSortType = sortTypesList[cboSort.SelectedIndex];
            FeedbackSortType sortType         = sortTypes[selectedSortType];

            if (radBtnAscending.Checked)
            {
                feedbackManager.Sort(sortType, ListSortDirection.Ascending);
            }
            else
            {
                feedbackManager.Sort(sortType, ListSortDirection.Descending);
            }

            ShowFirstFeedback();
        }