Beispiel #1
0
        public bool UpdatePriceTotal(Guid hddInfoId)
        {
            var caseInfo = _repository.GetById(hddInfoId);

            caseInfo.PaidAmount = _paymentRepository.GetTotalPaidAmount(hddInfoId);
            caseInfo.DueAmount  = caseInfo.TotalCost - (caseInfo.PaidAmount + caseInfo.DiscountAmount);

            try
            {
                _repository.Edit(caseInfo);
                _repository.Commit();
            }
            catch (Exception exception)
            {
                throw new Exception(exception.Message);
            }
            return(true);
        }