diff --git a/MMExNotifier/DataModel/Account.cs b/MMExNotifier/DataModel/Account.cs index 59ff585..b3890a7 100644 --- a/MMExNotifier/DataModel/Account.cs +++ b/MMExNotifier/DataModel/Account.cs @@ -8,43 +8,63 @@ internal class Account { [PrimaryKey] public int ACCOUNTID { get; set; } + [Column] public string? ACCOUNTNAME { get; set; } + [Column] public string? ACCOUNTTYPE { get; set; } + [Column] public string? ACCOUNTNUM { get; set; } + [Column] public string? STATUS { get; set; } + [Column] public string? NOTES { get; set; } + [Column] public string? HELDAT { get; set; } + [Column] public string? WEBSITE { get; set; } + [Column] public string? CONTACTINFO { get; set; } + [Column] public string? ACCESSINFO { get; set; } + [Column] public double INITIALBAL { get; set; } + [Column] public string? FAVORITEACCT { get; set; } + [Column] public int CURRENCYID { get; set; } + [Column] public int STATEMENTLOCKED { get; set; } + [Column] public DateTime? STATEMENTDATE { get; set; } + [Column] + [Column] public int MINIMUMBALANCE { get; set; } + [Column] public double CREDITLIMIT { get; set; } + [Column] public int INTERESTRATE { get; set; } + [Column] public DateTime? PAYMENTDUEDATE { get; set; } + [Column] public int MINIMUMPAYMENT { get; set; } } diff --git a/MMExNotifier/DataModel/BillDeposit.cs b/MMExNotifier/DataModel/BillDeposit.cs index 962c961..44b917a 100644 --- a/MMExNotifier/DataModel/BillDeposit.cs +++ b/MMExNotifier/DataModel/BillDeposit.cs @@ -8,36 +8,52 @@ internal class BillDeposit { [PrimaryKey] public int BDID { get; set; } + [Column] public int ACCOUNTID { get; set; } + [Column] public int TOACCOUNTID { get; set; } + [Column] public int PAYEEID { get; set; } + [Column] - public string? TRANSCODE { get; set; } /* Withdrawal, Deposit, Transfer */ + public string TRANSCODE { get; set; } = "Withdrawal"; /* Withdrawal, Deposit, Transfer */ + [Column] public double TRANSAMOUNT { get; set; } + [Column] public string? STATUS { get; set; } /* None, Reconciled, Void, Follow up, Duplicate */ + [Column] public string? TRANSACTIONNUMBER { get; set; } + [Column] public string? NOTES { get; set; } + [Column] public int CATEGID { get; set; } + [Column] public int SUBCATEGID { get; set; } + [Column] public string? TRANSDATE { get; set; } + [Column] public int FOLLOWUPID { get; set; } + [Column] public int TOTRANSAMOUNT { get; set; } + [Column] public int REPEATS { get; set; } + [Column] - public DateTime? NEXTOCCURRENCEDATE { get; set; } + public DateTime NEXTOCCURRENCEDATE { get; set; } + [Column] public int NUMOCCURRENCES { get; set; } } diff --git a/MMExNotifier/DataModel/Category.cs b/MMExNotifier/DataModel/Category.cs index a323a46..a9cf253 100644 --- a/MMExNotifier/DataModel/Category.cs +++ b/MMExNotifier/DataModel/Category.cs @@ -7,10 +7,13 @@ internal class Category { [PrimaryKey] public int CATEGID { get; set; } + [Column] public string? CATEGNAME { get; set; } + [Column] public int ACTIVE { get; set; } + [Column] public int PARENTID { get; set; } } diff --git a/MMExNotifier/DataModel/Payee.cs b/MMExNotifier/DataModel/Payee.cs index b20ef1e..fd20de6 100644 --- a/MMExNotifier/DataModel/Payee.cs +++ b/MMExNotifier/DataModel/Payee.cs @@ -7,10 +7,13 @@ internal class Payee { [PrimaryKey] public int PAYEEID { get; set; } + [Column] public string? PAYEENAME { get; set; } + [Column] public int CATEGID { get; set; } + [Column] public int SUBCATEGID { get; set; } } diff --git a/MMExNotifier/DataModel/Transaction.cs b/MMExNotifier/DataModel/Transaction.cs index 378479b..940a188 100644 --- a/MMExNotifier/DataModel/Transaction.cs +++ b/MMExNotifier/DataModel/Transaction.cs @@ -8,30 +8,43 @@ internal class Transaction { [PrimaryKey] public int TRANSID { get; set; } + [Column] public int ACCOUNTID { get; set; } + [Column] public int? TOACCOUNTID { get; set; } + [Column] public int PAYEEID { get; set; } + [Column] public string? TRANSCODE { get; set; }/* Withdrawal, Deposit, Transfer */ + [Column] public double TRANSAMOUNT { get; set; } + [Column] public string? STATUS { get; set; } /* None, Reconciled, Void, Follow up, Duplicate */ + [Column] public string? TRANSACTIONNUMBER { get; set; } + [Column] public string? NOTES { get; set; } + [Column] public int CATEGID { get; set; } + [Column] public int SUBCATEGID { get; set; } + [Column] public DateTime TRANSDATE { get; set; } + [Column] public int FOLLOWUPID { get; set; } + [Column] public double TOTRANSAMOUNT { get; set; } } diff --git a/MMExNotifier/Database/DatabaseService.cs b/MMExNotifier/Database/DatabaseService.cs index 861ce7e..279926e 100644 --- a/MMExNotifier/Database/DatabaseService.cs +++ b/MMExNotifier/Database/DatabaseService.cs @@ -40,10 +40,10 @@ orderby b.NEXTOCCURRENCEDATE select new ExpiringBill { BillId = b.BDID, - NextOccurrenceDate = b.NEXTOCCURRENCEDATE.Value, + NextOccurrenceDate = b.NEXTOCCURRENCEDATE, PayeeName = p.PAYEENAME!, Amount = b.TOTRANSAMOUNT, - IsDeposit = b.TRANSCODE == "Deposit" ? true : false, + IsDeposit = b.TRANSCODE == "Deposit", CategoryName = c.CATEGNAME!, SubCategoryName = s.CATEGNAME!, Notes = b.NOTES! diff --git a/MMExNotifier/Helpers/NotificationService.cs b/MMExNotifier/Helpers/NotificationService.cs index e6fd80f..8221ccc 100644 --- a/MMExNotifier/Helpers/NotificationService.cs +++ b/MMExNotifier/Helpers/NotificationService.cs @@ -5,7 +5,7 @@ namespace MMExNotifier.Helpers { internal class NotificationService : INotificationService { - private IToastNotification _toastNotification; + private readonly IToastNotification _toastNotification; public NotificationService(IToastNotification toastNotification) { diff --git a/MMExNotifier/MVVM/RelayCommand.cs b/MMExNotifier/MVVM/RelayCommand.cs index 6709c4e..e15b527 100644 --- a/MMExNotifier/MVVM/RelayCommand.cs +++ b/MMExNotifier/MVVM/RelayCommand.cs @@ -27,7 +27,7 @@ public RelayCommand(Action actionToExecute, Func executionEvaluator) public bool CanExecute(object? parameter) { - return _canExecute == null ? true : _canExecute.Invoke(); + return _canExecute == null || _canExecute.Invoke(); } public void Execute(object? parameter)