Example #1
0
        private void ListViewGuardian_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Activeguardian.Setactiveguardian((Guardian)listViewGuardian.SelectedItem); // tilldelar objektet activeguardian vald person i listan

            ScheduleView scheduleView = new ScheduleView();

            scheduleView.Show();

            this.Close();
        }
 private void ListViewGuardians_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         Activeguardian.Setactiveguardian((Guardian)ListViewGuardians.SelectedItem);
         UpdateGuardian();
     }
     catch (PostgresException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 private void SaveGuardian_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Activeguardian.Setactiveguardian((Guardian)ListViewGuardians.SelectedItem);
         DbOperations.UpdateGuardianProperties(Convert.ToInt32(txtboxPhoneGuardian.Text), txtboxEmailGuardian.Text, txtboxFirstNameGuardian.Text, txtboxLastNameGuardian.Text);
         Updatelists();
         ClearTextbox();
         UpdatedMessage();
     }
     catch (PostgresException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }