예제 #1
0
 public bool DeleteDonationPlanDetail(DonationPlanDetail donationPlanDetail)
 {
     if (donationPlanDetail == null) return false;
     _unitOfWork.DonationPlanDetailRepository.Delete(donationPlanDetail);
     _unitOfWork.Save();
     return true;
 }
예제 #2
0
        public List<DonationPlanDetail> GetNewReceiptPlanDetail()
        {
            var hubs = _unitOfWork.HubRepository.Get(h => h.HubOwnerID == 1);
            var donationPlanDetails = new List<DonationPlanDetail>();
            foreach (var hub in hubs)
            {
                var donationDetail = new DonationPlanDetail();
                donationDetail.HubID = hub.HubID;
                donationDetail.Hub = hub;
                donationDetail.AllocatedAmount = 0;
                donationDetail.ReceivedAmount = 0;
                donationDetail.Balance = 0;
                donationPlanDetails.Add(donationDetail);

            }
            return donationPlanDetails;
        }
예제 #3
0
 public bool EditDonationPlanDetail(DonationPlanDetail donationPlanDetail)
 {
     _unitOfWork.DonationPlanDetailRepository.Edit(donationPlanDetail);
     _unitOfWork.Save();
     return true;
 }