Exemplo n.º 1
0
        private void btnSelect_Click(object sender, RoutedEventArgs e)
        {
            // Open a select student window, and then if they select one, we push a call to the studentSelected method for it to do it's logic
            SelectStudentWindow selectionWindow = new SelectStudentWindow();

            selectionWindow.ShowDialog();

            if (selectionWindow.selected)
            {
                studentSelected(selectionWindow.student);
            }
        }
        private void btnSelect_Click(object sender, RoutedEventArgs e)
        {
            // Open the select window
            SelectStudentWindow ssw = new SelectStudentWindow();

            ssw.ShowDialog();
            // If they selected one, set up the form
            if (ssw.selected)
            {
                selectedStudent_ = ssw.student;

                // Enable all buttons
                btnName.IsEnabled                  = true;
                btnYear.IsEnabled                  = true;
                btnClassAdd.IsEnabled              = true;
                btnClassEdit.IsEnabled             = true;
                btnClassRemoveMembership.IsEnabled = true;
                btnChangePassword.IsEnabled        = true;
                btnDelete.IsEnabled                = true;

                // And show the information about the user
                updateInformation();
            }
        }