Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rguida committed May 23, 2024
1 parent 36c736f commit bdb2589
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 6 deletions.
20 changes: 20 additions & 0 deletions MMExNotifier/DataModel/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
20 changes: 18 additions & 2 deletions MMExNotifier/DataModel/BillDeposit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
3 changes: 3 additions & 0 deletions MMExNotifier/DataModel/Category.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
3 changes: 3 additions & 0 deletions MMExNotifier/DataModel/Payee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
13 changes: 13 additions & 0 deletions MMExNotifier/DataModel/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
4 changes: 2 additions & 2 deletions MMExNotifier/Database/DatabaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down
2 changes: 1 addition & 1 deletion MMExNotifier/Helpers/NotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace MMExNotifier.Helpers
{
internal class NotificationService : INotificationService
{
private IToastNotification _toastNotification;
private readonly IToastNotification _toastNotification;

public NotificationService(IToastNotification toastNotification)
{
Expand Down
2 changes: 1 addition & 1 deletion MMExNotifier/MVVM/RelayCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public RelayCommand(Action actionToExecute, Func<bool> executionEvaluator)

public bool CanExecute(object? parameter)
{
return _canExecute == null ? true : _canExecute.Invoke();
return _canExecute == null || _canExecute.Invoke();
}

public void Execute(object? parameter)
Expand Down

0 comments on commit bdb2589

Please sign in to comment.