function editAction() { if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); $db = new Group_Model_DbTable_DbClientBlackList(); try { $db->updatClientBlackList($data); Application_Form_FrmMessage::message($this->tr->translate('EDIT_SUCCESS')); Application_Form_FrmMessage::redirectUrl('/group/clientblacklist'); } catch (Exception $e) { Application_Form_FrmMessage::message("EDIT_FAIL"); $err = $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($err); } } $db = new Group_Model_DbTable_DbClientBlackList(); $id = $this->getRequest()->getParam("id"); $row = $db->getBlackListById($id); $fm = new Group_Form_FrmClientBlackList(); $frm = $fm->FrmClientBlackList($row); Application_Model_Decorator::removeAllDecorator($frm); $this->view->Form_client_blacklist = $frm; }
function rptClientblacklistAction(){ $key = new Application_Model_DbTable_DbKeycode(); $this->view->data=$key->getKeyCodeMiniInv(TRUE); $db = new Group_Model_DbTable_DbClientBlackList(); if($this->getRequest()->isPost()){ $search=$this->getRequest()->getPost(); }else{ $search = array( 'adv_search' => '', 'status_search' => -1, 'start_date'=> date('Y-m-d'), 'end_date'=>date('Y-m-d')); } $this->view->calleteral_list = $db->getAllBlackList($search);//call frome model $frm = new Group_Form_FrmClientBlackList(); $frm = $frm->FrmClientBlackList(); Application_Model_Decorator::removeAllDecorator($frm); $this->view->frm_search = $frm; $this->view->list_end_date =$search; }