protected void DeleteJournal(EnumReferenceTable referenceTable, string referenceType, string referenceId) { TJournalRef journalRef = JournalRefRepository.GetByReference(referenceTable, referenceType, referenceId); if (journalRef != null) { TJournal journalToDelete = journalRef.JournalId; JournalRefRepository.Delete(journalRef); JournalRepository.Delete(journalToDelete); } }
private void DeleteJournal(TTrans trans) { TJournalRef journalRef = JournalRefRepository.GetByReference(EnumReferenceTable.Transaction, trans.TransStatus, trans.Id); if (journalRef != null) { TJournal journalToDelete = journalRef.JournalId; JournalRefRepository.Delete(journalRef); JournalRepository.Delete(journalToDelete); } }