mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-25 17:17:15 +00:00
31 lines
987 B
C#
31 lines
987 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.SqlClient;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Transactions;
|
|
|
|
namespace bnhtrade.Core.Logic.Account
|
|
{
|
|
public class Journal : UnitOfWorkBase
|
|
{
|
|
public int AccountJournalInsert(int journalTypeId, DateTime entryDate, string currencyCode,
|
|
decimal amount, int debitAccountId = 0, int creditAccountId = 0, bool lockEntry = false)
|
|
{
|
|
return new Data.Database.Account.CreateJournal().AccountJournalInsert(journalTypeId, entryDate, currencyCode,
|
|
amount, debitAccountId, creditAccountId, lockEntry);
|
|
}
|
|
|
|
public bool AccountJournalDelete(int accountJournalId)
|
|
{
|
|
return WithUnitOfWork(uow =>
|
|
{
|
|
bool result = uow.JournalRepository.DeleteJournal(accountJournalId);
|
|
CommitIfOwned(uow);
|
|
return result;
|
|
});
|
|
}
|
|
}
|
|
}
|