示例#1
0
 public function getUsuariById()
 {
     $request = $this->getAjaxData();
     if ($request['isNew']) {
         $CTO = new ClientTableObject(NULL, ClientTableObject::FROM_EMPTY);
         echo json_encode($CTO);
     } else {
         $CTO = new ClientTableObject(NULL, ClientTableObject::FROM_EMPTY);
         $CTO->loadById($request['idU']);
         echo json_encode($CTO);
     }
 }
示例#2
0
 public function ajaxGetClientEspectacles()
 {
     if ($this->isAuth()) {
         $CTO = new ClientTableObject();
         $CTO->loadById($this->idU);
         echo json_encode($CTO->getComandes());
     } else {
         throw new MyException("Permisos insuficients");
     }
 }