예제 #1
0
 /**
  * @param null|TblCommodityItem $serviceBilling_CommodityItem
  */
 public function setServiceBillingCommodityItem($serviceBilling_CommodityItem = null)
 {
     $this->serviceBilling_CommodityItem = null === $serviceBilling_CommodityItem ? null : $serviceBilling_CommodityItem->getId();
 }
예제 #2
0
 /**
  * @param TblCommodityItem $tblCommodityItem
  *
  * @return bool
  */
 public function actionRemoveCommodityItem(TblCommodityItem $tblCommodityItem)
 {
     $Manager = $this->Connection->getEntityManager();
     $Entity = $Manager->getEntity('TblCommodityItem')->findOneBy(array('Id' => $tblCommodityItem->getId()));
     if (null !== $Entity) {
         /** @var Element $Entity */
         Protocol::useService()->createDeleteEntry($this->Connection->getDatabase(), $Entity);
         $Manager->killEntity($Entity);
         return true;
     }
     return false;
 }