/**
  * Metodo para actualizar un WarehouseEntranceFile en la base de datos
  * @param WarehouseEntranceFile $warehouseEntranceFile Objeto WarehouseEntranceFile
  */
 public function update($warehouseEntranceFile)
 {
     $this->validateBean($warehouseEntranceFile);
     try {
         $data = $warehouseEntranceFile->toArrayFor(array('id_warehouse_entrance', 'id_file', 'document_type'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(WarehouseEntranceFile::TABLENAME, $data, "id_warehouse_entrance_file = '{$warehouseEntranceFile->getIdWarehouseEntranceFile()}'");
         parent::update($warehouseEntranceFile);
     } catch (\Exception $e) {
         $this->throwException("The WarehouseEntranceFile can't be saved \n", $e);
     }
 }
 /**
  * Metodo para actualizar un PurchaseOrderFile en la base de datos
  * @param PurchaseOrderFile $purchaseOrderFile Objeto PurchaseOrderFile
  */
 public function update($purchaseOrderFile)
 {
     $this->validateBean($purchaseOrderFile);
     try {
         $data = $purchaseOrderFile->toArrayFor(array('id_purchase_order', 'id_file', 'document_type'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(PurchaseOrderFile::TABLENAME, $data, "id_purchase_order_file = '{$purchaseOrderFile->getIdPurchaseOrderFile()}'");
         parent::update($purchaseOrderFile);
     } catch (\Exception $e) {
         $this->throwException("The PurchaseOrderFile can't be saved \n", $e);
     }
 }
Example #3
0
 /**
  * Metodo para actualizar un BookingFile en la base de datos
  * @param BookingFile $bookingFile Objeto BookingFile
  */
 public function update($bookingFile)
 {
     $this->validateBean($bookingFile);
     try {
         $data = $bookingFile->toArrayFor(array('id_booking', 'id_file', 'document_type'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(BookingFile::TABLENAME, $data, "id_booking_file = '{$bookingFile->getIdBookingFile()}'");
         parent::update($bookingFile);
     } catch (\Exception $e) {
         $this->throwException("The BookingFile can't be saved \n", $e);
     }
 }
 /**
  * Metodo para actualizar un ProductPrintingAreaFile en la base de datos
  * @param ProductPrintingAreaFile $productPrintingAreaFile Objeto ProductPrintingAreaFile
  */
 public function update($productPrintingAreaFile)
 {
     $this->validateBean($productPrintingAreaFile);
     try {
         $data = $productPrintingAreaFile->toArrayFor(array('id_product_printing_area', 'id_file', 'document_type'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(ProductPrintingAreaFile::TABLENAME, $data, "id_product_printing_area_file = '{$productPrintingAreaFile->getIdProductPrintingAreaFile()}'");
         parent::update($productPrintingAreaFile);
     } catch (\Exception $e) {
         $this->throwException("The ProductPrintingAreaFile can't be saved \n", $e);
     }
 }