public function frmPopupCO() { $tr = Application_Form_FrmLanguages::getCurrentlanguage(); $frmclient = new Other_Form_FrmCO(); $frm = $frmclient->FrmAddCO(); Application_Model_Decorator::removeAllDecorator($frm); $str = '<div class="dijitHidden"> <div data-dojo-type="dijit.Dialog" id="frm_co" > <form id="form_co" name="form_co" >'; $str .= '<table style="margin: 0 auto; width: 100%;" cellspacing="7"> <tr> <td>Name Khmer</td> <td>' . $frm->getElement('namsdfse_kh') . '</td> </tr> <tr> <td>First Name</td> <td>' . $frm->getElement('first_name') . '</td> </tr> <tr> <td>Last Name</td> <td>' . $frm->getElement('last_name') . '</td> </tr> <tr> <td>Sex</td> <td>' . $frm->getElement('co_sex') . '</td> </tr> <tr> <td>Tel</td> <td>' . $frm->getElement('tel') . '</td> </tr> <tr> <td>Email</td> <td>' . $frm->getElement('email') . '</td> </tr> <tr> <td>Address</td> <td>' . $frm->getElement('address') . '</td> </tr> <tr> <td colspan="4" align="center"> <input type="button" value="Save" label="Save" dojoType="dijit.form.Button" iconClass="dijitEditorIcon dijitEditorIconSave" onclick="AddNewCo();"/> </td> </tr> </table>'; $str .= '</form> </div> </div>'; return $str; }
function editAction() { $db_co = new Other_Model_DbTable_DbCreditOfficer(); if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); try { $db_co->addCreditOfficer($_data); Application_Form_FrmMessage::Sucessfull("ការបញ្ចូលជោគជ័យ !", '/other/co'); } catch (Exception $e) { Application_Form_FrmMessage::message("ការបញ្ចូលមិនជោគជ័យ"); $err = $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($err); } } $id = $this->getRequest()->getParam("id"); $row = $db_co->getCOById($id); if (empty($row)) { $this->_redirect('other/co'); } $frm = new Other_Form_FrmCO(); $frm_co = $frm->FrmAddCO($row); Application_Model_Decorator::removeAllDecorator($frm_co); $this->view->frm_co = $frm_co; }