Exemplo n.º 1
0
        public bool EditCase(Case participation)
        {
            if (_repository.Get(filter => filter.CompetanceId == participation.CompetanceId && filter.Name == participation.Name).Count() >= 1)
            {
                return(false);
            }

            _repository.Edit(participation);
            _uow.Commit();

            return(true);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 public void Edit(Cases cases)
 {
     _caseRepository.Edit(cases);
 }