コード例 #1
0
ファイル: ForwarderCatalog.php プロジェクト: Eximagen/sochi
 /**
  * Metodo para actualizar un Forwarder en la base de datos
  * @param Forwarder $forwarder Objeto Forwarder
  */
 public function update($forwarder)
 {
     $this->validateBean($forwarder);
     try {
         $data = $forwarder->toArrayFor(array('id_company', 'name', 'last_fee', 'status'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(Forwarder::TABLENAME, $data, "id_forwarder = '{$forwarder->getIdForwarder()}'");
         parent::update($forwarder);
     } catch (\Exception $e) {
         $this->throwException("The Forwarder can't be saved \n", $e);
     }
 }
コード例 #2
0
 /**
  * Metodo para actualizar un CustomsBroker en la base de datos
  * @param CustomsBroker $customsBroker Objeto CustomsBroker
  */
 public function update($customsBroker)
 {
     $this->validateBean($customsBroker);
     try {
         $data = $customsBroker->toArrayFor(array('id_company', 'id_last_fee_file', 'payment', 'status'));
         //$data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(CustomsBroker::TABLENAME, $data, "id_customs_broker = '{$customsBroker->getIdCustomsBroker()}'");
         parent::update($customsBroker);
     } catch (\Exception $e) {
         $this->throwException("The CustomsBroker can't be saved \n", $e);
     }
 }
コード例 #3
0
ファイル: SupplierCatalog.php プロジェクト: Eximagen/sochi
 /**
  * Metodo para actualizar un Supplier en la base de datos
  * @param Supplier $supplier Objeto Supplier
  */
 public function update($supplier)
 {
     $this->validateBean($supplier);
     try {
         $data = $supplier->toArrayFor(array('id_invoice_address', 'id_company', 'id_currency', 'id_payment_term', 'id_default_port', 'card_name', 'rfc', 'type_person', 'paydays', 'id_final_grand_risk', 'id_approval_status', 'quality', 'consistency', 'time', 'type_supplier'));
         $data = array_filter($data, array($this, 'isNotNull'));
         $this->getDb()->update(Supplier::TABLENAME, $data, "id_supplier = '{$supplier->getIdSupplier()}'");
         parent::update($supplier);
     } catch (\Exception $e) {
         $this->throwException("The Supplier can't be saved \n", $e);
     }
 }