Exemplo n.º 1
0
 public BuySellDocBiz(IRepositry <BuySellDoc> entityDal, BuySellItemBiz buySellItemBiz, BizParameters bizParameters, OwnerBiz ownerBiz, CustomerBiz customerBiz, ShopBiz shopBiz, DeliverymanBiz deliverymanBiz, FreightOfferTrxBiz freightOfferTrxBiz, VehicalTypeBiz vehicalTypeBiz, MessageBiz messageBiz, PeopleMessageBiz peopleMessageBiz, SalesmanBiz salesmanBiz, BuySellDocHistoryBiz buySellDocHistoryBiz)
     : base(entityDal, bizParameters)
 {
     _ownerBiz             = ownerBiz;
     _customerBiz          = customerBiz;
     _shopBiz              = shopBiz;
     _buySellBiz           = entityDal as BuySellDocBiz;
     _buySellItemBiz       = buySellItemBiz;
     _freightOfferTrxBiz   = freightOfferTrxBiz;
     _deliverymanBiz       = deliverymanBiz;
     _vehicalTypeBiz       = vehicalTypeBiz;
     _messageBiz           = messageBiz;
     _peopleMessageBiz     = peopleMessageBiz;
     _salesmanBiz          = salesmanBiz;
     _buySellDocHistoryBiz = buySellDocHistoryBiz;
 }
Exemplo n.º 2
0
        private void deleteItems(BuySellDoc buySellDoc)
        {
            List <BuySellItem> buySellItems = new List <BuySellItem>();

            if (!buySellDoc.BuySellItems.IsNullOrEmpty())
            {
                //List the children first
                buySellItems = buySellDoc.BuySellItems.ToList();
            }

            if (!buySellItems.IsNullOrEmpty())
            {
                foreach (var item in buySellItems)
                {
                    BuySellItemBiz.Delete(item.Id);
                }
            }
        }