/*
               File: gol023
        Description: Consulta de Produtos
             Author: GeneXus C# Generator version 9_0_5-864
       Generated on: 9/20/2008 22:49:24.7
       Program type: Callable routine
          Main DBMS: sqlserver
*/
{gxsetDateFormat( "DMY" );
gxsetTimeFormat( 24 );
gxsetFirstYearCentury( 40 );
this.gxDecPoint =  "." ;
this.gxThSep =  "," ;}
 bGXAutoskip = false;
this.hgol023SetStandaloneVars=function()
{
   A6895procl = GXgetIntegerValue("PROCLINFI")
   A6894progr = GXgetControlValue("PROGRUNFI")
   A6522procn = GXgetIntegerValue("PROCNPDEF")
   A6885cnpes = GXgetIntegerValue("CNPESTNFI")
   A5374cnpco = GXgetIntegerValue("CNPCOD")
   A6888procn = GXgetIntegerValue("PROCNPESTNFI")
   A638prmest = GXgetControlValue("PRMEST")
   A641prmcod = GXgetIntegerValue("PRMCODEST")
   A549fmlcod = GXgetIntegerValue("FMLCOD")
   A520proseq = GXgetIntegerValue("PROSEQ")
   A6244profm = GXgetIntegerValue("PROFMLSEQEST")
}
this.hgol023StandaloneModal=function()
{
   try {
      A6895procl = gxInvalidFunc("[udp(]"+"[ t(6895,3),t(0,3),t('0',3),t(',',7),t('0',3),t(',',7),t('''''',3),t(')',4) ]") ;
   }
   catch(e){}
   try {
      A6894progr = gxInvalidFunc("[udp(]"+"[ t(6894,3),t(0,3),t('''''',3),t(',',7),t('0',3),t(',',7),t('''''',3),t(')',4) ]") ;
   }
   catch(e){}
   try {
      A6522procn = gxInvalidFunc("[udp(]"+"[ t(6522,3),t(0,3),t('0',3),t(',',7),t('0',3),t(')',4) ]") ;
   }
   catch(e){}
   if ( AnyError == 0 && ( A390toucod != gxOldKey("A390toucodA429toudes") ) )
   {
      gxajaxloadCrl('gxLoad_9',new Array("A390toucod"),new Array("A429toudes"));
      if ( GXLastAjaxSt == 101 )
      {
         gxballoon.setError(gxFormat("Não existe %1", "Teor de Ouro"));
         AnyError = 1 ;
         gxUnsetSetKey("A390toucodA429toudes");
      }
      else
      {
         gxSetKey("A390toucodA429toudes","A390toucod");
      }
   }
   if ( AnyError == 0 && ( A413prmcod != gxOldKey("A413prmcodA5717prmen") ) )
   {
      gxajaxloadCrl('gxLoad_10',new Array("A413prmcod"),new Array("A5717prmen","A540prmend","A641prmcod","A638prmest"));
      if ( GXLastAjaxSt == 101 )
      {
         gxballoon.setError(gxFormat("Não existe %1", "Parametros do Sistema"));
         AnyError = 1 ;
         gxUnsetSetKey("A413prmcodA5717prmen");
      }
      else
      {
         gxSetKey("A413prmcodA5717prmen","A413prmcod");
      }
   }
   if ( AnyError == 0 && ( A5374cnpco != gxOldKey("A5374cnpcoA6885cnpes") ) )
   {
      gxajaxloadCrl('gxLoad_12',new Array("A5374cnpco"),new Array("A6885cnpes"));
      if ( GXLastAjaxSt == 101 )
      {
         gxballoon.setError(gxFormat("Não existe %1", "Configuração do Pagamento do Produto"));
         AnyError = 1 ;
         gxUnsetSetKey("A5374cnpcoA6885cnpes");
      }
      else
      {
         gxSetKey("A5374cnpcoA6885cnpes","A5374cnpco");
      }
   }
   try {
      if ( ! (0==A5374cnpco) )
      {
         A6888procn = A6885cnpes ;
      }
      else
      {
         A6888procn = gxAggSelInteger("PROCNPESTNFI","6",["A6885cnpes","A5374cnpco","A6522procn"]) ;
      }
   }
   catch(e){}
   if ( AnyError == 0 && ( A549fmlcod != gxOldKey("A549fmlcodA550fmldes") ) )
   {
      gxajaxloadCrl('gxLoad_11',new Array("A549fmlcod"),new Array("A550fmldes"));
      if ( GXLastAjaxSt == 101 )
      {
         gxballoon.setError(gxFormat("Não existe %1", "Família de Produto"));
         AnyError = 1 ;
         gxUnsetSetKey("A549fmlcodA550fmldes");
      }
      else
      {
         gxSetKey("A549fmlcodA550fmldes","A549fmlcod");
      }
   }
   try {
      if ( A6888procn == 0 )
      {
         A6244profm = gxInvalidFunc("[call(]"+"[ t(6244,3),t(0,3),t(638,2),t(',',7),t(641,2),t(',',7),t(549,2),t(',',7),t(520,2),t(',',7),t('\"\"',3),t(',',7),t('0',3),t(')',4) ]") ;
      }
      else
      {
         if ( A6888procn == 1 )
         {
            A6244profm = gxInvalidFunc("[call(]"+"[ t(6244,3),t(1,3),t(6894,2),t(',',7),t(6895,2),t(',',7),t(549,2),t(',',7),t(520,2),t(',',7),t('\"\"',3),t(',',7),t('0',3),t(')',4) ]") ;
         }
      }
   }
   catch(e){}
}
this.hgol023gol023=function()
{
}
this.hgol023init=function()
{
}
hgol023GXValidFnc = new Array();
this.hgol023GXLastCtrlId =40;
hgol023GXValidFnc [ 10 ]={lvl: 2 ,grid: 12 ,pgrid: 0 ,fnc: null ,fld: "_ENDFOT3" ,gxvar: "AV27endfot" ,op:[  ],ip:[  ]  ,v2v:function(Value){ AV27endfot=Value },v2c:function(){ GXsetGridControlValue("_ENDFOT3",GXCurrentRow[12],AV27endfot,0) }, c2v:function(){ AV27endfot=GXgetGridControlValue("_ENDFOT3",GXCurrentRow[12]) }, nac:function(){return  null }};
hgol023GXValidFnc [ 11 ]={lvl: 2 ,grid: 12 ,pgrid: 0 ,fnc: null ,fld: "_PROCOD" ,gxvar: "AV11procod" ,op:[  ],ip:[  ]  ,v2v:function(Value){ AV11procod=Value },v2c:function(){ GXsetGridControlValue("_PROCOD",GXCurrentRow[12],AV11procod,0) }, c2v:function(){ AV11procod=GXgetGridControlValue("_PROCOD",GXCurrentRow[12]) }, nac:function(){return  null }};
hgol023GXValidFnc [ 23 ]={lvl: 2 ,grid: 12 ,pgrid: 0 ,fnc: null ,fld: "_DESPRO" ,gxvar: "AV15Despro" ,op:[  ],ip:[  ]  ,v2v:function(Value){ AV15Despro=Value },v2c:function(){ GXsetGridControlValue("_DESPRO",GXCurrentRow[12],AV15Despro,0) }, c2v:function(){ AV15Despro=GXgetGridControlValue("_DESPRO",GXCurrentRow[12]) }, nac:function(){return  null }};
hgol023GXValidFnc [ 24 ]={lvl: 2 ,grid: 12 ,pgrid: 0 ,fnc: null ,fld: "_PROCODREF" ,gxvar: "AV22procod" ,op:[  ],ip:[  ]  ,v2v:function(Value){ AV22procod=Value },v2c:function(){ GXsetGridControlValue("_PROCODREF",GXCurrentRow[12],AV22procod,0) }, c2v:function(){ AV22procod=GXgetGridControlValue("_PROCODREF",GXCurrentRow[12]) }, nac:function(){return  null }};
hgol023GXValidFnc[33]={lvl:0,grid:0,fnc:null,fld:"_CLPSECCOD02",gxvar:"AV20clpsec",op:[],ip:[],nacdep:[],v2v:function(Value){AV20clpsec=gxint(Value)},v2c:function(){GXsetControlValue("_CLPSECCOD02",AV20clpsec,0)},c2v:function(){AV20clpsec=GXgetIntegerValue("_CLPSECCOD02")}};
hgol023GXValidFnc[34]={lvl:0,grid:0,fnc:null,fld:"_CLPCOD02",gxvar:"AV19clpcod",op:[],ip:[],nacdep:[],v2v:function(Value){AV19clpcod=gxint(Value)},v2c:function(){GXsetControlValue("_CLPCOD02",AV19clpcod,0)},c2v:function(){AV19clpcod=GXgetIntegerValue("_CLPCOD02")}};
hgol023GXValidFnc[35]={lvl:0,grid:0,fnc:null,fld:"_CLPCATCOD02",gxvar:"AV21clpcat",op:[],ip:[],nacdep:[],v2v:function(Value){AV21clpcat=gxint(Value)},v2c:function(){GXsetControlValue("_CLPCATCOD02",AV21clpcat,0)},c2v:function(){AV21clpcat=GXgetIntegerValue("_CLPCATCOD02")}};
hgol023GXValidFnc[38]={lvl:0,grid:0,fnc:null,fld:"_PAGECOUNT",gxvar:"AV23PageCo",op:[],ip:[],nacdep:[],v2v:function(Value){AV23PageCo=gxint(Value)},v2c:function(){GXsetControlValue("_PAGECOUNT",AV23PageCo,0)},c2v:function(){AV23PageCo=GXgetIntegerValue("_PAGECOUNT")}};
hgol023GXValidFnc[40]={lvl:0,grid:0,fnc:null,fld:"_PAGECOUNTII",gxvar:"AV24PageCo",op:[],ip:[],nacdep:[],v2v:function(Value){AV24PageCo=gxint(Value)},v2c:function(){GXsetControlValue("_PAGECOUNTII",AV24PageCo,0)},c2v:function(){AV24PageCo=GXgetIntegerValue("_PAGECOUNTII")}};
this.AV20clpsec=0;
this.AV19clpcod=0;
this.AV21clpcat=0;
this.AV23PageCo=0;
this.AV24PageCo=0;
hgol023SetStandaloneVars( ) ;

