2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +--------------------------------------------------------------------+
4 // | Ministerio de Economía |
6 // +--------------------------------------------------------------------+
7 // | This file is part of Intranet. |
9 // | Intranet is free software; you can redistribute it and/or modify |
10 // | it under the terms of the GNU General Public License as published |
11 // | by the Free Software Foundation; either version 2 of the License, |
12 // | or (at your option) any later version. |
14 // | Intranet is distributed in the hope that it will be useful, but |
15 // | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 // | General Public License for more details. |
19 // | You should have received a copy of the GNU General Public License |
20 // | along with Hooks; if not, write to the Free Software Foundation, |
21 // | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 // +--------------------------------------------------------------------+
23 // | Creado: Mon Jul 7 17:22:10 2003 |
24 // | Autor: Matías Sklar <msklar@mecon.gov.ar> |
25 // +--------------------------------------------------------------------+
27 // $Id: Intranet_Legajos_ExperienciaLaboral.php 23 2003-07-15 18:56:42Z msklar $
31 require_once 'DB.php';
33 require_once 'intranetdb.php';
35 // +X2C Class 155 :Servicios_Legajos_ExperienciaLaboral
37 * Antigüedad laboral del agente
41 // XXX - Pregunta llucar: POR QUE CATSO HEREDA DE DB???
42 class Servicios_Legajos_ExperienciaLaboral extends DB {
50 * @var int $antiguedad
56 * @var int $experiencia
70 function Servicios_Legajos_ExperienciaLaboral($agente) // ~X2C
72 $this->agente = $agente;
73 $db = IntranetDB::connect();
75 trigger_error($db->getMessage('No pudo conectarse a la base'), E_USER_ERROR);
78 WHERE nrodoc = $agente
80 $result_exp = $db->query($sql);
81 if (DB::isError($result_exp))
82 trigger_error($result_exp->getMessage('Query mal hecho'), E_USER_ERROR);
84 for ($fila = 0; $fila < $result_exp->numRows(); $fila++) {
85 $this->experiencia[$fila] = $result_exp->fetchRow(DB_FETCHMODE_ASSOC);
90 WHERE nrodoc = $agente";
91 $result_ant = $db->query($sql);
92 if (DB::isError($result_ant))
93 trigger_error($result_ant->getMessage('Query mal hecho'), E_USER_ERROR);
95 if ($result_ant->numRows() > 0) {
96 $this->antiguedad = $result_ant->fetchRow(DB_FETCHMODE_ASSOC);
102 // +X2C Operation 160
107 function getAntiguedad() // ~X2C
109 return $this->antiguedad;
113 // +X2C Operation 161
118 function getExperiencia() // ~X2C
120 return $this->experiencia;
124 } // -X2C Class :Servicios_Legajos_ExperienciaLaboral