Esempio n. 1
0
        private void SaveChanges()
        {
            DateTime date = DateTimeHelper.PstNow();
            int      changeSuccessCount = 0;

            foreach (Transaction transaction in Transactions)
            {
                if (transaction.HasUpdated)
                {
                    CarloniusRepository.UpdateTransaction(TransactionConverter.ConvertToBudget_Transaction(transaction));
                    CarloniusRepository.AddDateTimeLookup(transaction.DateTime);
                    transaction.HasUpdated = false;
                    ChangesMade            = false;
                    date = transaction.DateTime;
                    changeSuccessCount++;
                }
            }
            MessageBox.Show(string.Format("{0} Change(s) Saved Successfully!", changeSuccessCount), "Transaction Update", MessageBoxButton.OK, MessageBoxImage.None);
            if (DateTimeHelper.AreEqual(date, Date))
            {
                UpdateTransactions(Date);
            }
        }
Esempio n. 2
0
 private void DeleteTransaction()
 {
     CarloniusRepository.DeleteTransaction(TransactionConverter.ConvertToBudget_Transaction(SelectedTransaction));
     Transactions.Remove(SelectedTransaction);
 }