Esempio n. 1
0
 // This event handler is fired when the delete activity button is clicked. It deletes an activity from the list of
 // activities that a group is involved with.
 private void BtnDeleteActivity_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         GroupActivityVM activity = (GroupActivityVM)dgGroupActivities.SelectedItem;
         _activityManager.DeleteGroupActivity(activity.ActivityID, activity.GroupID);
         dgGroupActivities.ItemsSource = _groupManager.RetrieveActivitiesByGroupID(lbUserGroups.SelectedItem.ToString());
     }
     catch (Exception)
     {
         MessageBox.Show("You must make an Activity selection.");
     }
 }