Beispiel #1
0
        public void InitAddTransaction(bool income, string[] categories)
        {
            HomeAccountingViewModel vm = DataContext as HomeAccountingViewModel;

            categoryComboBox.ItemsSource = categories;
            vm.Category        = "Uncategorised";
            vm.TransactionDate = DateTime.Today;
        }
Beispiel #2
0
        private void AddClick(object sender, RoutedEventArgs e)
        {
            HomeAccountingViewModel vm = DataContext as HomeAccountingViewModel;

            spreadsheetControl1.BeginUpdate();
            try {
                generator.AddTransaction(IsIncome, vm.TransactionDate, (float)Convert.ToDouble(vm.Sum, CultureInfo.CurrentCulture), vm.Category);
            }
            finally {
                spreadsheetControl1.EndUpdate();
            }
        }