Ejemplo n.º 1
0
 public bool DeleteReceiptPlanDetail(ReceiptPlanDetail receiptPlanDetail)
 {
     if (receiptPlanDetail == null)
     {
         return(false);
     }
     _unitOfWork.ReceiptPlanDetailRepository.Delete(receiptPlanDetail);
     _unitOfWork.Save();
     return(true);
 }
Ejemplo n.º 2
0
        public List <ReceiptPlanDetail> GetNewReceiptPlanDetail()
        {
            var hubs = _unitOfWork.HubRepository.Get(h => h.HubOwnerID == 1);
            List <ReceiptPlanDetail> _receiptPlanDetails = new List <ReceiptPlanDetail>();

            foreach (var hub in hubs)
            {
                var receiptDetailPlan = new ReceiptPlanDetail();
                receiptDetailPlan.HubId     = hub.HubID;
                receiptDetailPlan.Hub       = hub;
                receiptDetailPlan.Allocated = 0;
                receiptDetailPlan.Received  = 0;
                receiptDetailPlan.Balance   = 0;
                _receiptPlanDetails.Add(receiptDetailPlan);
            }
            return(_receiptPlanDetails);
        }
Ejemplo n.º 3
0
 public bool EditReceiptPlanDetail(ReceiptPlanDetail receiptPlanDetail)
 {
     _unitOfWork.ReceiptPlanDetailRepository.Edit(receiptPlanDetail);
     _unitOfWork.Save();
     return(true);
 }