/*
               File: GAM_AppPermissionSelect
        Description: Select Application Permission
             Author: GeneXus .NET Framework Generator version 17_0_11-163677
       Generated on: 8/31/2022 2:1:59.5
       Program type: Callable routine
          Main DBMS: SQL Server
*/
gx.evt.autoSkip = false;
gx.define('gam_apppermissionselect', false, function () {
   this.ServerClass =  "gam_apppermissionselect" ;
   this.PackageName =  "GeneXus.Security.Backend" ;
   this.ServerFullClass =  "gam_apppermissionselect.aspx" ;
   this.setObjectType("web");
   this.setAjaxSecurity(false);
   this.setOnAjaxSessionTimeout("Warn");
   this.hasEnterEvent = false;
   this.skipOnEnter = false;
   this.autoRefresh = true;
   this.fullAjax = true;
   this.supportAjaxEvents =  true ;
   this.ajaxSecurityToken =  true ;
   this.SetStandaloneVars=function()
   {
      this.AV7ApplicationId=gx.fn.getIntegerValue("vAPPLICATIONID",gx.thousandSeparator) ;
      this.AV19PermissionId=gx.fn.getControlValue("vPERMISSIONID") ;
      this.AV17isOK=gx.fn.getControlValue("vISOK") ;
      this.AV7ApplicationId=gx.fn.getIntegerValue("vAPPLICATIONID",gx.thousandSeparator) ;
      this.AV19PermissionId=gx.fn.getControlValue("vPERMISSIONID") ;
   };
   this.e131f2_client=function()
   {
      /* Name_Click Routine */
      this.clearMessages();
      this.call("gam_apppermissionentry.aspx", ["DSP", this.AV7ApplicationId, this.AV16Id], null, ["Mode","ApplicationId","GUID"]);
      this.refreshOutputs([{av:'AV16Id',fld:'vID',pic:''},{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'}]);
      this.OnClientEventEnd();
      return gx.$.Deferred().resolve();
   };
   this.e141f2_client=function()
   {
      /* Btnchildren_Click Routine */
      this.clearMessages();
      this.call("gam_apppermissionchildren.aspx", [this.AV7ApplicationId, this.AV16Id], null, ["ApplicationId","PermissionId"]);
      this.refreshOutputs([{av:'AV16Id',fld:'vID',pic:''},{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'}]);
      this.OnClientEventEnd();
      return gx.$.Deferred().resolve();
   };
   this.e111f2_client=function()
   {
      /* 'AddSelected' Routine */
      return this.executeServerEvent("'ADDSELECTED'", false, null, false, false);
   };
   this.e151f2_client=function()
   {
      /* Enter Routine */
      return this.executeServerEvent("ENTER", true, arguments[0], false, false);
   };
   this.e161f1_client=function()
   {
      /* Cancel Routine */
      return this.executeServerEvent("CANCEL", true, null, false, false);
   };
   this.GXValidFnc = [];
   var GXValidFnc = this.GXValidFnc ;
   this.GXCtrlIds=[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,36,37,38,39,40,41];
   this.GXLastCtrlId =41;
   this.GridwwContainer = new gx.grid.grid(this, 2,"WbpLvl2",35,"Gridww","Gridww","GridwwContainer",this.CmpContext,this.IsMasterPage,"gam_apppermissionselect",[],false,1,false,true,0,false,false,false,"",0,"px",0,"px",gx.getMessage( "GXM_newrow"),false,false,true,null,null,false,"",false,[1,1,1,1],false,0,true,false);
   var GridwwContainer = this.GridwwContainer;
   GridwwContainer.addCheckBox("Select",36,"vSELECT",gx.getMessage( "Select"),"","Select","boolean","true","false",null,true,false,0,"px","WWActionColumn");
   GridwwContainer.addSingleLineEdit("Name",37,"vNAME",gx.getMessage( "Permission name"),"","Name","char",0,"px",254,80,"left","e131f2_client",[],"Name","Name",true,0,false,false,"Attribute",1,"WWColumn");
   GridwwContainer.addSingleLineEdit("Dsc",38,"vDSC",gx.getMessage( "Description"),"","Dsc","char",0,"px",254,80,"left",null,[],"Dsc","Dsc",true,0,false,false,"Attribute",1,"WWColumn WWSecondaryColumn");
   GridwwContainer.addSingleLineEdit("Btnchildren",39,"vBTNCHILDREN","","","BtnChildren","char",0,"px",20,20,"left","e141f2_client",[],"Btnchildren","BtnChildren",true,0,false,false,"TextActionAttribute TextLikeLink",1,"WWTextActionColumn");
   GridwwContainer.addSingleLineEdit("Id",40,"vID",gx.getMessage( "GUID"),"","Id","char",0,"px",40,40,"left",null,[],"Id","Id",false,0,false,false,"Attribute",1,"");
   GridwwContainer.addSingleLineEdit("Appid",41,"vAPPID",gx.getMessage( "Key Numeric Long"),"","AppId","int",0,"px",12,12,"right",null,[],"Appid","AppId",false,0,false,false,"Attribute",1,"");
   this.GridwwContainer.emptyText = gx.getMessage( "");
   this.setGrid(GridwwContainer);
   GXValidFnc[2]={ id: 2, fld:"",grid:0};
   GXValidFnc[3]={ id: 3, fld:"MAINTABLE",grid:0};
   GXValidFnc[4]={ id: 4, fld:"",grid:0};
   GXValidFnc[5]={ id: 5, fld:"",grid:0};
   GXValidFnc[6]={ id: 6, fld:"TABLE2",grid:0};
   GXValidFnc[7]={ id: 7, fld:"",grid:0};
   GXValidFnc[8]={ id: 8, fld:"",grid:0};
   GXValidFnc[9]={ id: 9, fld:"",grid:0};
   GXValidFnc[10]={ id:10 ,lvl:0,type:"char",len:254,dec:0,sign:false,ro:0,grid:0,gxgrid:null,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vFILNAME",fmt:0,gxz:"ZV14FilName",gxold:"OV14FilName",gxvar:"AV14FilName",ucs:[],op:[],ip:[],

						nacdep:[],ctrltype:"edit",v2v:function(Value){if(Value!==undefined)gx.O.AV14FilName=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV14FilName=Value},v2c:function(){gx.fn.setControlValue("vFILNAME",gx.O.AV14FilName,0);if (typeof(this.dom_hdl) == 'function') this.dom_hdl.call(gx.O);},c2v:function(){if(this.val()!==undefined)gx.O.AV14FilName=this.val()},val:function(){return gx.fn.getControlValue("vFILNAME")},nac:gx.falseFn};
   this.declareDomainHdlr( 10 , function() {
   });
   GXValidFnc[11]={ id: 11, fld:"",grid:0};
   GXValidFnc[12]={ id: 12, fld:"TABLE3",grid:0};
   GXValidFnc[13]={ id: 13, fld:"",grid:0};
   GXValidFnc[14]={ id: 14, fld:"",grid:0};
   GXValidFnc[15]={ id: 15, fld:"CANCEL1",grid:0,evt:"e161f1_client"};
   GXValidFnc[16]={ id: 16, fld:"",grid:0};
   GXValidFnc[17]={ id: 17, fld:"ADDNEW1",grid:0,evt:"e111f2_client"};
   GXValidFnc[18]={ id: 18, fld:"",grid:0};
   GXValidFnc[19]={ id: 19, fld:"",grid:0};
   GXValidFnc[20]={ id: 20, fld:"TABLE1",grid:0};
   GXValidFnc[21]={ id: 21, fld:"",grid:0};
   GXValidFnc[22]={ id: 22, fld:"",grid:0};
   GXValidFnc[23]={ id: 23, fld:"",grid:0};
   GXValidFnc[24]={ id: 24, fld:"",grid:0};
   GXValidFnc[25]={ id:25 ,lvl:0,type:"char",len:254,dec:0,sign:false,ro:0,multiline:true,grid:0,gxgrid:null,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"CTLNAME111122",fmt:0,gxz:"ZV23GXV1",gxold:"OV23GXV1",gxvar:"GXV1",ucs:[],op:[],ip:[],

						nacdep:[],ctrltype:"edit",v2v:function(Value){if(Value!==undefined)gx.O.GXV1=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV23GXV1=Value},v2c:function(){gx.fn.setControlValue("CTLNAME111122",gx.O.GXV1,0)},c2v:function(){if(this.val()!==undefined)gx.O.GXV1=this.val()},val:function(){return gx.fn.getControlValue("CTLNAME111122")},nac:gx.falseFn};
   GXValidFnc[26]={ id: 26, fld:"",grid:0};
   GXValidFnc[27]={ id: 27, fld:"",grid:0};
   GXValidFnc[28]={ id: 28, fld:"",grid:0};
   GXValidFnc[29]={ id:29 ,lvl:0,type:"char",len:254,dec:0,sign:false,ro:0,multiline:true,grid:0,gxgrid:null,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"CTLNAME1111",fmt:0,gxz:"ZV24GXV2",gxold:"OV24GXV2",gxvar:"GXV2",ucs:[],op:[],ip:[],

						nacdep:[],ctrltype:"edit",v2v:function(Value){if(Value!==undefined)gx.O.GXV2=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV24GXV2=Value},v2c:function(){gx.fn.setControlValue("CTLNAME1111",gx.O.GXV2,0)},c2v:function(){if(this.val()!==undefined)gx.O.GXV2=this.val()},val:function(){return gx.fn.getControlValue("CTLNAME1111")},nac:gx.falseFn};
   GXValidFnc[30]={ id: 30, fld:"",grid:0};
   GXValidFnc[31]={ id: 31, fld:"",grid:0};
   GXValidFnc[33]={ id: 33, fld:"",grid:0};
   GXValidFnc[34]={ id: 34, fld:"",grid:0};
   GXValidFnc[36]={ id:36 ,lvl:2,type:"boolean",len:4,dec:0,sign:false,ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vSELECT",fmt:0,gxz:"ZV20Select",gxold:"OV20Select",gxvar:"AV20Select",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"checkbox",inputType:'text',v2v:function(Value){if(Value!==undefined)gx.O.AV20Select=gx.lang.booleanValue(Value)},v2z:function(Value){if(Value!==undefined)gx.O.ZV20Select=gx.lang.booleanValue(Value)},v2c:function(row){gx.fn.setGridCheckBoxValue("vSELECT",row || gx.fn.currentGridRowImpl(35),gx.O.AV20Select,true)},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV20Select=gx.lang.booleanValue(this.val(row))},val:function(row){return gx.fn.getGridControlValue("vSELECT",row || gx.fn.currentGridRowImpl(35))},nac:gx.falseFn,values:['true','false']};
   GXValidFnc[37]={ id:37 ,lvl:2,type:"char",len:254,dec:0,sign:false,ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vNAME",fmt:0,gxz:"ZV18Name",gxold:"OV18Name",gxvar:"AV18Name",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:'text',autoCorrect:"1",v2v:function(Value){if(Value!==undefined)gx.O.AV18Name=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV18Name=Value},v2c:function(row){gx.fn.setGridControlValue("vNAME",row || gx.fn.currentGridRowImpl(35),gx.O.AV18Name,0);if (typeof(this.dom_hdl) == 'function') this.dom_hdl.call(gx.O);},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV18Name=this.val(row)},val:function(row){return gx.fn.getGridControlValue("vNAME",row || gx.fn.currentGridRowImpl(35))},nac:gx.falseFn,evt:"e131f2_client"};
   GXValidFnc[38]={ id:38 ,lvl:2,type:"char",len:254,dec:0,sign:false,ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vDSC",fmt:0,gxz:"ZV11Dsc",gxold:"OV11Dsc",gxvar:"AV11Dsc",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:'text',autoCorrect:"1",v2v:function(Value){if(Value!==undefined)gx.O.AV11Dsc=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV11Dsc=Value},v2c:function(row){gx.fn.setGridControlValue("vDSC",row || gx.fn.currentGridRowImpl(35),gx.O.AV11Dsc,0);if (typeof(this.dom_hdl) == 'function') this.dom_hdl.call(gx.O);},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV11Dsc=this.val(row)},val:function(row){return gx.fn.getGridControlValue("vDSC",row || gx.fn.currentGridRowImpl(35))},nac:gx.falseFn};
   GXValidFnc[39]={ id:39 ,lvl:2,type:"char",len:20,dec:0,sign:false,ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vBTNCHILDREN",fmt:0,gxz:"ZV10BtnChildren",gxold:"OV10BtnChildren",gxvar:"AV10BtnChildren",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:'text',autoCorrect:"1",v2v:function(Value){if(Value!==undefined)gx.O.AV10BtnChildren=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV10BtnChildren=Value},v2c:function(row){gx.fn.setGridControlValue("vBTNCHILDREN",row || gx.fn.currentGridRowImpl(35),gx.O.AV10BtnChildren,0)},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV10BtnChildren=this.val(row)},val:function(row){return gx.fn.getGridControlValue("vBTNCHILDREN",row || gx.fn.currentGridRowImpl(35))},nac:gx.falseFn,evt:"e141f2_client"};
   GXValidFnc[40]={ id:40 ,lvl:2,type:"char",len:40,dec:0,sign:false,ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vID",fmt:0,gxz:"ZV16Id",gxold:"OV16Id",gxvar:"AV16Id",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:'text',v2v:function(Value){if(Value!==undefined)gx.O.AV16Id=Value},v2z:function(Value){if(Value!==undefined)gx.O.ZV16Id=Value},v2c:function(row){gx.fn.setGridControlValue("vID",row || gx.fn.currentGridRowImpl(35),gx.O.AV16Id,0);if (typeof(this.dom_hdl) == 'function') this.dom_hdl.call(gx.O);},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV16Id=this.val(row)},val:function(row){return gx.fn.getGridControlValue("vID",row || gx.fn.currentGridRowImpl(35))},nac:gx.falseFn};
   GXValidFnc[41]={ id:41 ,lvl:2,type:"int",len:12,dec:0,sign:false,pic:"ZZZZZZZZZZZ9",ro:0,isacc:0,grid:35,gxgrid:this.GridwwContainer,fnc:null,isvalid:null,evt_cvc:null,evt_cvcing:null,rgrid:[],fld:"vAPPID",fmt:0,gxz:"ZV6AppId",gxold:"OV6AppId",gxvar:"AV6AppId",ucs:[],op:[],ip:[],nacdep:[],ctrltype:"edit",inputType:'text',v2v:function(Value){if(Value!==undefined)gx.O.AV6AppId=gx.num.intval(Value)},v2z:function(Value){if(Value!==undefined)gx.O.ZV6AppId=gx.num.intval(Value)},v2c:function(row){gx.fn.setGridControlValue("vAPPID",row || gx.fn.currentGridRowImpl(35),gx.O.AV6AppId,0);if (typeof(this.dom_hdl) == 'function') this.dom_hdl.call(gx.O);},c2v:function(row){if(this.val(row)!==undefined)gx.O.AV6AppId=gx.num.intval(this.val(row))},val:function(row){return gx.fn.getGridIntegerValue("vAPPID",row || gx.fn.currentGridRowImpl(35),gx.thousandSeparator)},nac:gx.falseFn};
   this.AV14FilName = "" ;
   this.ZV14FilName = "" ;
   this.OV14FilName = "" ;
   this.GXV1 = "" ;
   this.ZV23GXV1 = "" ;
   this.OV23GXV1 = "" ;
   this.GXV2 = "" ;
   this.ZV24GXV2 = "" ;
   this.OV24GXV2 = "" ;
   this.ZV20Select = false ;
   this.OV20Select = false ;
   this.ZV18Name = "" ;
   this.OV18Name = "" ;
   this.ZV11Dsc = "" ;
   this.OV11Dsc = "" ;
   this.ZV10BtnChildren = "" ;
   this.OV10BtnChildren = "" ;
   this.ZV16Id = "" ;
   this.OV16Id = "" ;
   this.ZV6AppId = 0 ;
   this.OV6AppId = 0 ;
   this.AV14FilName = "" ;
   this.GXV1 = "" ;
   this.GXV2 = "" ;
   this.AV7ApplicationId = 0 ;
   this.AV19PermissionId = "" ;
   this.AV20Select = false ;
   this.AV18Name = "" ;
   this.AV11Dsc = "" ;
   this.AV10BtnChildren = "" ;
   this.AV16Id = "" ;
   this.AV6AppId = 0 ;
   this.AV17isOK = false ;
   this.AV5GAMApplication = {} ;
   this.AV9AppPermissionParent = {} ;
   this.Events = {"e111f2_client": ["'ADDSELECTED'", true] ,"e151f2_client": ["ENTER", true] ,"e161f1_client": ["CANCEL", true] ,"e131f2_client": ["VNAME.CLICK", false] ,"e141f2_client": ["VBTNCHILDREN.CLICK", false]};
   this.EvtParms["REFRESH"] = [[{av:'GRIDWW_nFirstRecordOnPage'},{av:'GRIDWW_nEOF'},{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'},{av:'AV14FilName',fld:'vFILNAME',pic:''},{av:'AV19PermissionId',fld:'vPERMISSIONID',pic:'',hsh:true}],[]];
   this.EvtParms["GRIDWW.LOAD"] = [[{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'},{av:'AV19PermissionId',fld:'vPERMISSIONID',pic:'',hsh:true},{av:'AV14FilName',fld:'vFILNAME',pic:''}],[{av:'AV6AppId',fld:'vAPPID',pic:'ZZZZZZZZZZZ9'},{av:'AV10BtnChildren',fld:'vBTNCHILDREN',pic:''},{av:'AV16Id',fld:'vID',pic:''},{av:'AV18Name',fld:'vNAME',pic:''},{av:'AV11Dsc',fld:'vDSC',pic:''}]];
   this.EvtParms["'ADDSELECTED'"] = [[{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'},{av:'AV20Select',fld:'vSELECT',grid:35,pic:''},{av:'GRIDWW_nFirstRecordOnPage'},{av:'nRC_GXsfl_35',ctrl:'GRIDWW',grid:35,prop:'GridRC',grid:35},{av:'AV19PermissionId',fld:'vPERMISSIONID',pic:'',hsh:true},{av:'AV16Id',fld:'vID',grid:35,pic:''},{av:'AV17isOK',fld:'vISOK',pic:''}],[{av:'AV17isOK',fld:'vISOK',pic:''}]];
   this.EvtParms["VNAME.CLICK"] = [[{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'},{av:'AV16Id',fld:'vID',pic:''}],[{av:'AV16Id',fld:'vID',pic:''},{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'}]];
   this.EvtParms["VBTNCHILDREN.CLICK"] = [[{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'},{av:'AV16Id',fld:'vID',pic:''}],[{av:'AV16Id',fld:'vID',pic:''},{av:'AV7ApplicationId',fld:'vAPPLICATIONID',pic:'ZZZZZZZZZZZ9'}]];
   this.EvtParms["ENTER"] = [[],[]];
   this.setVCMap("AV7ApplicationId", "vAPPLICATIONID", 0, "int", 12, 0);
   this.setVCMap("AV19PermissionId", "vPERMISSIONID", 0, "char", 40, 0);
   this.setVCMap("AV17isOK", "vISOK", 0, "boolean", 4, 0);
   this.setVCMap("AV7ApplicationId", "vAPPLICATIONID", 0, "int", 12, 0);
   this.setVCMap("AV19PermissionId", "vPERMISSIONID", 0, "char", 40, 0);
   this.setVCMap("AV7ApplicationId", "vAPPLICATIONID", 0, "int", 12, 0);
   this.setVCMap("AV19PermissionId", "vPERMISSIONID", 0, "char", 40, 0);
   GridwwContainer.addRefreshingVar({rfrVar:"AV7ApplicationId"});
   GridwwContainer.addRefreshingVar({rfrVar:"AV19PermissionId"});
   GridwwContainer.addRefreshingVar(this.GXValidFnc[10]);
   GridwwContainer.addRefreshingParm({rfrVar:"AV7ApplicationId"});
   GridwwContainer.addRefreshingParm({rfrVar:"AV19PermissionId"});
   GridwwContainer.addRefreshingParm(this.GXValidFnc[10]);
   this.addBCProperty("Gamapplication", ["Name"], this.GXValidFnc[25], "AV5GAMApplication");
   this.addBCProperty("Apppermissionparent", ["Name"], this.GXValidFnc[29], "AV9AppPermissionParent");
   this.Initialize( );
});
gx.wi( function() { gx.createParentObj(this.gam_apppermissionselect);});
