Exemplo n.º 1
0
 public function operatorformajaxAction()
 {
     $request = $this->getRequest();
     if ($this->getRequest()->isPost()) {
         $mapper = new Gyuser_Model_OperatorDataMapper();
         $Obj = new Gyuser_Model_Operator();
         $Obj->setType($request->type);
         $Obj->setName($request->name);
         $Obj->setLast_name($request->last_name);
         $Obj->setEmail($request->email);
         $Obj->setPassword($request->password);
         if ($request->id) {
             $Obj->setId($request->id);
         }
         $this->_helper->layout->disableLayout();
         $this->_helper->viewRenderer->setNoRender();
         $id = $mapper->save($Obj);
         if ($id) {
             echo $id;
         } else {
             echo "f";
         }
     }
 }