function addAction() { $db = new Application_Model_DbTable_DbGlobal(); $this->view->rs_tax = $db->getAllTax(); $owner = $db->getAllNameOwner(); //array_unshift($owner, array ('' => 'បន្ថែមអ្នកទទួលថ្មី') ); $this->view->rows_owner = $owner; $cus = new Booking_Model_DbTable_DbBooking(); $rows_cus = $cus->getIdNamecustomer(); $this->view->rows_cus = $rows_cus; $row_vehicle = $cus->getVehiclerefNo(); $this->view->row_vehicle = $row_vehicle; }
public function editAction() { $db = new agreement_Model_DbTable_DbAgreement(); if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); try { $db->addAgreement($data); Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", "/agreement/imdex/add"); } catch (Exception $e) { Application_Form_FrmMessage::message("Application Error"); Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage()); } } $id = $this->getRequest()->getParam('id'); if (empty($id)) { $this->_redirect("/agreement"); } $this->view->row_agreement = $db->getAgreementById($id); print_r($db->getAgreementById($id)); $db = new Application_Model_DbTable_DbGlobal(); $this->view->rs_tax = $db->getAllTax(); $owner = $db->getAllNameOwner(); $this->view->country = $db->getAllCountry(); $this->view->rows_owner = $owner; $cus = new Booking_Model_DbTable_DbBooking(); $rows_cus = $cus->getIdNamecustomer(); $this->view->rows_cus = $rows_cus; $row_vehicle = $cus->getVehiclerefNo(); $this->view->row_vehicle = $row_vehicle; $db = new agreement_Model_DbTable_DbAgreement(); $this->view->rsbooking = $db->getAllBookingNumber(); }