Cats.Services.EarlyWarning.ReliefRequisitionService.EditAllocatedAmount C# (CSharp) Метод

EditAllocatedAmount() публичный Метод

public EditAllocatedAmount ( decimal>.Dictionary allocations ) : bool
allocations decimal>.Dictionary
Результат bool
        public bool EditAllocatedAmount(Dictionary<int,decimal> allocations )
        {
            foreach (var alloction in allocations)
            {
                var requisitionDetail = _unitOfWork.ReliefRequisitionDetailRepository.FindById(alloction.Key);
                if (requisitionDetail == null) return false;
                requisitionDetail.Amount = alloction.Value;
            }

               _unitOfWork.Save();

            return true;
        }