gx.evt.autoSkip=false;function timt033(){this.ServerClass="TImt033";this.PackageName="";this.setObjectType("trn");this.hasEnterEvent=true;this.SetStandaloneVars=function(){this.Gx_BScreen=gx.fn.getIntegerValue("vGXBSCREEN",".");this.Gx_mode=gx.fn.getControlValue("vMODE");this.A901TreCampo1L=gx.fn.getControlValue("TRECAMPO1L")};this.Valid_Tiucod=function(){gx.ajax.validSrvEvt("dyncall","valid_Tiucod",["gx.O.A883TiuCod","gx.O.A884TiuDes","gx.O.A889TiuQtdMaxD"],["A884TiuDes","A889TiuQtdMaxD","Gx_mode","Z883TiuCod","Z884TiuDes","Z889TiuQtdMaxD","Grid1",["BUTTON5","Enabled"],["BUTTON1","Enabled"]]);
return true};this.Valid_Tiuqtdmaxd=function(){try{var a=gx.util.balloon.getNew("TIUQTDMAXD");this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Caecod=function(){this.sMode12=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(12,40);this.standaloneModal3W12();this.standaloneNotModal3W12();if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("CAECOD",gx.fn.currentGridRowImpl(40));if(gx.fn.gridDuplicateKey(42)){a.setError(gx.text.format(gx.getMessage("GXM_1004"),"Level1"));
this.AnyError=1;return a.show()}gx.ajax.validSrvEvt("dyncall","valid_Caecod",["gx.O.A79CaeCod","gx.O.A84CaeNom"],["A84CaeNom"]);this.Gx_mode=this.sMode12;return true};this.Valid_Treqtdtipd=function(){try{if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("TREQTDTIPD",gx.fn.currentGridRowImpl(40));this.AnyError=0;this.sMode12=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(12,40);if(this.A906TreQtdTipD>this.A889TiuQtdMaxD&&this.A889TiuQtdMaxD!=99){try{a.setError("Quantidade superior a quantidade máxima");
this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode12;if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Trehormaxi=function(){try{if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("TREHORMAXI",gx.fn.currentGridRowImpl(40));this.AnyError=0;this.sMode12=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(12,40);if(this.A902TreHorMaxi>23){try{a.setError("Hora máxima deve estar entre 0 e 23");this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode12;
if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Treminmaxi=function(){try{if(gx.fn.currentGridRowImpl(40)===0){return true}var a=gx.util.balloon.getNew("TREMINMAXI",gx.fn.currentGridRowImpl(40));this.AnyError=0;this.sMode12=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(12,40);if(this.A903TreMinMaxi>59){try{a.setError("Minuto máximo deve estar entre 0 e 59");this.AnyError=1}catch(b){}}}catch(b){}try{this.Gx_mode=this.sMode12;if(a==null){return true}return a.show()}catch(b){}return true
};this.standaloneModal3W12=function(){try{if((this.Gx_mode=="INS")&&(""==this.A907TreTipPraz)&&this.Gx_BScreen==0){this.A907TreTipPraz="D"}}catch(a){}try{if((this.Gx_mode=="INS")&&(0==this.A903TreMinMaxi)&&this.Gx_BScreen==0){this.A903TreMinMaxi=0}}catch(a){}try{if(this.Gx_mode!="INS"){gx.fn.setCtrlProperty("CAECOD","Enabled",0)}else{gx.fn.setCtrlProperty("CAECOD","Enabled",1)}}catch(a){}return true};this.standaloneNotModal3W12=function(){return true};this.e123w2_client=function(){this.executeServerEvent("'VOLTAR'",false)
};this.e133w11_client=function(){this.executeServerEvent("ENTER",true)};this.e143w11_client=function(){this.executeServerEvent("CANCEL",true)};this.GXValidFnc=[];this.GXCtrlIds=[3,22,24,27,29,31,34,36,41,42,43,44,45,46,47,48,49];this.GXLastCtrlId=49;this.Grid1Container=new gx.grid.grid(this,12,"Level1",40,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"timt033",[79],false,1,false,true,5,false,false,false,"",0,"px","Novo registro",true,false,false,null,null,false,"");this.Grid1Container.addSingleLineEdit("nRcdDeleted_12",41,"vNRCDDELETED_12","Apagar","","nRcdDeleted_12","int",0,"px",4,4,"right",null,[],"nRcdDeleted_12","nRcdDeleted_12",true,0,false,false);
this.Grid1Container.addSingleLineEdit(79,42,"CAECOD","Categoria","","CaeCod","int",0,"px",3,3,"right",null,[],79,"CaeCod",true,0,false,false);this.Grid1Container.addBitmap("prompt_79","PROMPT_79",50,0,"",0,"",null,"","");this.Grid1Container.addSingleLineEdit(84,43,"CAENOM","Descrição","","CaeNom","char",0,"px",30,30,"left",null,[],84,"CaeNom",true,0,false,false);this.Grid1Container.addSingleLineEdit(906,44,"TREQTDTIPD","Qtd. tombos","","TreQtdTipD","int",0,"px",5,5,"right",null,[],906,"TreQtdTipD",true,0,false,false);
this.Grid1Container.addSingleLineEdit(904,45,"TREQTDDIAS","Prazo p/ devolução","","TreQtdDias","int",0,"px",3,3,"right",null,[],904,"TreQtdDias",true,0,false,false);this.Grid1Container.addComboBox(907,46,"TRETIPPRAZ","Tipo prazo","TreTipPraz","char",null,0,true,false,0,"px");this.Grid1Container.addSingleLineEdit(902,47,"TREHORMAXI","Hora max.","","TreHorMaxi","int",0,"px",2,2,"right",null,[],902,"TreHorMaxi",true,0,false,false);this.Grid1Container.addSingleLineEdit(903,48,"TREMINMAXI","Min. max","","TreMinMaxi","int",0,"px",2,2,"right",null,[],903,"TreMinMaxi",true,0,false,false);
this.Grid1Container.addSingleLineEdit(905,49,"TREQTDSUSP","Dias suspensão","","TreQtdSusp","int",0,"px",4,4,"right",null,[],905,"TreQtdSusp",true,0,false,false);this.setGrid(this.Grid1Container);this.GXValidFnc[3]={fld:"TABLE1",grid:0};this.GXValidFnc[22]={fld:"TEXTBLOCK1",format:0,grid:0};this.GXValidFnc[24]={fld:"TABLE2",grid:0};this.GXValidFnc[27]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[29]={lvl:0,type:"char",len:3,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:this.Valid_Tiucod,isvalid:null,fld:"TIUCOD",gxz:"Z883TiuCod",gxold:"O883TiuCod",gxvar:"A883TiuCod",ucs:[],op:[29,36,31],ip:[36,31,29],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A883TiuCod=a
},v2z:function(a){gx.O.Z883TiuCod=a},v2c:function(){gx.fn.setControlValue("TIUCOD",gx.O.A883TiuCod,0)},c2v:function(){gx.O.A883TiuCod=this.val()},val:function(){return gx.fn.getControlValue("TIUCOD")},nac:function(){return false}};this.GXValidFnc[31]={lvl:0,type:"char",len:30,dec:0,sign:false,ro:1,grid:0,gxgrid:null,fnc:null,isvalid:null,fld:"TIUDES",gxz:"Z884TiuDes",gxold:"O884TiuDes",gxvar:"A884TiuDes",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A884TiuDes=a},v2z:function(a){gx.O.Z884TiuDes=a
},v2c:function(){gx.fn.setControlValue("TIUDES",gx.O.A884TiuDes,0)},c2v:function(){gx.O.A884TiuDes=this.val()},val:function(){return gx.fn.getControlValue("TIUDES")},nac:function(){return false}};this.GXValidFnc[34]={fld:"TEXTBLOCK3",format:0,grid:0};this.GXValidFnc[36]={lvl:0,type:"int",len:5,dec:0,sign:false,pic:"ZZZZ9",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Tiuqtdmaxd,isvalid:null,rgrid:[],fld:"TIUQTDMAXD",gxz:"Z889TiuQtdMaxD",gxold:"O889TiuQtdMaxD",gxvar:"A889TiuQtdMaxD",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A889TiuQtdMaxD=gx.num.intval(a)
},v2z:function(a){gx.O.Z889TiuQtdMaxD=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("TIUQTDMAXD",gx.O.A889TiuQtdMaxD,0)},c2v:function(){gx.O.A889TiuQtdMaxD=this.val()},val:function(){return gx.fn.getIntegerValue("TIUQTDMAXD",".")},nac:function(){return false}};this.GXValidFnc[41]={lvl:12,type:"int",len:4,dec:0,sign:false,pic:"9999",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"vNRCDDELETED_12",gxz:"ZnRcdDeleted_12",gxold:"OnRcdDeleted_12",gxvar:"nRcdDeleted_12",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.nRcdDeleted_12=gx.num.intval(a)
},v2z:function(a){gx.O.ZnRcdDeleted_12=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("vNRCDDELETED_12",gx.fn.currentGridRowImpl(40),gx.O.nRcdDeleted_12,0)},c2v:function(){gx.O.nRcdDeleted_12=this.val()},val:function(){return gx.fn.getGridIntegerValue("vNRCDDELETED_12",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[42]={lvl:12,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Caecod,isvalid:null,rgrid:[],fld:"CAECOD",gxz:"Z79CaeCod",gxold:"O79CaeCod",gxvar:"A79CaeCod",ucs:[],op:[48,46,43],ip:[48,46,43,42],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A79CaeCod=gx.num.intval(a)
},v2z:function(a){gx.O.Z79CaeCod=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("CAECOD",gx.fn.currentGridRowImpl(40),gx.O.A79CaeCod,0)},c2v:function(){gx.O.A79CaeCod=this.val()},val:function(){return gx.fn.getGridIntegerValue("CAECOD",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[43]={lvl:12,type:"char",len:30,dec:0,sign:false,ro:1,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"CAENOM",gxz:"Z84CaeNom",gxold:"O84CaeNom",gxvar:"A84CaeNom",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A84CaeNom=a
},v2z:function(a){gx.O.Z84CaeNom=a},v2c:function(){gx.fn.setGridControlValue("CAENOM",gx.fn.currentGridRowImpl(40),gx.O.A84CaeNom,0)},c2v:function(){gx.O.A84CaeNom=this.val()},val:function(){return gx.fn.getGridControlValue("CAENOM",gx.fn.currentGridRowImpl(40))},nac:function(){return false}};this.GXValidFnc[44]={lvl:12,type:"int",len:5,dec:0,sign:false,pic:"ZZZZ9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Treqtdtipd,isvalid:null,rgrid:[],fld:"TREQTDTIPD",gxz:"Z906TreQtdTipD",gxold:"O906TreQtdTipD",gxvar:"A906TreQtdTipD",ucs:[],op:[36,44],ip:[36,44],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A906TreQtdTipD=gx.num.intval(a)
},v2z:function(a){gx.O.Z906TreQtdTipD=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("TREQTDTIPD",gx.fn.currentGridRowImpl(40),gx.O.A906TreQtdTipD,0)},c2v:function(){gx.O.A906TreQtdTipD=this.val()},val:function(){return gx.fn.getGridIntegerValue("TREQTDTIPD",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[45]={lvl:12,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"TREQTDDIAS",gxz:"Z904TreQtdDias",gxold:"O904TreQtdDias",gxvar:"A904TreQtdDias",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A904TreQtdDias=gx.num.intval(a)
},v2z:function(a){gx.O.Z904TreQtdDias=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("TREQTDDIAS",gx.fn.currentGridRowImpl(40),gx.O.A904TreQtdDias,0)},c2v:function(){gx.O.A904TreQtdDias=this.val()},val:function(){return gx.fn.getGridIntegerValue("TREQTDDIAS",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[46]={lvl:12,type:"char",len:1,dec:0,sign:false,ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"TRETIPPRAZ",gxz:"Z907TreTipPraz",gxold:"O907TreTipPraz",gxvar:"A907TreTipPraz",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"combo",v2v:function(a){gx.O.A907TreTipPraz=a
},v2z:function(a){gx.O.Z907TreTipPraz=a},v2c:function(){gx.fn.setGridComboBoxValue("TRETIPPRAZ",gx.fn.currentGridRowImpl(40),gx.O.A907TreTipPraz)},c2v:function(){gx.O.A907TreTipPraz=this.val()},val:function(){return gx.fn.getGridControlValue("TRETIPPRAZ",gx.fn.currentGridRowImpl(40))},nac:function(){return false}};this.GXValidFnc[47]={lvl:12,type:"int",len:2,dec:0,sign:false,pic:"Z9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Trehormaxi,isvalid:null,rgrid:[],fld:"TREHORMAXI",gxz:"Z902TreHorMaxi",gxold:"O902TreHorMaxi",gxvar:"A902TreHorMaxi",ucs:[],op:[47],ip:[47],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A902TreHorMaxi=gx.num.intval(a)
},v2z:function(a){gx.O.Z902TreHorMaxi=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("TREHORMAXI",gx.fn.currentGridRowImpl(40),gx.O.A902TreHorMaxi,0)},c2v:function(){gx.O.A902TreHorMaxi=this.val()},val:function(){return gx.fn.getGridIntegerValue("TREHORMAXI",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[48]={lvl:12,type:"int",len:2,dec:0,sign:false,pic:"Z9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:this.Valid_Treminmaxi,isvalid:null,rgrid:[],fld:"TREMINMAXI",gxz:"Z903TreMinMaxi",gxold:"O903TreMinMaxi",gxvar:"A903TreMinMaxi",ucs:[],op:[48],ip:[48],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A903TreMinMaxi=gx.num.intval(a)
},v2z:function(a){gx.O.Z903TreMinMaxi=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("TREMINMAXI",gx.fn.currentGridRowImpl(40),gx.O.A903TreMinMaxi,0)},c2v:function(){gx.O.A903TreMinMaxi=this.val()},val:function(){return gx.fn.getGridIntegerValue("TREMINMAXI",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.GXValidFnc[49]={lvl:12,type:"int",len:4,dec:0,sign:false,pic:"ZZZ9",ro:0,grid:40,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"TREQTDSUSP",gxz:"Z905TreQtdSusp",gxold:"O905TreQtdSusp",gxvar:"A905TreQtdSusp",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A905TreQtdSusp=gx.num.intval(a)
},v2z:function(a){gx.O.Z905TreQtdSusp=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("TREQTDSUSP",gx.fn.currentGridRowImpl(40),gx.O.A905TreQtdSusp,0)},c2v:function(){gx.O.A905TreQtdSusp=this.val()},val:function(){return gx.fn.getGridIntegerValue("TREQTDSUSP",gx.fn.currentGridRowImpl(40),".")},nac:function(){return false}};this.A883TiuCod="";this.Z883TiuCod="";this.O883TiuCod="";this.A884TiuDes="";this.Z884TiuDes="";this.O884TiuDes="";this.A889TiuQtdMaxD=0;this.Z889TiuQtdMaxD=0;this.O889TiuQtdMaxD=0;
this.ZnRcdDeleted_12=0;this.OnRcdDeleted_12=0;this.Z79CaeCod=0;this.O79CaeCod=0;this.Z84CaeNom="";this.O84CaeNom="";this.Z906TreQtdTipD=0;this.O906TreQtdTipD=0;this.Z904TreQtdDias=0;this.O904TreQtdDias=0;this.Z907TreTipPraz="";this.O907TreTipPraz="";this.Z902TreHorMaxi=0;this.O902TreHorMaxi=0;this.Z903TreMinMaxi=0;this.O903TreMinMaxi=0;this.Z905TreQtdSusp=0;this.O905TreQtdSusp=0;this.A79CaeCod=0;this.A907TreTipPraz="";this.A903TreMinMaxi=0;this.A84CaeNom="";this.A904TreQtdDias=0;this.A906TreQtdTipD=0;
this.A901TreCampo1L="";this.A905TreQtdSusp=0;this.A902TreHorMaxi=0;this.AV8UsuCodCorr="";this.AV9IndLiber="";this.Gx_msg="";this.Gx_BScreen=0;this.ServerEvents=["e123w2_client","e133w11_client","e143w11_client"];this.setPrompt("PROMPT_79",[42]);this.EnterCtrl=["BUTTON1"];this.VarControlMap.Gx_BScreen={id:"vGXBSCREEN",grid:0,type:"int"};this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};this.VarControlMap.A901TreCampo1L={id:"TRECAMPO1L",grid:40,type:"char"};this.SetStandaloneVars()}timt033.prototype=new gx.GxObject;
gx.setParentObj(new timt033());