Пример #1
0
        private void btnFeedbackComment_Click(object sender, RoutedEventArgs e)
        {
            if (listUsers.SelectedIndex >= 0)
            {
                string accountid = listedUsers[listUsers.SelectedIndex];

                if (LoggedInAccount.GetType(accountid) == 2)
                {
                    Account     selectedAccount      = LoggedInAccount.SearchAccountsById(accountid);
                    List <Unit> selectedAccountUnits = LoggedInAccount.GetUnitsbyAccount(selectedAccount);

                    var feedbackcommentwindow = new AdminWindows.FeedbackComment(LoggedInAccount, selectedAccount, selectedAccountUnits, this);

                    feedbackcommentwindow.Show();
                    feedbackcommentwindow.Focus();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Must Select a Account of type Student");
                }
            }
            else
            {
                MessageBox.Show("Must Select a Student");
            }
        }
Пример #2
0
        private void btnDetailFeedback_Click(object sender, RoutedEventArgs e)
        {
            if (lsvStudents.SelectedIndex == -1)
            {
                MessageBox.Show("You must select a student first", "Error", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK);
                return;
            }

            var window = new AdminWindows.FeedbackComment(_loggedIn, lsvStudents.SelectedItem as Student, this);

            window.Show();
            window.Focus();
            this.Hide();
        }