public bool DeleteRecord(RecordItem item)
 {
     if (Core.Instance.DeleteRecord(item.record))
     {
         Records.Remove(item);
         return(true);
     }
     else
     {
         return(false);
     }
 }
        /// <summary>
        /// Raises request for editing control for existing budget record.
        /// </summary>
        /// <param name="item"></param>
        public void ShowRecordEditor(RecordItem item)
        {
            BudgetRecordEditorViewModel vm = new BudgetRecordEditorViewModel(item.record);

            if (windowService.ShowBudgetRecordEditor(vm) == true)
            {
                if (Core.Instance.UpdateRecord(
                        item.record, vm.Amount, vm.Category.category,
                        vm.BudgetType, vm.OnDay,
                        vm.Month, vm.Year))
                {
                    if (vm.Month != SelectedMonth || vm.Year != selectedYear)
                    {
                        Records.Remove(item);
                    }
                }
            }
        }