/*
               File: PWUsuarios
        Description: :: Registro de Usuario Ribeiro ::
             Author: GeneXus C# Generator version 9_0_7-910
       Generated on: 9/21/2011 15:24:20.18
       Program type: Callable routine
          Main DBMS: sqlserver
*/
{gxsetDateFormat( "DMY" );
gxsetTimeFormat( 24 );
gxsetFirstYearCentury( 40 );
this.gxDecPoint =  "," ;
this.gxThSep =  "." ;}
 bGXAutoskip = false;
this._SetStandaloneVars=function()
{
   AV9WUsuCod = GXgetIntegerValue("_WUSUCOD")
   Gx_BScreen = GXgetIntegerValue("_GXBSCREEN")
   AV13Existe = GXgetIntegerValue("_EXISTENICK")
   A152WUsuEs = GXgetControlValue("WUSUEST")
   Gx_mode=GXgetControlValue("MODE");
}
this._Valid_Wusucod=function()
{
   try {
      gxballoon = getGXBallon("WUSUCOD");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusufecalta=function()
{
   try {
      gxballoon = getGXBallon("WUSUFECALTA");
      AnyError = 0;
      try {
         if ( ! ( (new gxdate("").compare(A984WUsuFe)==0) || new gxdate( A984WUsuFe ).compare( gxymdtod( 1753, 01, 01) ) >= 0 ) )
         {
            gxballoon.setError("Campo Fecha de Alta fuera de rango");
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusunom=function()
{
   try {
      gxballoon = getGXBallon("WUSUNOM");
      AnyError = 0;
      try {
         if ( (""==A140WUsuNo) )
         {
            gxballoon.setError('Debe ingresar Nombre/s asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusuape=function()
{
   try {
      gxballoon = getGXBallon("WUSUAPE");
      AnyError = 0;
      try {
         if ( (""==A141WUsuAp) )
         {
            gxballoon.setError('Debe ingresar Apellido/s asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusudni=function()
{
   try {
      gxballoon = getGXBallon("WUSUDNI");
      AnyError = 0;
      try {
         if ( (0==A154WUsuDn) )
         {
            gxballoon.setError('Debe ingresar Documento asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusufchnac=function()
{
   try {
      gxballoon = getGXBallon("WUSUFCHNAC");
      AnyError = 0;
      try {
         if ( ! ( (new gxdate("").compare(A142WUsuFc)==0) || new gxdate( A142WUsuFc ).compare( gxymdtod( 1753, 01, 01) ) >= 0 ) )
         {
            gxballoon.setError("Campo Fecha de Nacimiento Usuario fuera de rango");
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( (new gxdate("").compare(A142WUsuFc)==0) )
         {
            gxballoon.setError('Debe ingresar Fecha Nacimiento asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusumail=function()
{
   try {
      gxballoon = getGXBallon("WUSUMAIL");
      AnyError = 0;
      try {
         if ( (""==A144WUsuMa) )
         {
            gxballoon.setError('Debe ingresar e-mail asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( ! (""==A144WUsuMa) )
         {
            gxUDP('gxJX_Action13',["A144WUsuMa"],["A144WUsuMa", "AV11Valido"]);
         }
      }
      catch(e){}
      try {
         if ( AV11Valido == 0 && ! (""==A144WUsuMa) )
         {
            gxballoon.setError('Debe ingresar e-mail valido');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusupais=function()
{
   try {
      gxballoon = getGXBallon("WUSUPAIS");
      AnyError = 0;
      try {
         if ( (""==A148WUsuPa) )
         {
            gxballoon.setError('Debe ingresar Pais asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusuprov=function()
{
   try {
      gxballoon = getGXBallon("WUSUPROV");
      AnyError = 0;
      try {
         if ( (""==A515WUsuPr) )
         {
            gxballoon.setError('Debe seleccionar Provincia. Si su pais no es argentina, selecciona la opcion Otra');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusuloc=function()
{
   try {
      gxballoon = getGXBallon("WUSULOC");
      AnyError = 0;
      try {
         if ( (""==A146WUsuLo) )
         {
            gxballoon.setError('Debe ingresar Localidad/Barrio del Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusudir=function()
{
   try {
      gxballoon = getGXBallon("WUSUDIR");
      AnyError = 0;
      try {
         if ( (""==A145WUsuDi) )
         {
            gxballoon.setError('Debe ingresar Dirección asociada al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusutellin=function()
{
   try {
      gxballoon = getGXBallon("WUSUTELLIN");
      AnyError = 0;
      try {
         if ( (""==A149WUsuTe) )
         {
            gxballoon.setError('Debe ingresar Teléfono Particular del Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusuname=function()
{
   try {
      gxballoon = getGXBallon("WUSUNAME");
      AnyError = 0;
      try {
         if ( (""==A155WUsuNa) )
         {
            gxballoon.setError('Debe ingresar Nombre asociado al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( ! (""==A155WUsuNa) )
         {
            gxUDP('gxJX_Action21',["A155WUsuNa"],["A155WUsuNa", "AV13Existe"]);
         }
      }
      catch(e){}
      try {
         if ( AV13Existe == 1 && ! (""==A155WUsuNa) )
         {
            gxballoon.setError('El nombre asociado al Usuario ya existe, por favor ingrese otro');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Valid_Wusupass=function()
{
   try {
      gxballoon = getGXBallon("WUSUPASS");
      AnyError = 0;
      try {
         if ( (""==A151WUsuPa) )
         {
            gxballoon.setError('Debe ingresar Contraseña asociada al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Validv_Wusupass=function()
{
   try {
      gxballoon = getGXBallon("_WUSUPASS");
      AnyError = 0;
      try {
         if ( (""==AV8WUsuPas) )
         {
            gxballoon.setError('Debe ingresar Confirmacion asociada al Usuario');
            AnyError = 1 ;
         }
      }
      catch(e){}
      try {
         if ( ! (""==AV8WUsuPas) && ( AV8WUsuPas != A151WUsuPa ) )
         {
            gxballoon.setError('Confirmación de Contraseñas diferentes');
            AnyError = 1 ;
         }
      }
      catch(e){}

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Validv_Validationresult=function()
{
   try {
      gxballoon = getGXBallon("_VALIDATIONRESULT");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._Validv_Valido=function()
{
   try {
      gxballoon = getGXBallon("_VALIDO");
      AnyError = 0;

   }
   catch(e){}
   try {
      if (gxballoon == null) return true; return gxballoon.show();
   }
   catch(e){}
   return true ;
}
this._pwusuarios=function()
{
}
this._init=function()
{
}
_GXValidFnc = new Array();
this._GXLastCtrlId =78;
_GXValidFnc[8]={lvl:0,grid:0,fnc:_Valid_Wusucod,fld:"WUSUCOD",gxvar:"A137WUsuCo",op:[],ip:[],nacdep:[],v2v:function(Value){A137WUsuCo=gxint(Value)},v2c:function(){GXsetControlValue("WUSUCOD",A137WUsuCo,0)},c2v:function(){A137WUsuCo=GXgetIntegerValue("WUSUCOD")}};
_GXValidFnc[9]={lvl:0,grid:0,fnc:_Valid_Wusufecalta,fld:"WUSUFECALTA",gxvar:"A984WUsuFe",op:[],ip:[9],nacdep:[],v2v:function(Value){A984WUsuFe=Value},v2c:function(){GXsetControlValue("WUSUFECALTA",A984WUsuFe,0)},c2v:function(){A984WUsuFe=GXgetControlValue("WUSUFECALTA")}};
_GXValidFnc[11]={lvl:0,grid:0,fnc:_Valid_Wusunom,fld:"WUSUNOM",gxvar:"A140WUsuNo",op:[],ip:[11],nacdep:[],v2v:function(Value){A140WUsuNo=Value},v2c:function(){GXsetControlValue("WUSUNOM",A140WUsuNo,0)},c2v:function(){A140WUsuNo=GXgetControlValue("WUSUNOM")}};
_GXValidFnc[14]={lvl:0,grid:0,fnc:_Valid_Wusuape,fld:"WUSUAPE",gxvar:"A141WUsuAp",op:[],ip:[14],nacdep:[],v2v:function(Value){A141WUsuAp=Value},v2c:function(){GXsetControlValue("WUSUAPE",A141WUsuAp,0)},c2v:function(){A141WUsuAp=GXgetControlValue("WUSUAPE")}};
_GXValidFnc[17]={lvl:0,grid:0,fnc:_Valid_Wusudni,fld:"WUSUDNI",gxvar:"A154WUsuDn",op:[],ip:[17],nacdep:[],v2v:function(Value){A154WUsuDn=gxint(Value)},v2c:function(){GXsetControlValue("WUSUDNI",A154WUsuDn,0)},c2v:function(){A154WUsuDn=GXgetIntegerValue("WUSUDNI")}};
_GXValidFnc[20]={lvl:0,grid:0,fnc:_Valid_Wusufchnac,fld:"WUSUFCHNAC",gxvar:"A142WUsuFc",op:[],ip:[20],nacdep:[],v2v:function(Value){A142WUsuFc=Value},v2c:function(){GXsetControlValue("WUSUFCHNAC",A142WUsuFc,0)},c2v:function(){A142WUsuFc=GXgetControlValue("WUSUFCHNAC")}};
_GXValidFnc[23]={lvl:0,grid:0,fnc:null,fld:"WUSUSEXO",gxvar:"A143WUsuSe",op:[],ip:[],nacdep:[],v2v:function(Value){A143WUsuSe=Value},v2c:function(){GXsetComboBoxValue("WUSUSEXO",A143WUsuSe)},c2v:function(){A143WUsuSe=GXgetControlValue("WUSUSEXO")}};
_GXValidFnc[25]={lvl:0,grid:0,fnc:_Valid_Wusumail,fld:"WUSUMAIL",gxvar:"A144WUsuMa",op:[78,25],ip:[25,78],nacdep:[],v2v:function(Value){A144WUsuMa=Value},v2c:function(){GXsetControlValue("WUSUMAIL",A144WUsuMa,0)},c2v:function(){A144WUsuMa=GXgetControlValue("WUSUMAIL")}};
_GXValidFnc[29]={lvl:0,grid:0,fnc:_Valid_Wusupais,fld:"WUSUPAIS",gxvar:"A148WUsuPa",op:[],ip:[29],nacdep:[],v2v:function(Value){A148WUsuPa=Value},v2c:function(){GXsetControlValue("WUSUPAIS",A148WUsuPa,0)},c2v:function(){A148WUsuPa=GXgetControlValue("WUSUPAIS")}};
_GXValidFnc[32]={lvl:0,grid:0,fnc:_Valid_Wusuprov,fld:"WUSUPROV",gxvar:"A515WUsuPr",op:[],ip:[32],nacdep:[],v2v:function(Value){A515WUsuPr=Value},v2c:function(){GXsetComboBoxValue("WUSUPROV",A515WUsuPr)},c2v:function(){A515WUsuPr=GXgetControlValue("WUSUPROV")}};
_GXValidFnc[35]={lvl:0,grid:0,fnc:_Valid_Wusuloc,fld:"WUSULOC",gxvar:"A146WUsuLo",op:[],ip:[35],nacdep:[],v2v:function(Value){A146WUsuLo=Value},v2c:function(){GXsetControlValue("WUSULOC",A146WUsuLo,0)},c2v:function(){A146WUsuLo=GXgetControlValue("WUSULOC")}};
_GXValidFnc[38]={lvl:0,grid:0,fnc:_Valid_Wusudir,fld:"WUSUDIR",gxvar:"A145WUsuDi",op:[],ip:[38],nacdep:[],v2v:function(Value){A145WUsuDi=Value},v2c:function(){GXsetControlValue("WUSUDIR",A145WUsuDi,0)},c2v:function(){A145WUsuDi=GXgetControlValue("WUSUDIR")}};
_GXValidFnc[41]={lvl:0,grid:0,fnc:null,fld:"WUSUCP",gxvar:"A147WUsuCP",op:[],ip:[],nacdep:[],v2v:function(Value){A147WUsuCP=Value},v2c:function(){GXsetControlValue("WUSUCP",A147WUsuCP,0)},c2v:function(){A147WUsuCP=GXgetControlValue("WUSUCP")}};
_GXValidFnc[44]={lvl:0,grid:0,fnc:_Valid_Wusutellin,fld:"WUSUTELLIN",gxvar:"A149WUsuTe",op:[],ip:[44],nacdep:[],v2v:function(Value){A149WUsuTe=Value},v2c:function(){GXsetControlValue("WUSUTELLIN",A149WUsuTe,0)},c2v:function(){A149WUsuTe=GXgetControlValue("WUSUTELLIN")}};
_GXValidFnc[47]={lvl:0,grid:0,fnc:null,fld:"WUSUTELCEL",gxvar:"A150WUsuTe",op:[],ip:[],nacdep:[],v2v:function(Value){A150WUsuTe=Value},v2c:function(){GXsetControlValue("WUSUTELCEL",A150WUsuTe,0)},c2v:function(){A150WUsuTe=GXgetControlValue("WUSUTELCEL")}};
_GXValidFnc[49]={lvl:0,grid:0,fnc:null,fld:"WUSUOFER",gxvar:"A688WUsuOf",op:[],ip:[],nacdep:[],v2v:function(Value){A688WUsuOf=gxint(Value)},v2c:function(){GXsetComboBoxValue("WUSUOFER",A688WUsuOf)},c2v:function(){A688WUsuOf=GXgetIntegerValue("WUSUOFER")}};
_GXValidFnc[52]={lvl:0,grid:0,fnc:_Valid_Wusuname,fld:"WUSUNAME",gxvar:"A155WUsuNa",op:[52],ip:[52],nacdep:[],v2v:function(Value){A155WUsuNa=Value},v2c:function(){GXsetControlValue("WUSUNAME",A155WUsuNa,0)},c2v:function(){A155WUsuNa=GXgetControlValue("WUSUNAME")}};
_GXValidFnc[55]={lvl:0,grid:0,fnc:_Valid_Wusupass,fld:"WUSUPASS",gxvar:"A151WUsuPa",op:[],ip:[55],nacdep:[],v2v:function(Value){A151WUsuPa=Value},v2c:function(){GXsetControlValue("WUSUPASS",A151WUsuPa,0)},c2v:function(){A151WUsuPa=GXgetControlValue("WUSUPASS")}};
_GXValidFnc[58]={lvl:0,grid:0,fnc:_Validv_Wusupass,fld:"_WUSUPASS",gxvar:"AV8WUsuPas",op:[],ip:[58,55],nacdep:[],v2v:function(Value){AV8WUsuPas=Value},v2c:function(){GXsetControlValue("_WUSUPASS",AV8WUsuPas,0)},c2v:function(){AV8WUsuPas=GXgetControlValue("_WUSUPASS")}};
_GXValidFnc[62]={lvl:0,grid:0,fnc:null,fld:"_VALIDATIONRESULT",gxvar:"AV16Valida",op:[],ip:[],nacdep:[],v2v:function(Value){AV16Valida=gxint(Value)},v2c:function(){GXsetControlValue("_VALIDATIONRESULT",AV16Valida,0)},c2v:function(){AV16Valida=GXgetIntegerValue("_VALIDATIONRESULT")}};
_GXValidFnc[78]={lvl:0,grid:0,fnc:null,fld:"_VALIDO",gxvar:"AV11Valido",op:[],ip:[],nacdep:[],v2v:function(Value){AV11Valido=gxint(Value)},v2c:function(){GXsetControlValue("_VALIDO",AV11Valido,0)},c2v:function(){AV11Valido=GXgetIntegerValue("_VALIDO")}};
this.A137WUsuCo=0;
this.A984WUsuFe=0;
this.A140WUsuNo=0;
this.A141WUsuAp=0;
this.A154WUsuDn=0;
this.A142WUsuFc=0;
this.A143WUsuSe=0;
this.A144WUsuMa=0;
this.A148WUsuPa=0;
this.A515WUsuPr=0;
this.A146WUsuLo=0;
this.A145WUsuDi=0;
this.A147WUsuCP=0;
this.A149WUsuTe=0;
this.A150WUsuTe=0;
this.A688WUsuOf=0;
this.A155WUsuNa=0;
this.A151WUsuPa=0;
this.AV8WUsuPas=0;
this.AV16Valida=0;
this.AV11Valido=0;
_SetStandaloneVars( ) ;

