public BalanceJournalViewModel RetrieveBalanceJournalHeaderById(int headerId)
        {
            BalanceJournal          result       = _balanceJournalRepository.GetById(headerId);
            BalanceJournalViewModel mappedResult = new BalanceJournalViewModel();

            return(Map(result, mappedResult));
        }
Esempio n. 2
0
        public BalanceJournalViewModel RetrieveFirstBalance(int id)
        {
            BalanceJournal          result       = _balanceJournalRepository.GetById(id);
            BalanceJournalViewModel mappedResult = new BalanceJournalViewModel();

            return(Map(result, mappedResult));
        }
        public void DeleteFirstBalanceJournal(BalanceJournalViewModel selectedFirstBalanceJournal, int userId)
        {
            BalanceJournal entity = _balanceJournalRepository.GetById(selectedFirstBalanceJournal.Id);

            entity.Status       = (int)DbConstant.DefaultDataStatus.Deleted;
            entity.ModifyUserId = userId;
            entity.ModifyDate   = DateTime.Now;
            _balanceJournalRepository.AttachNavigation <User>(entity.CreateUser);
            _balanceJournalRepository.AttachNavigation <User>(entity.ModifyUser);
            _balanceJournalRepository.Update(entity);
            _unitOfWork.SaveChanges();
        }