]> git.llucax.com Git - mecon/meconlib.git/commitdiff
Nuevos métodos en MECON_Dependencia.
authorMyrna Degano <mdegan@mecon.gov.ar>
Mon, 22 Sep 2003 19:29:56 +0000 (19:29 +0000)
committerMyrna Degano <mdegan@mecon.gov.ar>
Mon, 22 Sep 2003 19:29:56 +0000 (19:29 +0000)
doc/meconlib.xmi
lib/MECON/Agente.php
lib/MECON/Dependencia.php
lib/MECON/Tiempo/Hora.php

index 6ee29247fc6f56bb62543ad2abbc8ad30c2e450e..e0dde1cf4022bb9e4e88ca348a67573f2bdf1486 100644 (file)
@@ -6,12 +6,12 @@
    <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
    <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
   </XMI.documentation>
    <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
    <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
   </XMI.documentation>
-  <XMI.model xmi.name="meconlib" href="/home/martin/public_html/meconlib/doc/meconlib.xmi" />
+  <XMI.model xmi.name="meconlib" href="/home/mdegan/public_html/meconlib/doc/meconlib.xmi" />
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
   <docsettings viewid="1" documentation="x2e:extern
   <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
  </XMI.header>
  <XMI.content>
   <docsettings viewid="1" documentation="x2e:extern
-" uniqueid="166" />
+" uniqueid="168" />
   <umlobjects>
    <UML:Actor stereotype="" package="" xmi.id="3" abstract="0" documentation="Beatriz o alguien tan poderoso" name="Beti" static="0" scope="200" />
    <UML:UseCase stereotype="" package="" xmi.id="4" abstract="0" documentation="" name="Cambiar Credencial" static="0" scope="200" />
   <umlobjects>
    <UML:Actor stereotype="" package="" xmi.id="3" abstract="0" documentation="Beatriz o alguien tan poderoso" name="Beti" static="0" scope="200" />
    <UML:UseCase stereotype="" package="" xmi.id="4" abstract="0" documentation="" name="Cambiar Credencial" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="166" type="void" abstract="0" documentation="" name="getNombreBreve" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="148" type="void" abstract="0" documentation="" name="getAgentes" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="150" type="dependencia" abstract="0" documentation="" name="getDependencias" static="1" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="166" type="void" abstract="0" documentation="" name="getNombreBreve" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="148" type="void" abstract="0" documentation="" name="getAgentes" static="0" scope="200" />
     <UML:Operation stereotype="" package="" xmi.id="150" type="dependencia" abstract="0" documentation="" name="getDependencias" static="1" scope="200" />
+    <UML:Operation stereotype="" package="" xmi.id="167" type="array" abstract="0" documentation="Buscar dependencias por el codep." name="buscarPorCodigo" static="1" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;db" abstract="0" documentation="Base de Datos" name="dbh" static="0" scope="201" />
+     <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="string" abstract="0" documentation="COdigo de dependencia, o parte del mismo seguido del comodIn (*)" name="codep" static="0" scope="201" />
+    </UML:Operation>
+    <UML:Operation stereotype="" package="" xmi.id="168" type="array" abstract="0" documentation="" name="buscarPorNombre" static="1" scope="200" >
+     <UML:Parameter stereotype="" package="" xmi.id="1" value="" type="&amp;db" abstract="0" documentation="Base de Datos" name="dbh" static="0" scope="201" />
+     <UML:Parameter stereotype="" package="" xmi.id="2" value="" type="string" abstract="0" documentation="Cadena de palabras clave del nombre de la dependencia." name="clave" static="0" scope="201" />
+    </UML:Operation>
     <UML:Attribute stereotype="" package="" xmi.id="146" value="" type="int" abstract="0" documentation="" name="codep" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="163" value="" type="int" abstract="0" documentation="" name="nombre" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="164" value="" type="int" abstract="0" documentation="" name="nombre_breve" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="146" value="" type="int" abstract="0" documentation="" name="codep" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="163" value="" type="int" abstract="0" documentation="" name="nombre" static="0" scope="200" />
     <UML:Attribute stereotype="" package="" xmi.id="164" value="" type="int" abstract="0" documentation="" name="nombre_breve" static="0" scope="200" />
    <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="512" rolea="76" roleb="75" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
   </umlobjects>
   <diagrams>
    <UML:Association nameb="" stereotype="" visibilitya="200" visibilityb="200" assoctype="512" rolea="76" roleb="75" multia="" doca="" multib="" docb="" package="" xmi.id="-1" abstract="0" documentation="" name="" static="0" scope="200" changeabilitya="900" changeabilityb="900" namea="" />
   </umlobjects>
   <diagrams>
-   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="812" snapy="10" showatts="1" xmi.id="1" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="626" >
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="494" snapy="10" showatts="1" xmi.id="1" documentation="" type="402" showops="1" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="467" >
     <widgets>
      <UML:ClassWidget usesdiagramfillcolour="0" width="171" showattsigs="601" usesdiagramusefillcolour="0" x="279" linecolour="#ff0000" y="137" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="168" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="131" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
     <widgets>
      <UML:ClassWidget usesdiagramfillcolour="0" width="171" showattsigs="601" usesdiagramusefillcolour="0" x="279" linecolour="#ff0000" y="137" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="168" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="131" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
-     <UML:ClassWidget usesdiagramfillcolour="0" width="172" showattsigs="601" usesdiagramusefillcolour="0" x="27" linecolour="#ff0000" y="137" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="126" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="145" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
+     <UML:ClassWidget usesdiagramfillcolour="0" width="257" showattsigs="601" usesdiagramusefillcolour="0" x="27" linecolour="#ff0000" y="137" showopsigs="601" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="154" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="145" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ClassWidget usesdiagramfillcolour="1" width="35" showattsigs="601" usesdiagramusefillcolour="1" x="284" linecolour="none" y="40" showopsigs="601" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="125" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ClassWidget usesdiagramfillcolour="1" width="122" showattsigs="601" usesdiagramusefillcolour="1" x="149" linecolour="none" y="45" showopsigs="601" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="39" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations/>
    </diagram>
      <UML:ClassWidget usesdiagramfillcolour="1" width="35" showattsigs="601" usesdiagramusefillcolour="1" x="284" linecolour="none" y="40" showopsigs="601" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="125" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
      <UML:ClassWidget usesdiagramfillcolour="1" width="122" showattsigs="601" usesdiagramusefillcolour="1" x="149" linecolour="none" y="45" showopsigs="601" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="1" isinstance="0" xmi.id="39" showoperations="1" showpackage="0" showscope="1" showstereotype="0" font="Helvetica,8,-1,5,50,0,0,0,0,0" />
     </widgets>
     <messages/>
     <associations/>
    </diagram>
-   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="812" snapy="10" showatts="1" xmi.id="2" documentation="" type="400" showops="1" showpackage="0" name="Bandas2" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="626" >
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="616" snapy="10" showatts="1" xmi.id="2" documentation="" type="400" showops="1" showpackage="0" name="Bandas2" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="547" >
     <widgets>
      <UML:ActorWidget usesdiagramfillcolour="0" width="34" usesdiagramusefillcolour="0" x="74" linecolour="#ff0000" y="184" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:UseCaseWidget usesdiagramfillcolour="0" width="134" usesdiagramusefillcolour="0" x="343" linecolour="#ff0000" y="57" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="53" usefillcolor="1" isinstance="0" xmi.id="4" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
     <widgets>
      <UML:ActorWidget usesdiagramfillcolour="0" width="34" usesdiagramusefillcolour="0" x="74" linecolour="#ff0000" y="184" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:UseCaseWidget usesdiagramfillcolour="0" width="134" usesdiagramusefillcolour="0" x="343" linecolour="#ff0000" y="57" instancename="" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="53" usefillcolor="1" isinstance="0" xmi.id="4" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      </UML:AssocWidget>
     </associations>
    </diagram>
      </UML:AssocWidget>
     </associations>
    </diagram>
-   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="812" snapy="10" showatts="1" xmi.id="115" documentation="" type="400" showops="1" showpackage="0" name="Cambiar Credencial" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="626" >
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="523" snapy="10" showatts="1" xmi.id="115" documentation="" type="400" showops="1" showpackage="0" name="Cambiar Credencial" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="467" >
     <widgets>
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="134" usesdiagramusefillcolour="1" x="385" linecolour="none" y="71" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="4" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:ActorWidget usesdiagramfillcolour="1" width="34" usesdiagramusefillcolour="1" x="195" linecolour="none" y="32" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
     <widgets>
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="134" usesdiagramusefillcolour="1" x="385" linecolour="none" y="71" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="4" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:ActorWidget usesdiagramfillcolour="1" width="34" usesdiagramusefillcolour="1" x="195" linecolour="none" y="32" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      </UML:AssocWidget>
     </associations>
    </diagram>
      </UML:AssocWidget>
     </associations>
    </diagram>
-   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="812" snapy="10" showatts="1" xmi.id="117" documentation="" type="400" showops="1" showpackage="0" name="Procesar Periodo" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="626" >
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="494" snapy="10" showatts="1" xmi.id="117" documentation="" type="400" showops="1" showpackage="0" name="Procesar Periodo" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="467" >
     <widgets>
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="120" usesdiagramusefillcolour="1" x="317" linecolour="none" y="117" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="6" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:ActorWidget usesdiagramfillcolour="1" width="34" usesdiagramusefillcolour="1" x="85" linecolour="none" y="109" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
     <widgets>
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="120" usesdiagramusefillcolour="1" x="317" linecolour="none" y="117" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="6" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:ActorWidget usesdiagramfillcolour="1" width="34" usesdiagramusefillcolour="1" x="85" linecolour="none" y="109" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="3" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
@@ -253,7 +261,7 @@ El proceso puede ser muy largo." font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      </UML:AssocWidget>
     </associations>
    </diagram>
      </UML:AssocWidget>
     </associations>
    </diagram>
-   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="812" snapy="10" showatts="1" xmi.id="119" documentation="" type="400" showops="1" showpackage="0" name="Mostrar Banda" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="626" >
+   <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" zoom="100" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" canvaswidth="494" snapy="10" showatts="1" xmi.id="119" documentation="" type="400" showops="1" showpackage="0" name="Mostrar Banda" localid="30000" showstereotype="0" showscope="1" snapcsgrid="0" font="Helvetica,11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" canvasheight="467" >
     <widgets>
      <UML:ActorWidget usesdiagramfillcolour="1" width="55" usesdiagramusefillcolour="1" x="140" linecolour="none" y="92" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="76" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="104" usesdiagramusefillcolour="1" x="372" linecolour="none" y="84" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="75" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
     <widgets>
      <UML:ActorWidget usesdiagramfillcolour="1" width="55" usesdiagramusefillcolour="1" x="140" linecolour="none" y="92" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="63" usefillcolor="1" isinstance="0" xmi.id="76" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
      <UML:UseCaseWidget usesdiagramfillcolour="1" width="104" usesdiagramusefillcolour="1" x="372" linecolour="none" y="84" instancename="" usesdiagramlinecolour="1" fillcolour="none" height="53" usefillcolor="1" isinstance="0" xmi.id="75" font="Helvetica,11,-1,5,50,0,0,0,0,0" />
@@ -293,10 +301,12 @@ El proceso puede ser muy largo." font="Helvetica,11,-1,5,50,0,0,0,0,0" />
       <listitem open="0" type="815" id="151" label="getOtrosDatos" />
       <listitem open="0" type="815" id="134" label="getTipo" />
      </listitem>
       <listitem open="0" type="815" id="151" label="getOtrosDatos" />
       <listitem open="0" type="815" id="134" label="getTipo" />
      </listitem>
-     <listitem open="0" type="813" id="145" label="MECON_Dependencia" >
+     <listitem open="1" type="813" id="145" label="MECON_Dependencia" >
       <listitem open="0" type="814" id="146" label="codep" />
       <listitem open="0" type="814" id="163" label="nombre" />
       <listitem open="0" type="814" id="164" label="nombre_breve" />
       <listitem open="0" type="814" id="146" label="codep" />
       <listitem open="0" type="814" id="163" label="nombre" />
       <listitem open="0" type="814" id="164" label="nombre_breve" />
+      <listitem open="0" type="815" id="167" label="buscarPorCodigo" />
+      <listitem open="0" type="815" id="168" label="buscarPorNombre" />
       <listitem open="0" type="815" id="147" label="dependencia" />
       <listitem open="0" type="815" id="148" label="getAgentes" />
       <listitem open="0" type="815" id="150" label="getDependencias" />
       <listitem open="0" type="815" id="147" label="dependencia" />
       <listitem open="0" type="815" id="148" label="getAgentes" />
       <listitem open="0" type="815" id="150" label="getDependencias" />
index 2757cf0b164fc13c6d385090f445749793a9d3bd..ef533aaaafb1848f29e49d28a67d65971781cbde 100644 (file)
@@ -28,7 +28,7 @@ $Id$
 require_once 'DB.php';
 require_once 'MECON/Tiempo/Hora.php';
 
 require_once 'DB.php';
 require_once 'MECON/Tiempo/Hora.php';
 
-// +X2C Class 131 :Agente
+// +X2C Class 131 :MECON_Agente
 /**
  * @access public
  */
 /**
  * @access public
  */
@@ -80,7 +80,7 @@ class MECON_Agente {
      * @return void
      * @access public
      */
      * @return void
      * @access public
      */
-    function MECON_Agente($agente) // ~X2C
+    function Agente($agente) // ~X2C
     {
         if(! is_null($agente))
             $this->buscarAgente($agente);
     {
         if(! is_null($agente))
             $this->buscarAgente($agente);
@@ -220,5 +220,5 @@ class MECON_Agente {
     }
     // -X2C
 
     }
     // -X2C
 
-} // -X2C Class :Agente
-?>
+} // -X2C Class :MECON_Agente
+?>
\ No newline at end of file
index e0f88c488da66e7780bdf86a969197afe2ec815b..c3e30478c816e5428bfd06ed42f0b0371e186a82 100644 (file)
@@ -28,7 +28,7 @@ $Id$
 require_once 'MECON/Agente.php';
 require_once 'DB.php';
 
 require_once 'MECON/Agente.php';
 require_once 'DB.php';
 
-// +X2C Class 145 :Dependencia
+// +X2C Class 145 :MECON_Dependencia
 /**
  * @access protected
  */
 /**
  * @access protected
  */
@@ -60,7 +60,7 @@ class MECON_Dependencia {
      * @return void
      * @access public
      */
      * @return void
      * @access public
      */
-    function MECON_Dependencia($codep) // ~X2C
+    function dependencia($codep) // ~X2C
     {
         $this->codep = $codep;
         $dsn = 'mysql://intranet:intranet@intranet-db.mecon.ar/CODEP';
     {
         $this->codep = $codep;
         $dsn = 'mysql://intranet:intranet@intranet-db.mecon.ar/CODEP';
@@ -167,5 +167,67 @@ class MECON_Dependencia {
     }
     // -X2C
 
     }
     // -X2C
 
-} // -X2C Class :Dependencia
-?>
+    // +X2C Operation 167
+    /**
+     * Buscar dependencias por el codep.
+     *
+     * @param  db &$dbh Base de Datos
+     * @param  string $codep COdigo de dependencia, o parte del mismo seguido del comodIn (*)
+     *
+     * @return array
+     * @access public
+     * @static
+     */
+    function buscarPorCodigo(&$dbh, $codep) // ~X2C
+    {
+       //Reemplazar el comodIn
+       $codep = preg_replace ('/\*/', '%', $codep);    
+    
+       $sql = " SELECT codigo_actual, codigo_comdoc, nombre 
+                FROM CODEP.Dependencias
+                WHERE dependencia_esta_activa = 1 
+                       AND codigo_actual LIKE '$codep' 
+                ORDER BY codigo_actual ";
+
+        $dbh->setFetchMode(DB_FETCHMODE_ASSOC);
+        $result = $dbh->query($sql);
+       
+       return $result;
+    }
+    // -X2C
+
+    // +X2C Operation 168
+    /**
+     * @param  db &$dbh Base de Datos
+     * @param  string $clave Cadena de palabras clave del nombre de la dependencia.
+     *
+     * @return array
+     * @access public
+     * @static
+     */
+    function buscarPorNombre(&$dbh, $clave) // ~X2C
+    {
+       //ReducciOn de espacios en blanco
+       $clave = preg_replace ('/\s+/', ' ', $clave);   
+    
+       $sql = " SELECT codigo_actual, codigo_comdoc, nombre 
+                FROM CODEP.Dependencias
+                WHERE  dependencia_esta_activa = 1 ";
+
+        //Separar la cadena de palabras clave
+       $items = split(' ', $clave);
+       foreach ($items as $i){
+           $sql.= " AND nombre like '%$i%' ";
+       }
+
+       $sql.= " ORDER BY codigo_actual";
+
+        $dbh->setFetchMode(DB_FETCHMODE_ASSOC);
+        $result = $dbh->query($sql);
+       
+       return $result;
+    }
+    // -X2C
+
+} // -X2C Class :MECON_Dependencia
+?>
\ No newline at end of file
index 34c87530ae4e62ddb22ed897e83f9e907c57a71e..347f08e9bae464d439f3fbe225a83b7c5bcb613c 100644 (file)
@@ -99,4 +99,4 @@ class MECON_Tiempo_Hora extends Date_Span {
 
 }
 
 
 }
 
-?>
+?>
\ No newline at end of file