/// <summary> /// Delete the category in the entry list objects /// </summary> /// <param name="obj"></param> private void CategoryDeletedHandler(CategoryDeletedMessage obj) { foreach (var entry in basePasswordEntries.Where(x => x.Category == obj.Category)) { entry.Category = null; } }
/// <summary> /// Handles the message. /// </summary> /// <param name="message">The message.</param> public void Handle(CategoryDeletedMessage message) { foreach (var transactionRecord in TransactionRecords) { if (transactionRecord.Category != null && transactionRecord.Category.Id == message.Category.Id) { transactionRecord.Category = null; } } }
/// <summary> /// Delete the category in the categories combobox /// </summary> /// <param name="obj"></param> private void CategoryDeletedHandler(CategoryDeletedMessage obj) { Categories.Remove(obj.Category); }