private void Remove_Click(object sender, RoutedEventArgs e)
 {
     if (WorkPlacementItemsCV.CurrentItem != null)
     {
         LearningDeliveryWorkPlacement lr2Remove = WorkPlacementItemsCV.CurrentItem as LearningDeliveryWorkPlacement;
         if (lr2Remove != null)
         {
             _learnerDelivery.Delete(lr2Remove);
             if ((_learnerDelivery != null) && (_learnerDelivery.LearningDeliveryWorkPlacementList != null) && (_learnerDelivery.LearningDeliveryWorkPlacementList.Count > 0))
             {
                 if (!WorkPlacementItemsCV.MoveCurrentToPrevious())
                 {
                     WorkPlacementItemsCV.MoveCurrentToFirst();
                 }
                 if ((WorkPlacementItemsCV.CurrentItem != null) && (WorkPlacementItemsCV.CurrentItem != lr2Remove))
                 {
                     LearningDeliveryWorkPlacement lr = WorkPlacementItemsCV.CurrentItem as LearningDeliveryWorkPlacement;
                     lr.IsSelected = true;
                 }
                 else
                 {
                     WorkPlacementItemsCV.MoveCurrentToNext();
                     if (WorkPlacementItemsCV.CurrentItem != null)
                     {
                         LearningDeliveryWorkPlacement lr = WorkPlacementItemsCV.CurrentItem as LearningDeliveryWorkPlacement;
                         lr.IsSelected = true;
                     }
                 }
             }
             WorkPlacementItemsCV.Refresh();
             OnPropertyChanged("WorkPlacementItemsCV");
             ShouldShowListView();
         }
     }
 }
 private void Remove_Click(object sender, RoutedEventArgs e)
 {
     if (FamItemsCV.CurrentItem != null)
     {
         LearningDeliveryFAM fam2Remove = FamItemsCV.CurrentItem as LearningDeliveryFAM;
         if (fam2Remove != null)
         {
             _learnerDelivery.Delete(fam2Remove);
             _FAMLList.Remove(fam2Remove);
             //int currentPost = FamItemsCV.CurrentPosition;
             if (!FamItemsCV.IsEmpty)
             {
                 if (!FamItemsCV.MoveCurrentToPrevious())
                 {
                     FamItemsCV.MoveCurrentToFirst();
                     FamItemsCV.Refresh();
                     OnPropertyChanged("FamItemsCV");
                 }
                 if ((FamItemsCV.CurrentItem != null) && (FamItemsCV.CurrentItem != fam2Remove))
                 {
                     LearningDeliveryFAM f = FamItemsCV.CurrentItem as LearningDeliveryFAM;
                     f.IsSelected = true;
                 }
                 else
                 {
                     FamItemsCV.MoveCurrentToNext();
                     if (FamItemsCV.CurrentItem != null)
                     {
                         LearningDeliveryFAM f = FamItemsCV.CurrentItem as LearningDeliveryFAM;
                         f.IsSelected = true;
                     }
                 }
             }
             FamItemsCV.Refresh();
         }
         OnPropertyChanged("FamItemsCV");
         ShouldShowListView();
     }
 }