Example #1
0
 public function delete(Gyuser_Model_Events $obj)
 {
     try {
         $table = $this->getDbTable();
         $set = array('status' => 0);
         $where = array('id = ?' => $obj->getId());
         $result = $table->update($set, $where);
         return $result;
     } catch (Exception $e) {
         echo $e;
     }
 }
Example #2
0
 public function eventdeleteajaxAction()
 {
     $request = $this->getRequest();
     if ($this->getRequest()->isPost()) {
         $mapper = new Gyuser_Model_EventsDataMapper();
         $Obj = new Gyuser_Model_Events();
         $Obj->setId($request->id);
         $this->_helper->layout->disableLayout();
         $this->_helper->viewRenderer->setNoRender();
         $result = $mapper->delete($Obj);
         if ($result) {
             echo $result;
         } else {
             echo "f";
         }
     }
 }