Ejemplo n.º 1
0
        public static ReactiveList <Transaction> ConvertToTransactions(ObservableCollection <Budget_Transactions> transactions)
        {
            ReactiveList <Transaction> trans = new ReactiveList <Transaction>();

            foreach (Budget_Transactions transaction in transactions)
            {
                Transaction newTransaction = new Transaction
                {
                    TransactionID = transaction.TransactionID,
                    Amount        = transaction.Amount,
                    Category      = Transaction.GetCategory(transaction.CategoryID),
                    CategoryID    = transaction.CategoryID,
                    CreatedDate   = transaction.CreatedDate,
                    DateTime      = transaction.DateTime,
                    Description   = transaction.Description,
                    ModifiedDate  = transaction.ModifiedDate,
                    HasUpdated    = false
                };
                EditUserControlViewModel vm = EditUserControlViewModel.GetInstance();
                newTransaction.PropertyChanged += vm.TransactionPropertyChanged;
                trans.Add(newTransaction);
            }
            return(trans);
        }
Ejemplo n.º 2
0
 public EditUserControl()
 {
     InitializeComponent();
     DataContext = EditUserControlViewModel.GetInstance();
 }