private List <Reminder> GetSelectedRemindersFromListview() { List <long> checkedIds = new List <long>(); //get all selected id's from the listview reminders foreach (ListViewItem item in lvReminders.CheckedItems) { checkedIds.Add((long)item.Tag); } if (transferType == ReminderTransferType.IMPORT) //Look through the reminders from the .remindme file instead of the database if import. { return(remindersFromRemindMeFile.Where(r => checkedIds.Contains(r.Id)).ToList()); } else { return(BLReminder.GetAllReminders().Where(r => checkedIds.Contains(r.Id)).ToList()); } }