Exemplo n.º 1
0
 public function delete(Gyuser_Model_Holidays $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;
     }
 }
Exemplo n.º 2
0
 public function holidaysformajaxAction()
 {
     try {
         $request = $this->getRequest();
         if ($this->getRequest()->isPost()) {
             $mapper = new Gyuser_Model_HolidaysDataMapper();
             $Obj = new Gyuser_Model_Holidays();
             $_holidays_json = $request->holidays_json;
             $Obj->setHoliday_json($_holidays_json);
             $this->_helper->layout->disableLayout();
             $this->_helper->viewRenderer->setNoRender();
             $result = $mapper->SaveWithJson($Obj);
             if ($result) {
                 echo $result;
             } else {
                 echo "f";
             }
         }
     } catch (Exception $e) {
         echo $e;
     }
 }