Exemple #1
0
 public EditTransactionPageViewModel()
 {
     EditTransactionCommand = new DelegateCommand(EditAsync);
     CancelCommand          = new DelegateCommand(Cancel);
     TransactionTypes.Add("Income");
     TransactionTypes.Add("Expense");
 }
        public TransactionType AddTransactionType(string name, bool hasMaximumPrecission)
        {
            TransactionType transactionType = new TransactionType(name, hasMaximumPrecission);

            TransactionTypes.Add(transactionType);
            return(transactionType);
        }
Exemple #3
0
 public NewTransactionPageViewModel()
 {
     CreateTransactionCommand = new DelegateCommand(CreateAsync);
     CancelCommand            = new DelegateCommand(Cancel);
     TranDate = System.DateTime.Now;
     TransactionTypes.Add("Income");
     TransactionTypes.Add("Expense");
 }
 public Context()
 {
     Database.EnsureCreated();
     Transactions.CountAsync();
     if (TransactionTypes.ToList().Count == 0)
     {
         TransactionTypes.Add(new TransactionType()
         {
             Value = "Expense"
         });
         TransactionTypes.Add(new TransactionType()
         {
             Value = "Income"
         });
         SaveChanges();
     }
 }