예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }