Exemplo n.º 1
0
        //Button Clicks
        public void OnAddClick(object sender, RoutedEventArgs e)
        {
            try
            {
                EditStudent add1 = new EditStudent("Add");
                Main.Content         = add1;
                add1.StudentAltered += this.OnStudentAltered;
                //show back button
                backButton.Visibility = Visibility.Visible;
            }
            catch (InvalidOperationException ex)
            {
                MessageBox.Show(ex.Message);
            }

            e.Handled = true;
        }
Exemplo n.º 2
0
        public void OnEditClick(object sender, RoutedEventArgs e)
        {
            try
            {
                EditStudent edi1 = new EditStudent("Edit");
                edi1.SelectedStudent             = selectedStudent;
                selectedStudent.PropertyChanged += dis1.OnPropertyChanged;
                edi1.StudentAltered             += this.OnStudentAltered;
                Main.Content = edi1;
                //Show back button
                backButton.Visibility = Visibility.Visible;
            }
            catch (InvalidOperationException ex)
            {
                MessageBox.Show(ex.Message);
            }

            e.Handled = true;
        }