public bool DeleteDonationPlanDetail(DonationPlanDetail donationPlanDetail) { if (donationPlanDetail == null) return false; _unitOfWork.DonationPlanDetailRepository.Delete(donationPlanDetail); _unitOfWork.Save(); return true; }
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; }
public bool EditDonationPlanDetail(DonationPlanDetail donationPlanDetail) { _unitOfWork.DonationPlanDetailRepository.Edit(donationPlanDetail); _unitOfWork.Save(); return true; }