/*
               File: UsuWeb
        Description: Cuentas de Usuarios Web
             Author: GeneXus Java Generator version 9_0_4-076
       Generated on: August 21, 2009 11:46:38.19
       Program type: Callable routine
          Main DBMS: db2
*/
gxaddKeyListener( "HELP" , 1 );
{gxsetDateFormat( "DMY" );
gxsetTimeFormat( 24 );
gxsetFirstYearCentury( 40 );
this.gxDecPoint =  "," ;
this.gxThSep =  "." ;}
 bGXAutoskip = false;
this._SetStandaloneVars=function()
{
   AV16uswpas = GXgetControlValue("_USWPAS")
   AV44Uswuop = GXgetIntegerValue("_USWUOPE")
   AV47Pgmdes = GXgetControlValue("_PGMDESC")
   AV45Pgmnam = GXgetControlValue("_PGMNAME")
   AV35Window = GXgetControlValue("_WINDOWPOPUP")
   Gx_mode=GXgetControlValue("MODE");
}
this._Valid_Uswcod=function()
{
   try {
      gxballoon = getGXBallon("USWCOD");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswnom=function()
{
   try {
      gxballoon = getGXBallon("USWNOM");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswmail=function()
{
   try {
      gxballoon = getGXBallon("USWMAIL");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswtipo=function()
{
   try {
      gxballoon = getGXBallon("USWTIPO");
      AnyError = 0;
      try {
         if ( A12135UsWT == 'A' && true )
         {
            GXsetCtrlProperty("USWUOPE","Enabled", 0 );
         }
         else
         {
            GXsetCtrlProperty("USWUOPE","Enabled", 1 );
         }
      }
      catch(e){}
      try {
         if ( A12135UsWT == 'I' && true )
         {
            GXsetCtrlProperty("USWPRVCOD","Enabled", 0 );
         }
         else
         {
            GXsetCtrlProperty("USWPRVCOD","Enabled", 1 );
         }
      }
      catch(e){}
      try {
         if ( ! ( A12135UsWT == 'I' || A12135UsWT == 'A' ) )
         {
            gxballoon.setError("Campo Tipo de usuario web fuera de rango");
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
      }
      catch(e){}
      try {
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswtipdoc=function()
{
   try {
      gxballoon = getGXBallon("USWTIPDOC");
      AnyError = 0;
      if ( AnyError == 0 )
      {
         gxajaxloadCrl('gxLoad_35',new Array("A12136UsWT"),new Array());
         if ( GXLastAjaxSt == 101 )
         {
            gxballoon.setError("No existe 'Tipo Documento de Usuario Web'.");
            AnyError = 1 ;
         }
         else
         {
         }
      }

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswdoc=function()
{
   try {
      gxballoon = getGXBallon("USWDOC");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswuope=function()
{
   try {
      gxballoon = getGXBallon("USWUOPE");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswprvcod=function()
{
   try {
      gxballoon = getGXBallon("USWPRVCOD");
      AnyError = 0;
      if ( AnyError == 0 && ( A12554UsWP != gxOldKey("A12554UsWPA12555UsWP") ) )
      {
         gxajaxloadCrl('gxLoad_36',new Array("A12554UsWP"),new Array("A12555UsWP"));
         if ( ! ( GXLastAjaxSt == 101 ) )
         {
            gxSetKey("A12554UsWPA12555UsWP","A12554UsWP");
         }
         else
         {
            gxUnsetSetKey("A12554UsWPA12555UsWP");
         }
      }
      try {
         if ( ! (""==A12554UsWP) )
         {
            AV42Sprov1 = gxAggSelDecimal("_SPROV1","19",".",",",["A12554UsWP"]) ;
         }
      }
      catch(e){}
      try {
         AV44Uswuop = gxAggSelInteger("_USWUOPE","21",["A12554UsWP"]) ;
      }
      catch(e){}
      try {
         if ( (0==A12553UsWU) && true )
         {
            A12553UsWU = AV44Uswuop ;
         }
      }
      catch(e){}
      try {
         if ( true && ! (""==A12554UsWP) && (""==A12555UsWP) )
         {
            gxballoon.setError('La provincia no existe');
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( true && ! (""==A12554UsWP) && AV42Sprov1 != 1 )
         {
            gxballoon.setError('La provincia no existe');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswlogin=function()
{
   try {
      gxballoon = getGXBallon("USWLOGIN");
      AnyError = 0;
      try {
         AV43Susuwe = gxAggSelDecimal("_SUSUWEB","20",".",",",["A12140UsWL"]) ;
      }
      catch(e){}
      try {
         if ( true && AV43Susuwe == 1 )
         {
            gxballoon.setError('El Usuario Ingresado ya existe');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswpas=function()
{
   try {
      gxballoon = getGXBallon("USWPAS");
      AnyError = 0;
      try {
         if ( true && gxlength( A12141UsWP) != 6 )
         {
            gxballoon.setError('Sólo se permite contraseñas de 6 caracteres');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Validv_Uswpas2=function()
{
   try {
      gxballoon = getGXBallon("_USWPAS2");
      AnyError = 0;
      try {
         if ( (""==A12133UsWN) || (""==A12134UsWM) || (0==A12137UsWD) || (0==A12553UsWU) || (""==A12554UsWP) || (""==A12140UsWL) || (""==A12141UsWP) || (""==AV18UsWPas) )
         {
            gxballoon.setError('Debe completar todos los datos obligatorios');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswpreg=function()
{
   try {
      gxballoon = getGXBallon("USWPREG");
      AnyError = 0;
      try {
         if ( ! ( A12142UsWP == 1 || A12142UsWP == 2 || A12142UsWP == 3 || A12142UsWP == 4 ) )
         {
            gxballoon.setError("Campo Código de pregunta de identificación de cuenta fuera de rango");
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( true && A12141UsWP != AV18UsWPas )
         {
            gxballoon.setError('No coincide verificación de password');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Uswest=function()
{
   try {
      gxballoon = getGXBallon("USWEST");
      AnyError = 0;
      try {
         if ( ! ( A12145UsWE == '' || A12145UsWE == 'O' || A12145UsWE == 'R' ) )
         {
            gxballoon.setError("Campo Estado de solicitud de cuenta de usuario web fuera de rango");
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._usuweb=function()
{
}
this._init=function()
{
}
_GXValidFnc = new Array();
this._GXLastCtrlId =52;
_GXValidFnc[7]={lvl:0,grid:0,fnc:null,fld:"USWNOM",gxvar:"A12133UsWN",op:[],ip:[],nacdep:[],v2v:function(Value){A12133UsWN=Value},v2c:function(){GXsetControlValue("USWNOM",A12133UsWN,0)},c2v:function(){A12133UsWN=GXgetControlValue("USWNOM")}};
_GXValidFnc[9]={lvl:0,grid:0,fnc:null,fld:"USWMAIL",gxvar:"A12134UsWM",op:[],ip:[],nacdep:[],v2v:function(Value){A12134UsWM=Value},v2c:function(){GXsetControlValue("USWMAIL",A12134UsWM,0)},c2v:function(){A12134UsWM=GXgetControlValue("USWMAIL")}};
_GXValidFnc[11]={lvl:0,grid:0,fnc:_Valid_Uswtipo,fld:"USWTIPO",gxvar:"A12135UsWT",op:[],ip:[11],nacdep:[],v2v:function(Value){A12135UsWT=Value},v2c:function(){GXsetComboBoxValue("USWTIPO",A12135UsWT)},c2v:function(){A12135UsWT=GXgetControlValue("USWTIPO")}};
_GXValidFnc[15]={lvl:0,grid:0,fnc:_Valid_Uswtipdoc,fld:"USWTIPDOC",gxvar:"A12136UsWT",op:[],ip:[15],nacdep:[],v2v:function(Value){A12136UsWT=gxint(Value)},v2c:function(){GXsetComboBoxValue("USWTIPDOC",A12136UsWT)},c2v:function(){A12136UsWT=GXgetIntegerValue("USWTIPDOC")}};
_GXValidFnc[16]={lvl:0,grid:0,fnc:null,fld:"USWDOC",gxvar:"A12137UsWD",op:[],ip:[],nacdep:[],v2v:function(Value){A12137UsWD=gxint(Value)},v2c:function(){GXsetControlValue("USWDOC",A12137UsWD,0)},c2v:function(){A12137UsWD=GXgetIntegerValue("USWDOC")}};
_GXValidFnc[20]={lvl:0,grid:0,fnc:null,fld:"USWUOPE",gxvar:"A12553UsWU",op:[],ip:[],nacdep:[],v2v:function(Value){A12553UsWU=gxint(Value)},v2c:function(){GXsetControlValue("USWUOPE",A12553UsWU,0)},c2v:function(){A12553UsWU=GXgetIntegerValue("USWUOPE")}};
_GXValidFnc[24]={lvl:0,grid:0,fnc:null,fld:"USWTELF",gxvar:"A12138UsWT",op:[],ip:[],nacdep:[],v2v:function(Value){A12138UsWT=Value},v2c:function(){GXsetControlValue("USWTELF",A12138UsWT,0)},c2v:function(){A12138UsWT=GXgetControlValue("USWTELF")}};
_GXValidFnc[26]={lvl:0,grid:0,fnc:null,fld:"USWTELM",gxvar:"A12139UsWT",op:[],ip:[],nacdep:[],v2v:function(Value){A12139UsWT=Value},v2c:function(){GXsetControlValue("USWTELM",A12139UsWT,0)},c2v:function(){A12139UsWT=GXgetControlValue("USWTELM")}};
_GXValidFnc[30]={lvl:0,grid:0,fnc:_Valid_Uswprvcod,fld:"USWPRVCOD",gxvar:"A12554UsWP",op:[33,20],ip:[30,33,20],nacdep:[],v2v:function(Value){A12554UsWP=Value},v2c:function(){GXsetControlValue("USWPRVCOD",A12554UsWP,0)},c2v:function(){A12554UsWP=GXgetControlValue("USWPRVCOD")}};
_GXValidFnc[33]={lvl:0,grid:0,fnc:null,fld:"USWPRVNOM",gxvar:"A12555UsWP",op:[],ip:[],nacdep:[],v2v:function(Value){A12555UsWP=Value},v2c:function(){GXsetControlValue("USWPRVNOM",A12555UsWP,0)},c2v:function(){A12555UsWP=GXgetControlValue("USWPRVNOM")}};
_GXValidFnc[37]={lvl:0,grid:0,fnc:_Valid_Uswlogin,fld:"USWLOGIN",gxvar:"A12140UsWL",op:[],ip:[37],nacdep:[],v2v:function(Value){A12140UsWL=Value},v2c:function(){GXsetControlValue("USWLOGIN",A12140UsWL,0)},c2v:function(){A12140UsWL=GXgetControlValue("USWLOGIN")}};
_GXValidFnc[39]={lvl:0,grid:0,fnc:_Valid_Uswpas,fld:"USWPAS",gxvar:"A12141UsWP",op:[],ip:[39],nacdep:[],v2v:function(Value){A12141UsWP=Value},v2c:function(){GXsetControlValue("USWPAS",A12141UsWP,0)},c2v:function(){A12141UsWP=GXgetControlValue("USWPAS")}};
_GXValidFnc[41]={lvl:0,grid:0,fnc:_Validv_Uswpas2,fld:"_USWPAS2",gxvar:"AV18UsWPas",op:[],ip:[7,9,16,20,30,37,39,41],nacdep:[],v2v:function(Value){AV18UsWPas=Value},v2c:function(){GXsetControlValue("_USWPAS2",AV18UsWPas,0)},c2v:function(){AV18UsWPas=GXgetControlValue("_USWPAS2")}};
_GXValidFnc[43]={lvl:0,grid:0,fnc:_Valid_Uswpreg,fld:"USWPREG",gxvar:"A12142UsWP",op:[],ip:[43],nacdep:[],v2v:function(Value){A12142UsWP=gxint(Value)},v2c:function(){GXsetComboBoxValue("USWPREG",A12142UsWP)},c2v:function(){A12142UsWP=GXgetIntegerValue("USWPREG")}};
_GXValidFnc[45]={lvl:0,grid:0,fnc:null,fld:"USWRESP",gxvar:"A12143UsWR",op:[],ip:[],nacdep:[],v2v:function(Value){A12143UsWR=Value},v2c:function(){GXsetControlValue("USWRESP",A12143UsWR,0)},c2v:function(){A12143UsWR=GXgetControlValue("USWRESP")}};
_GXValidFnc[47]={lvl:0,grid:0,fnc:_Valid_Uswcod,fld:"USWCOD",gxvar:"A12132UsWC",op:[],ip:[],nacdep:[],v2v:function(Value){A12132UsWC=gxint(Value)},v2c:function(){GXsetControlValue("USWCOD",A12132UsWC,0)},c2v:function(){A12132UsWC=GXgetIntegerValue("USWCOD")}};
_GXValidFnc[48]={lvl:0,grid:0,fnc:null,fld:"USWFEC",gxvar:"A12144UsWF",op:[],ip:[],nacdep:[],v2v:function(Value){A12144UsWF=Value},v2c:function(){GXsetControlValue("USWFEC",A12144UsWF,0)},c2v:function(){A12144UsWF=GXgetControlValue("USWFEC")}};
_GXValidFnc[49]={lvl:0,grid:0,fnc:_Valid_Uswest,fld:"USWEST",gxvar:"A12145UsWE",op:[],ip:[49],nacdep:[],v2v:function(Value){A12145UsWE=Value},v2c:function(){GXsetComboBoxValue("USWEST",A12145UsWE)},c2v:function(){A12145UsWE=GXgetControlValue("USWEST")}};
_GXValidFnc[50]={lvl:0,grid:0,fnc:null,fld:"USWUSUCOD",gxvar:"A12146UsWU",op:[],ip:[],nacdep:[],v2v:function(Value){A12146UsWU=Value},v2c:function(){GXsetControlValue("USWUSUCOD",A12146UsWU,0)},c2v:function(){A12146UsWU=GXgetControlValue("USWUSUCOD")}};
_GXValidFnc[51]={lvl:0,grid:0,fnc:null,fld:"USWUSULTMOD",gxvar:"A12147UsWU",op:[],ip:[],nacdep:[],v2v:function(Value){A12147UsWU=Value},v2c:function(){GXsetControlValue("USWUSULTMOD",A12147UsWU,0)},c2v:function(){A12147UsWU=GXgetControlValue("USWUSULTMOD")}};
_GXValidFnc[52]={lvl:0,grid:0,fnc:null,fld:"USWFECMOD",gxvar:"A12148UsWF",op:[],ip:[],nacdep:[],v2v:function(Value){A12148UsWF=Value},v2c:function(){GXsetControlValue("USWFECMOD",A12148UsWF,0)},c2v:function(){A12148UsWF=GXgetControlValue("USWFECMOD")}};
this.A12133UsWN=0;
this.A12134UsWM=0;
this.A12135UsWT=0;
this.A12136UsWT=0;
this.A12137UsWD=0;
this.A12553UsWU=0;
this.A12138UsWT=0;
this.A12139UsWT=0;
this.A12554UsWP=0;
this.A12555UsWP=0;
this.A12140UsWL=0;
this.A12141UsWP=0;
this.AV18UsWPas=0;
this.A12142UsWP=0;
this.A12143UsWR=0;
this.A12132UsWC=0;
this.A12144UsWF=0;
this.A12145UsWE=0;
this.A12146UsWU=0;
this.A12147UsWU=0;
this.A12148UsWF=0;
_SetStandaloneVars( ) ;

