gx.evt.autoSkip=false;function timt017(){this.ServerClass="TImt017";this.PackageName="";this.setObjectType("trn");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.Gx_mode=gx.fn.getControlValue("vMODE")};this.Valid_Cgacod=function(){gx.ajax.validSrvEvt("dyncall","valid_Cgacod",["gx.O.A128CgaCod","gx.O.A129CgaDsc"],["A129CgaDsc","Gx_mode","Z128CgaCod","Z129CgaDsc","Grid1",["BUTTON5","Enabled"]]);return true};this.Valid_Cgadsc=function(){try{var a=gx.util.balloon.getNew("CGADSC");this.AnyError=0;
if((""==this.A129CgaDsc)){try{a.setError("Informe a descrição da categoria");this.AnyError=1}catch(b){}}}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Scacod=function(){try{if(gx.fn.currentGridRowImpl(34)===0){return true}var a=gx.util.balloon.getNew("SCACOD",gx.fn.currentGridRowImpl(34));this.AnyError=0;this.sMode108=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(108,34);this.standaloneModal3D108();this.standaloneNotModal3D108();if(gx.fn.gridDuplicateKey(36)){a.setError(gx.text.format(gx.getMessage("GXM_1004"),"Level1"));
this.AnyError=1}if((""==this.A760ScaCod)){try{a.setError("Informe o código da sub-categoria");this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode108;if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Scadsc=function(){try{if(gx.fn.currentGridRowImpl(34)===0){return true}var a=gx.util.balloon.getNew("SCADSC",gx.fn.currentGridRowImpl(34));this.AnyError=0;this.sMode108=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(108,34);if((""==this.A761ScaDsc)){try{a.setError("Informe a descrição da sub-categoria");
this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode108;if(a==null){return true}return a.show()}catch(b){}return true};this.standaloneModal3D108=function(){try{if(this.Gx_mode!="INS"){gx.fn.setCtrlProperty("SCACOD","Enabled",0)}else{gx.fn.setCtrlProperty("SCACOD","Enabled",1)}}catch(a){}return true};this.standaloneNotModal3D108=function(){try{gx.fn.setCtrlProperty("SCANROSEQU","Enabled",0)}catch(a){}return true};this.e123d2_client=function(){this.executeServerEvent("'VOLTAR'",false)};
this.e133d2_client=function(){this.executeServerEvent("'GET PENSA-B'",false)};this.e143d107_client=function(){this.executeServerEvent("ENTER",true)};this.e153d107_client=function(){this.executeServerEvent("CANCEL",true)};this.GXValidFnc=[];this.GXCtrlIds=[2,13,15,18,20,23,28,30,35,36,37,38];this.GXLastCtrlId=38;this.Grid1Container=new gx.grid.grid(this,108,"Level1",34,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"timt017",[760],false,1,false,true,5,false,false,false,"",0,"px","Novo registro",true,false,false,null,null,false,"");
this.Grid1Container.addSingleLineEdit("nRcdDeleted_108",35,"vNRCDDELETED_108","Apagar","","nRcdDeleted_108","int",46,"px",4,4,"right",null,[],"nRcdDeleted_108","nRcdDeleted_108",true,0,false,false);this.Grid1Container.addSingleLineEdit(760,36,"SCACOD","Sub-categoria","","ScaCod","char",89,"px",12,12,"left",null,[],760,"ScaCod",true,0,false,false);this.Grid1Container.addSingleLineEdit(761,37,"SCADSC","Descrição","","ScaDsc","char",0,"px",100,100,"left",null,[],761,"ScaDsc",true,0,false,false);this.Grid1Container.addSingleLineEdit(762,38,"SCANROSEQU","Sequência atual","","ScaNroSequ","int",104,"px",6,6,"right",null,[],762,"ScaNroSequ",true,0,false,false);
this.setGrid(this.Grid1Container);this.GXValidFnc[2]={fld:"TABLE1",grid:0};this.GXValidFnc[13]={fld:"TEXTBLOCK1",format:0,grid:0};this.GXValidFnc[15]={fld:"TABLE2",grid:0};this.GXValidFnc[18]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[20]={fld:"TABLE3",grid:0};this.GXValidFnc[23]={lvl:0,type:"char",len:12,dec:0,sign:false,ro:1,grid:0,gxgrid:null,fnc:this.Valid_Cgacod,isvalid:null,fld:"CGACOD",gxz:"Z128CgaCod",gxold:"O128CgaCod",gxvar:"A128CgaCod",ucs:[],op:[30],ip:[30,23],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A128CgaCod=a
},v2z:function(a){gx.O.Z128CgaCod=a},v2c:function(){gx.fn.setControlValue("CGACOD",gx.O.A128CgaCod,0)},c2v:function(){gx.O.A128CgaCod=this.val()},val:function(){return gx.fn.getControlValue("CGACOD")},nac:function(){return false}};this.GXValidFnc[28]={fld:"TEXTBLOCK7",format:0,grid:0};this.GXValidFnc[30]={lvl:0,type:"char",len:100,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:this.Valid_Cgadsc,isvalid:null,fld:"CGADSC",gxz:"Z129CgaDsc",gxold:"O129CgaDsc",gxvar:"A129CgaDsc",ucs:[],op:[30],ip:[30],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A129CgaDsc=a
},v2z:function(a){gx.O.Z129CgaDsc=a},v2c:function(){gx.fn.setControlValue("CGADSC",gx.O.A129CgaDsc,0)},c2v:function(){gx.O.A129CgaDsc=this.val()},val:function(){return gx.fn.getControlValue("CGADSC")},nac:function(){return false}};this.GXValidFnc[35]={lvl:108,type:"int",len:4,dec:0,sign:false,pic:"9999",ro:0,grid:34,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"vNRCDDELETED_108",gxz:"ZnRcdDeleted_108",gxold:"OnRcdDeleted_108",gxvar:"nRcdDeleted_108",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.nRcdDeleted_108=gx.num.intval(a)
},v2z:function(a){gx.O.ZnRcdDeleted_108=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("vNRCDDELETED_108",gx.fn.currentGridRowImpl(34),gx.O.nRcdDeleted_108,0)},c2v:function(){gx.O.nRcdDeleted_108=this.val()},val:function(){return gx.fn.getGridIntegerValue("vNRCDDELETED_108",gx.fn.currentGridRowImpl(34),".")},nac:function(){return false}};this.GXValidFnc[36]={lvl:108,type:"char",len:12,dec:0,sign:false,ro:0,grid:34,gxgrid:this.Grid1Container,fnc:this.Valid_Scacod,isvalid:null,fld:"SCACOD",gxz:"Z760ScaCod",gxold:"O760ScaCod",gxvar:"A760ScaCod",ucs:[],op:[36],ip:[36],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A760ScaCod=a
},v2z:function(a){gx.O.Z760ScaCod=a},v2c:function(){gx.fn.setGridControlValue("SCACOD",gx.fn.currentGridRowImpl(34),gx.O.A760ScaCod,0)},c2v:function(){gx.O.A760ScaCod=this.val()},val:function(){return gx.fn.getGridControlValue("SCACOD",gx.fn.currentGridRowImpl(34))},nac:function(){return false}};this.GXValidFnc[37]={lvl:108,type:"char",len:100,dec:0,sign:false,ro:0,grid:34,gxgrid:this.Grid1Container,fnc:this.Valid_Scadsc,isvalid:null,fld:"SCADSC",gxz:"Z761ScaDsc",gxold:"O761ScaDsc",gxvar:"A761ScaDsc",ucs:[],op:[37],ip:[37],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A761ScaDsc=a
},v2z:function(a){gx.O.Z761ScaDsc=a},v2c:function(){gx.fn.setGridControlValue("SCADSC",gx.fn.currentGridRowImpl(34),gx.O.A761ScaDsc,0)},c2v:function(){gx.O.A761ScaDsc=this.val()},val:function(){return gx.fn.getGridControlValue("SCADSC",gx.fn.currentGridRowImpl(34))},nac:function(){return false}};this.GXValidFnc[38]={lvl:108,type:"int",len:6,dec:0,sign:false,pic:"ZZZZZ9",ro:1,grid:34,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"SCANROSEQU",gxz:"Z762ScaNroSequ",gxold:"O762ScaNroSequ",gxvar:"A762ScaNroSequ",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A762ScaNroSequ=gx.num.intval(a)
},v2z:function(a){gx.O.Z762ScaNroSequ=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("SCANROSEQU",gx.fn.currentGridRowImpl(34),gx.O.A762ScaNroSequ,0)},c2v:function(){gx.O.A762ScaNroSequ=this.val()},val:function(){return gx.fn.getGridIntegerValue("SCANROSEQU",gx.fn.currentGridRowImpl(34),".")},nac:function(){return false}};this.A128CgaCod="";this.Z128CgaCod="";this.O128CgaCod="";this.A129CgaDsc="";this.Z129CgaDsc="";this.O129CgaDsc="";this.ZnRcdDeleted_108=0;this.OnRcdDeleted_108=0;this.Z760ScaCod="";
this.O760ScaCod="";this.Z761ScaDsc="";this.O761ScaDsc="";this.Z762ScaNroSequ=0;this.O762ScaNroSequ=0;this.A760ScaCod="";this.A761ScaDsc="";this.A762ScaNroSequ=0;this.AV7UsuCodCorr="";this.ServerEvents=["e123d2_client","e133d2_client","e143d107_client","e153d107_client"];this.EnterCtrl=["BUTTON5"];this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};this.SetStandaloneVars()}timt017.prototype=new gx.GxObject;gx.setParentObj(new timt017());