C# Класс BudgetAnalyser.Engine.Services.ReconciliationService

Наследование: IReconciliationService, ISupportsModelPersistence
Показать файл Открыть проект

Открытые методы

Метод Описание
BeforeReconciliationValidation ( LedgerBook book, StatementModel model ) : void

An optional validation method the UI can call before invoking MonthEndReconciliation to test for validation warnings. If validation fails a new ValidationWarningException is thrown; otherwise the method returns.

CancelBalanceAdjustment ( LedgerEntryLine entryLine, System.Guid transactionId ) : void
Close ( ) : void

Closes the currently loaded file. No warnings will be raised if there is unsaved data.

CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Create a new file specific for that service's data.

CreateBalanceAdjustment ( LedgerEntryLine entryLine, decimal amount, string narrative, Account account ) : LedgerTransaction
CreateLedgerTransaction ( LedgerEntryLine reconciliation, LedgerEntry ledgerEntry, decimal amount, string narrative ) : LedgerTransaction
LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Loads a data source with the provided database reference data asynchronously.

MonthEndReconciliation ( LedgerBook ledgerBook, System.DateTime reconciliationDate, IBudgetCurrencyContext budgetContext, StatementModel statement, bool ignoreWarnings ) : LedgerEntryLine
ReconciliationService ( [ reconciliationManager ) : System
RemoveTransaction ( LedgerEntry ledgerEntry, System.Guid transactionId ) : void
SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task

Saves the application database asynchronously. This may be called using a background worker thread.

SavePreview ( ) : void

Called before Save is called. This will be called on the UI Thread. Objects can optionally add some context data that will be passed to the ISupportsModelPersistence.SaveAsync method call. This can be used to finalise any edits or prompt the user for closing data, ie, a "what-did-you-change" comment; this can't be done during save as it may not be called using the UI Thread.

TransferFunds ( LedgerEntryLine reconciliation, TransferFundsCommand transferDetails ) : void

Transfer funds from one ledger bucket to another. This is only possible if the current ledger reconciliation is unlocked. This is usually used during reconciliation.

UnlockCurrentMonth ( LedgerBook ledgerBook ) : LedgerEntryLine
UpdateRemarks ( LedgerEntryLine entryLine, string remarks ) : void
ValidateModel ( StringBuilder messages ) : bool

Validates the model owned by the service.

Описание методов

BeforeReconciliationValidation() публичный Метод

An optional validation method the UI can call before invoking MonthEndReconciliation to test for validation warnings. If validation fails a new ValidationWarningException is thrown; otherwise the method returns.
public BeforeReconciliationValidation ( LedgerBook book, StatementModel model ) : void
book BudgetAnalyser.Engine.Ledger.LedgerBook
model BudgetAnalyser.Engine.Statement.StatementModel
Результат void

CancelBalanceAdjustment() публичный Метод

public CancelBalanceAdjustment ( LedgerEntryLine entryLine, System.Guid transactionId ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
transactionId System.Guid
Результат void

Close() публичный Метод

Closes the currently loaded file. No warnings will be raised if there is unsaved data.
public Close ( ) : void
Результат void

CreateAsync() публичный Метод

Create a new file specific for that service's data.
public CreateAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Результат System.Threading.Tasks.Task

CreateBalanceAdjustment() публичный Метод

public CreateBalanceAdjustment ( LedgerEntryLine entryLine, decimal amount, string narrative, Account account ) : LedgerTransaction
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
amount decimal
narrative string
account BudgetAnalyser.Engine.BankAccount.Account
Результат BudgetAnalyser.Engine.Ledger.LedgerTransaction

CreateLedgerTransaction() публичный Метод

public CreateLedgerTransaction ( LedgerEntryLine reconciliation, LedgerEntry ledgerEntry, decimal amount, string narrative ) : LedgerTransaction
reconciliation BudgetAnalyser.Engine.Ledger.LedgerEntryLine
ledgerEntry BudgetAnalyser.Engine.Ledger.LedgerEntry
amount decimal
narrative string
Результат BudgetAnalyser.Engine.Ledger.LedgerTransaction

LoadAsync() публичный Метод

Loads a data source with the provided database reference data asynchronously.
public LoadAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Результат System.Threading.Tasks.Task

MonthEndReconciliation() публичный Метод

public MonthEndReconciliation ( LedgerBook ledgerBook, System.DateTime reconciliationDate, IBudgetCurrencyContext budgetContext, StatementModel statement, bool ignoreWarnings ) : LedgerEntryLine
ledgerBook BudgetAnalyser.Engine.Ledger.LedgerBook
reconciliationDate System.DateTime
budgetContext IBudgetCurrencyContext
statement BudgetAnalyser.Engine.Statement.StatementModel
ignoreWarnings bool
Результат BudgetAnalyser.Engine.Ledger.LedgerEntryLine

ReconciliationService() публичный Метод

public ReconciliationService ( [ reconciliationManager ) : System
reconciliationManager [
Результат System

RemoveTransaction() публичный Метод

public RemoveTransaction ( LedgerEntry ledgerEntry, System.Guid transactionId ) : void
ledgerEntry BudgetAnalyser.Engine.Ledger.LedgerEntry
transactionId System.Guid
Результат void

SaveAsync() публичный Метод

Saves the application database asynchronously. This may be called using a background worker thread.
public SaveAsync ( ApplicationDatabase applicationDatabase ) : System.Threading.Tasks.Task
applicationDatabase BudgetAnalyser.Engine.Persistence.ApplicationDatabase
Результат System.Threading.Tasks.Task

SavePreview() публичный Метод

Called before Save is called. This will be called on the UI Thread. Objects can optionally add some context data that will be passed to the ISupportsModelPersistence.SaveAsync method call. This can be used to finalise any edits or prompt the user for closing data, ie, a "what-did-you-change" comment; this can't be done during save as it may not be called using the UI Thread.
public SavePreview ( ) : void
Результат void

TransferFunds() публичный Метод

Transfer funds from one ledger bucket to another. This is only possible if the current ledger reconciliation is unlocked. This is usually used during reconciliation.
public TransferFunds ( LedgerEntryLine reconciliation, TransferFundsCommand transferDetails ) : void
reconciliation BudgetAnalyser.Engine.Ledger.LedgerEntryLine /// The reconciliation line that this transfer will be created in. A transfer can only occur /// between two ledgers in the same reconciliation. ///
transferDetails BudgetAnalyser.Engine.Ledger.TransferFundsCommand The details of the requested transfer.
Результат void

UnlockCurrentMonth() публичный Метод

public UnlockCurrentMonth ( LedgerBook ledgerBook ) : LedgerEntryLine
ledgerBook BudgetAnalyser.Engine.Ledger.LedgerBook
Результат BudgetAnalyser.Engine.Ledger.LedgerEntryLine

UpdateRemarks() публичный Метод

public UpdateRemarks ( LedgerEntryLine entryLine, string remarks ) : void
entryLine BudgetAnalyser.Engine.Ledger.LedgerEntryLine
remarks string
Результат void

ValidateModel() публичный Метод

Validates the model owned by the service.
public ValidateModel ( StringBuilder messages ) : bool
messages StringBuilder
Результат bool