コード例 #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;
 }