gx.evt.autoSkip=false;function tabt031(){this.ServerClass="Tabt031";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.Valid_Carnro=function(){gx.ajax.validSrvEvt("dyncall","valid_Carnro",["gx.O.A86CarNro","gx.O.A85CarNom","gx.O.A87CarUltSeq"],["A85CarNom","A87CarUltSeq","Gx_mode","Z86CarNro","Z85CarNom","Z87CarUltSeq","O87CarUltSeq","Grid1",["BTN_GET","Enabled"],["BTN_ENTER","Enabled"],["BTN_CHECK","Enabled"]]);
return true};this.Valid_Carnom=function(){try{var a=gx.util.balloon.getNew("CARNOM");this.AnyError=0;if((""==this.A85CarNom)){try{a.setError("Você deve informar o nome da carta");this.AnyError=1}catch(b){}}}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Carultseq=function(){try{var a=gx.util.balloon.getNew("CARULTSEQ");this.AnyError=0}catch(b){}try{if(a==null){return true}return a.show()}catch(b){}return true};this.Valid_Cadnroseq=function(){try{if(gx.fn.currentGridRowImpl(35)===0){return true
}var a=gx.util.balloon.getNew("CADNROSEQ",gx.fn.currentGridRowImpl(35));this.AnyError=0;this.sMode22=this.Gx_mode;this.Gx_mode=gx.fn.getGridRowMode(22,35);this.standaloneModal0T22();this.standaloneNotModal0T22();if(gx.fn.gridDuplicateKey(37)){a.setError(gx.text.format(gx.getMessage("GXM_1004"),"Level1"));this.AnyError=1}}catch(b){}try{this.Gx_mode=this.sMode22;if(a==null){return true}return a.show()}catch(b){}return true};this.standaloneModal0T22=function(){this.A87CarUltSeq=gx.fn.serialRule("A87CarUltSeq","A77CadNroSeq",35,1,this);
try{if(this.Gx_mode!="INS"){gx.fn.setCtrlProperty("CADNROSEQ","Enabled",0)}else{gx.fn.setCtrlProperty("CADNROSEQ","Enabled",1)}}catch(a){}return true};this.standaloneNotModal0T22=function(){try{gx.fn.setCtrlProperty("CARULTSEQ","Enabled",0)}catch(a){}try{gx.fn.setCtrlProperty("CARULTSEQ","Enabled",0)}catch(a){}return true};this.e120t21_client=function(){this.clearMessages();this.refreshOutputs([])};this.e130t21_client=function(){this.executeServerEvent("ENTER",true)};this.e140t21_client=function(){this.executeServerEvent("CANCEL",true)
};this.GXValidFnc=[];this.GXCtrlIds=[2,15,18,20,24,26,29,31,36,37,38];this.GXLastCtrlId=38;this.Grid1Container=new gx.grid.grid(this,22,"Level1",35,"Grid1","Grid1","Grid1Container",this.CmpContext,this.IsMasterPage,"tabt031",[77],false,1,false,true,5,false,false,false,"",0,"px","Novo registro",true,false,false,null,null,false,"");this.Grid1Container.addSingleLineEdit("nRcdDeleted_22",36,"vNRCDDELETED_22","","","nRcdDeleted_22","int",0,"px",4,4,"right",null,[],"nRcdDeleted_22","nRcdDeleted_22",true,0,false,false);
this.Grid1Container.addSingleLineEdit(77,37,"CADNROSEQ","Nro de sequencia","","CadNroSeq","int",0,"px",3,3,"right",null,[],77,"CadNroSeq",true,0,false,false);this.Grid1Container.addSingleLineEdit(76,38,"CADDESCRIC","Descrição da carta","","CadDescric","char",0,"px",80,80,"left",null,[],76,"CadDescric",true,0,false,false);this.setGrid(this.Grid1Container);this.GXValidFnc[2]={fld:"TABLE1",grid:0};this.GXValidFnc[15]={fld:"TABLE2",grid:0};this.GXValidFnc[18]={fld:"TEXTBLOCK1",format:0,grid:0};this.GXValidFnc[20]={lvl:0,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:0,grid:0,gxgrid:null,fnc:this.Valid_Carnro,isvalid:null,rgrid:[this.Grid1Container],fld:"CARNRO",gxz:"Z86CarNro",gxold:"O86CarNro",gxvar:"A86CarNro",ucs:[],op:[20,31,26],ip:[31,26,20],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A86CarNro=gx.num.intval(a)
},v2z:function(a){gx.O.Z86CarNro=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("CARNRO",gx.O.A86CarNro,0)},c2v:function(){gx.O.A86CarNro=this.val()},val:function(){return gx.fn.getIntegerValue("CARNRO",".")},nac:function(){return false}};this.GXValidFnc[24]={fld:"TEXTBLOCK2",format:0,grid:0};this.GXValidFnc[26]={lvl:0,type:"char",len:30,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:this.Valid_Carnom,isvalid:null,fld:"CARNOM",gxz:"Z85CarNom",gxold:"O85CarNom",gxvar:"A85CarNom",ucs:[],op:[26],ip:[26],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A85CarNom=a
},v2z:function(a){gx.O.Z85CarNom=a},v2c:function(){gx.fn.setControlValue("CARNOM",gx.O.A85CarNom,0)},c2v:function(){gx.O.A85CarNom=this.val()},val:function(){return gx.fn.getControlValue("CARNOM")},nac:function(){return false}};this.GXValidFnc[29]={fld:"TEXTBLOCK3",format:0,grid:0};this.GXValidFnc[31]={lvl:0,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:1,grid:0,gxgrid:null,fnc:this.Valid_Carultseq,isvalid:null,rgrid:[],fld:"CARULTSEQ",gxz:"Z87CarUltSeq",gxold:"O87CarUltSeq",gxvar:"A87CarUltSeq",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A87CarUltSeq=gx.num.intval(a)
},v2z:function(a){gx.O.Z87CarUltSeq=gx.num.intval(a)},v2c:function(){gx.fn.setControlValue("CARULTSEQ",gx.O.A87CarUltSeq,0)},c2v:function(){gx.O.A87CarUltSeq=this.val()},val:function(){return gx.fn.getIntegerValue("CARULTSEQ",".")},nac:function(){return false}};this.GXValidFnc[36]={lvl:22,type:"int",len:4,dec:0,sign:false,pic:"9999",ro:0,grid:35,gxgrid:this.Grid1Container,fnc:null,isvalid:null,rgrid:[],fld:"vNRCDDELETED_22",gxz:"ZnRcdDeleted_22",gxold:"OnRcdDeleted_22",gxvar:"nRcdDeleted_22",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.nRcdDeleted_22=gx.num.intval(a)
},v2z:function(a){gx.O.ZnRcdDeleted_22=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("vNRCDDELETED_22",gx.fn.currentGridRowImpl(35),gx.O.nRcdDeleted_22,0)},c2v:function(){gx.O.nRcdDeleted_22=this.val()},val:function(){return gx.fn.getGridIntegerValue("vNRCDDELETED_22",gx.fn.currentGridRowImpl(35),".")},nac:function(){return false}};this.GXValidFnc[37]={lvl:22,type:"int",len:3,dec:0,sign:false,pic:"ZZ9",ro:0,grid:35,gxgrid:this.Grid1Container,fnc:this.Valid_Cadnroseq,isvalid:null,rgrid:[],fld:"CADNROSEQ",gxz:"Z77CadNroSeq",gxold:"O77CadNroSeq",gxvar:"A77CadNroSeq",ucs:[],op:[37,31],ip:[37,31],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A77CadNroSeq=gx.num.intval(a)
},v2z:function(a){gx.O.Z77CadNroSeq=gx.num.intval(a)},v2c:function(){gx.fn.setGridControlValue("CADNROSEQ",gx.fn.currentGridRowImpl(35),gx.O.A77CadNroSeq,0)},c2v:function(){gx.O.A77CadNroSeq=this.val()},val:function(){return gx.fn.getGridIntegerValue("CADNROSEQ",gx.fn.currentGridRowImpl(35),".")},nac:function(){return false}};this.GXValidFnc[38]={lvl:22,type:"char",len:80,dec:0,sign:false,ro:0,grid:35,gxgrid:this.Grid1Container,fnc:null,isvalid:null,fld:"CADDESCRIC",gxz:"Z76CadDescric",gxold:"O76CadDescric",gxvar:"A76CadDescric",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",v2v:function(a){gx.O.A76CadDescric=a
},v2z:function(a){gx.O.Z76CadDescric=a},v2c:function(){gx.fn.setGridControlValue("CADDESCRIC",gx.fn.currentGridRowImpl(35),gx.O.A76CadDescric,0)},c2v:function(){gx.O.A76CadDescric=this.val()},val:function(){return gx.fn.getGridControlValue("CADDESCRIC",gx.fn.currentGridRowImpl(35))},nac:function(){return false}};this.A86CarNro=0;this.Z86CarNro=0;this.O86CarNro=0;this.A85CarNom="";this.Z85CarNom="";this.O85CarNom="";this.A87CarUltSeq=0;this.Z87CarUltSeq=0;this.O87CarUltSeq=0;this.ZnRcdDeleted_22=0;
this.OnRcdDeleted_22=0;this.Z77CadNroSeq=0;this.O77CadNroSeq=0;this.Z76CadDescric="";this.O76CadDescric="";this.A77CadNroSeq=0;this.A76CadDescric="";this.AV7UsuCodCorr="";this.AV9UsuCodUnidDepositaria=0;this.AV10UsuTipAcesso="";this.AV8IndLiber="";this.Gx_BScreen=0;this.ServerEvents=["e130t21_client","e140t21_client"];this.EnterCtrl=["BTN_ENTER"];this.CheckCtrl=["BTN_CHECK"];this.VarControlMap.Gx_BScreen={id:"vGXBSCREEN",grid:0,type:"int"};this.VarControlMap.Gx_mode={id:"vMODE",grid:0,type:"char"};
this.SetStandaloneVars();this.LvlOlds[21]=["O87CarUltSeq"]}tabt031.prototype=new gx.GxObject;gx.setParentObj(new tabt031());