package gunav2.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class b4xmainpage extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new BA(_ba, this, htSubs, "gunav2.keymon.com.mx.b4xmainpage");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.keymon.com.mx.b4xmainpage.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public gunav2.keymon.com.mx.b4xmainpage _login = null;
public gunav2.keymon.com.mx.c_principal _principal = null;
public gunav2.keymon.com.mx.c_clientes _clientes = null;
public gunav2.keymon.com.mx.c_cliente _cliente = null;
public gunav2.keymon.com.mx.c_productos _productos = null;
public gunav2.keymon.com.mx.c_updateavailable _updateavailable = null;
public gunav2.keymon.com.mx.c_mapas _mapas = null;
public gunav2.keymon.com.mx.c_nuevocliente _nuevocliente = null;
public gunav2.keymon.com.mx.c_ticketsdia _ticketsdia = null;
public gunav2.keymon.com.mx.c_noventa _noventa = null;
public gunav2.keymon.com.mx.c_nota _nota = null;
public gunav2.keymon.com.mx.c_pedidos _pedidos = null;
public gunav2.keymon.com.mx.c_promos _promos = null;
public gunav2.keymon.com.mx.c_historico _historico = null;
public gunav2.keymon.com.mx.c_clientescompletos _clientes_completos = null;
public gunav2.keymon.com.mx.v_tclientes _tclientes = null;
public gunav2.keymon.com.mx.c_historicobat _historicobat = null;
public gunav2.keymon.com.mx.c_historicobatyodos _historicobattodos = null;
public gunav2.keymon.com.mx.dbrequestmanager _reqmanager = null;
public String _v = "";
public String _ruta = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public String _lat_gps = "";
public String _lon_gps = "";
public String _usuario = "";
public int _batt = 0;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public String _montoactual = "";
public String _clientestotal = "";
public String _clientesventa = "";
public String _clientesvisitados = "";
public String _almacen = "";
public String _rutapreventa = "";
public String _server = "";
public String _fecharuta = "";
public boolean _logger = false;
public String _mac_impresora = "";
public anywheresoftware.b4a.phone.Phone.PhoneId _phn = null;
public anywheresoftware.b4a.objects.EditTextWrapper _user = null;
public anywheresoftware.b4a.objects.EditTextWrapper _pass = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _existe = "";
public String _paso1 = "";
public anywheresoftware.b4a.objects.LabelWrapper _imen = null;
public String _imei = "";
public String _alterno = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_menu = null;
public com.rootsoft.rspopupmenu.RSPopupMenu _popupmenu = null;
public gunav2.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.ButtonWrapper _pdf = null;
public batteryprogressviewwrapper.batteryprogressviewWrapper _bpv1 = null;
public int[] _batterystatus = null;
public gunav2.keymon.com.mx.batteryutilities _bu = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_apk = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _i_engrane = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_main = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_appupdate = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regesar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_version = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _entrar = null;
public String _tipo_venta = "";
public boolean _bterminarclicked = false;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_server = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_server = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_enviobd = null;
public gunav2.keymon.com.mx.fileprovider _provider = null;
public String _rutabdbackup = "";
public gunav2.keymon.com.mx.b4xswitch _b4xswitch1 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_validacion = null;
public gunav2.keymon.com.mx.b4xswitch _b4xswitch2 = null;
public int _x = 0;
public anywheresoftware.b4a.objects.EditTextWrapper _et_codigo = null;
public boolean _buscandoactualizacion = false;
public boolean _actualizacionrevisada = false;
public anywheresoftware.b4a.objects.ButtonWrapper _b_actualizacion = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_server = null;
public boolean _intentusado = false;
public anywheresoftware.b4a.objects.PanelWrapper _p_importarbdwa = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper _cb_importarbdwa = null;
public anywheresoftware.b4a.phone.PackageManagerWrapper _pkg = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _b_aceptar_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
String _rutades = "";
String _almacendes = "";
 //BA.debugLineNum = 1013;BA.debugLine="Private Sub b_aceptar_Click";
 //BA.debugLineNum = 1014;BA.debugLine="If et_codigo.Text <> \"\" Then";
if ((_et_codigo.getText()).equals("") == false) { 
 //BA.debugLineNum = 1015;BA.debugLine="Private c2 As Cursor = skmt.ExecQuery(\"select di";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select distinct CAT_CL_RUTA from kmt_info3 where CAT_CL_RUTA not in (select * from ruta_suplencia)")));
 //BA.debugLineNum = 1016;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 1017;BA.debugLine="Private rutades As String = c2.GetString(\"CAT_CL";
_rutades = _c2.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 1018;BA.debugLine="c2.Close";
_c2.Close();
 //BA.debugLineNum = 1019;BA.debugLine="Private c2 As Cursor = skmt.ExecQuery(\"SELECT ID";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 1020;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 1021;BA.debugLine="Private almacendes As String = c2.GetString(\"ID_";
_almacendes = _c2.GetString("ID_ALMACEN");
 //BA.debugLineNum = 1022;BA.debugLine="c2.Close";
_c2.Close();
 //BA.debugLineNum = 1023;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 1024;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1025;BA.debugLine="cmd.Name = \"select_geoPass_GUNA\"";
_cmd.Name /*String*/  = "select_geoPass_GUNA";
 //BA.debugLineNum = 1026;BA.debugLine="cmd.Parameters = Array As Object(et_codigo.Text,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_et_codigo.getText()),(Object)(_almacendes),(Object)(_rutades)};
 //BA.debugLineNum = 1027;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"geopass\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("geopass"));
 }else if((_et_codigo.getText()).equals("")) { 
 //BA.debugLineNum = 1029;BA.debugLine="MsgboxAsync(\"Ingresa un codigo\",\"Atención\")";
__c.MsgboxAsync(BA.ObjectToCharSequence("Ingresa un codigo"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 1030;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 1031;BA.debugLine="B4XSwitch2.Value = False";
_b4xswitch2._setvalue /*boolean*/ (__c.False);
 //BA.debugLineNum = 1032;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE GPS SET HABILITADO =";
_skmt.ExecNonQuery2("UPDATE GPS SET HABILITADO = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 //BA.debugLineNum = 1033;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 };
 //BA.debugLineNum = 1061;BA.debugLine="End Sub";
return "";
}
public String  _b_actualizacion_click() throws Exception{
 //BA.debugLineNum = 1146;BA.debugLine="Private Sub b_actualizacion_Click";
 //BA.debugLineNum = 1147;BA.debugLine="CallSubDelayed(appUpdater, \"download_newApk\")";
__c.CallSubDelayed(ba,(Object)(_appupdater.getObject()),"download_newApk");
 //BA.debugLineNum = 1148;BA.debugLine="End Sub";
return "";
}
public String  _b_apk_click() throws Exception{
 //BA.debugLineNum = 889;BA.debugLine="Sub b_apk_Click";
 //BA.debugLineNum = 890;BA.debugLine="StartService(appUpdater)";
__c.StartService(ba,(Object)(_appupdater.getObject()));
 //BA.debugLineNum = 891;BA.debugLine="End Sub";
return "";
}
public String  _b_cancelarcodigo_click() throws Exception{
 //BA.debugLineNum = 1007;BA.debugLine="Private Sub b_cancelarcodigo_Click";
 //BA.debugLineNum = 1008;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 1009;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 1010;BA.debugLine="B4XSwitch2.Value = False";
_b4xswitch2._setvalue /*boolean*/ (__c.False);
 //BA.debugLineNum = 1011;BA.debugLine="End Sub";
return "";
}
public void  _b_enviobd_click() throws Exception{
ResumableSub_b_envioBD_Click rsub = new ResumableSub_b_envioBD_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_b_envioBD_Click extends BA.ResumableSub {
public ResumableSub_b_envioBD_Click(gunav2.keymon.com.mx.b4xmainpage parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.b4xmainpage parent;
String _filename = "";
anywheresoftware.b4a.phone.Phone.Email _email = null;
anywheresoftware.b4a.objects.IntentWrapper _in = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = -1;
 //BA.debugLineNum = 955;BA.debugLine="Dim FileName As String = \"kmt.db\"";
_filename = "kmt.db";
 //BA.debugLineNum = 957;BA.debugLine="Log(\"xxxxxx:\"&Provider.SharedFolder)";
parent.__c.LogImpl("42818053","xxxxxx:"+parent._provider._sharedfolder /*String*/ ,0);
 //BA.debugLineNum = 958;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,this,(int) (1000));
this.state = 1;
return;
case 1:
//C
this.state = -1;
;
 //BA.debugLineNum = 959;BA.debugLine="File.Copy(File.DirInternal, FileName, Provider.Sh";
parent.__c.File.Copy(parent.__c.File.getDirInternal(),_filename,parent._provider._sharedfolder /*String*/ ,_filename);
 //BA.debugLineNum = 960;BA.debugLine="Dim email As Email";
_email = new anywheresoftware.b4a.phone.Phone.Email();
 //BA.debugLineNum = 961;BA.debugLine="email.To.Add(\"cheveguerra@gmail.com\")";
_email.To.Add((Object)("cheveguerra@gmail.com"));
 //BA.debugLineNum = 962;BA.debugLine="email.Subject = \"subject\"";
_email.Subject = "subject";
 //BA.debugLineNum = 963;BA.debugLine="email.Attachments.Add(Provider.GetFileUri(FileNam";
_email.Attachments.Add(parent._provider._getfileuri /*Object*/ (_filename));
 //BA.debugLineNum = 965;BA.debugLine="Dim in As Intent = email.GetIntent";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
_in = (anywheresoftware.b4a.objects.IntentWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.IntentWrapper(), (android.content.Intent)(_email.GetIntent()));
 //BA.debugLineNum = 966;BA.debugLine="in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION";
_in.setFlags((int) (1));
 //BA.debugLineNum = 967;BA.debugLine="StartActivity(in)";
parent.__c.StartActivity(ba,(Object)(_in.getObject()));
 //BA.debugLineNum = 968;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_menu_click() throws Exception{
 //BA.debugLineNum = 826;BA.debugLine="Sub b_menu_Click";
 //BA.debugLineNum = 827;BA.debugLine="PopupMenu.Show";
_popupmenu.Show();
 //BA.debugLineNum = 828;BA.debugLine="End Sub";
return "";
}
public String  _b_regesar_click() throws Exception{
 //BA.debugLineNum = 928;BA.debugLine="Sub b_regesar_Click";
 //BA.debugLineNum = 930;BA.debugLine="p_appUpdate.Visible = False";
_p_appupdate.setVisible(__c.False);
 //BA.debugLineNum = 931;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("DBReqServer")}));
 //BA.debugLineNum = 932;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("DBReqServer"),(Object)(_et_server.getText())}));
 //BA.debugLineNum = 933;BA.debugLine="Starter.server =  et_server.Text";
_starter._server /*String*/  = _et_server.getText();
 //BA.debugLineNum = 934;BA.debugLine="Starter.reqManager.Initialize(Me, et_server.Text)";
_starter._reqmanager /*gunav2.keymon.com.mx.dbrequestmanager*/ ._initialize /*String*/ (ba,this,_et_server.getText());
 //BA.debugLineNum = 935;BA.debugLine="End Sub";
return "";
}
public void  _b4xpage_appear() throws Exception{
ResumableSub_B4XPage_Appear rsub = new ResumableSub_B4XPage_Appear(this);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XPage_Appear extends BA.ResumableSub {
public ResumableSub_B4XPage_Appear(gunav2.keymon.com.mx.b4xmainpage parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.b4xmainpage parent;
anywheresoftware.b4a.phone.Phone _ph = null;
String _deviceid = "";
String _permission = "";
boolean _result = false;
String _sdate = "";
String _stime = "";

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 352;BA.debugLine="cb_importarBDWA.Checked = Subs.traeUsarIntentBDWA";
parent._cb_importarbdwa.setChecked(parent._subs._traeusarintentbdwa /*boolean*/ (ba));
 //BA.debugLineNum = 353;BA.debugLine="If user.Text.Trim = \"KMTS1\" Then";
if (true) break;

case 1:
//if
this.state = 6;
if ((parent._user.getText().trim()).equals("KMTS1")) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 6;
 //BA.debugLineNum = 354;BA.debugLine="p_importarBDWA.Visible = True";
parent._p_importarbdwa.setVisible(parent.__c.True);
 if (true) break;

case 5:
//C
this.state = 6;
 //BA.debugLineNum = 356;BA.debugLine="p_importarBDWA.Visible = False";
parent._p_importarbdwa.setVisible(parent.__c.False);
 if (true) break;

case 6:
//C
this.state = 7;
;
 //BA.debugLineNum = 358;BA.debugLine="reqManager.Initialize(Me, Starter.server)";
parent._reqmanager._initialize /*String*/ (ba,parent,parent._starter._server /*String*/ );
 //BA.debugLineNum = 359;BA.debugLine="If Starter.muestraProgreso = 1 Then";
if (true) break;

case 7:
//if
this.state = 10;
if ((parent._starter._muestraprogreso /*String*/ ).equals(BA.NumberToString(1))) { 
this.state = 9;
}if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 360;BA.debugLine="muestraProgreso(\"Descargando nueva versión, un m";
parent._muestraprogreso("Descargando nueva versión, un momento por favor.");
 //BA.debugLineNum = 361;BA.debugLine="Starter.muestraProgreso = 0";
parent._starter._muestraprogreso /*String*/  = BA.NumberToString(0);
 if (true) break;

case 10:
//C
this.state = 11;
;
 //BA.debugLineNum = 363;BA.debugLine="Dim ph As Phone 'Get Id Device";
_ph = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 364;BA.debugLine="Dim DeviceID As String = ph.GetSettings(\"android_";
_deviceid = _ph.GetSettings("android_id").toUpperCase();
 //BA.debugLineNum = 366;BA.debugLine="LogColor(\"Revisa permisos Phone_State\", Colors.Gr";
parent.__c.LogImpl("41572887","Revisa permisos Phone_State",parent.__c.Colors.Green);
 //BA.debugLineNum = 367;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_READ_PHONE_STATE);
 //BA.debugLineNum = 368;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 63;
return;
case 63:
//C
this.state = 11;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 369;BA.debugLine="If Result Then";
if (true) break;

case 11:
//if
this.state = 14;
if (_result) { 
this.state = 13;
}if (true) break;

case 13:
//C
this.state = 14;
 //BA.debugLineNum = 370;BA.debugLine="IMEN.Text =\"\"";
parent._imen.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 371;BA.debugLine="IMEI = \"\"";
parent._imei = "";
 //BA.debugLineNum = 373;BA.debugLine="IMEI=\"\"  'Pruebas";
parent._imei = "";
 if (true) break;

case 14:
//C
this.state = 15;
;
 //BA.debugLineNum = 375;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_ACCESS_FINE_LOCATION);
 //BA.debugLineNum = 376;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 64;
return;
case 64:
//C
this.state = 15;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 377;BA.debugLine="If Result Then";
if (true) break;

case 15:
//if
this.state = 20;
if (_result) { 
this.state = 17;
}else {
this.state = 19;
}if (true) break;

case 17:
//C
this.state = 20;
 //BA.debugLineNum = 378;BA.debugLine="StartService(Tracker)";
parent.__c.StartService(ba,(Object)(parent._tracker.getObject()));
 //BA.debugLineNum = 379;BA.debugLine="Log(\"Start Tracker\")";
parent.__c.LogImpl("41572900","Start Tracker",0);
 if (true) break;

case 19:
//C
this.state = 20;
 //BA.debugLineNum = 381;BA.debugLine="ToastMessageShow(\"Sin permisos de ubicacion\", Tr";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Sin permisos de ubicacion"),parent.__c.True);
 if (true) break;

case 20:
//C
this.state = 21;
;
 //BA.debugLineNum = 383;BA.debugLine="server = Starter.server";
parent._server = parent._starter._server /*String*/ ;
 //BA.debugLineNum = 384;BA.debugLine="tgl.Initialize()";
parent._tgl.Initialize(ba);
 //BA.debugLineNum = 385;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (true) break;

case 21:
//if
this.state = 24;
if (parent.__c.Not(parent._starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
this.state = 23;
}if (true) break;

case 23:
//C
this.state = 24;
 //BA.debugLineNum = 386;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),parent.__c.True);
 //BA.debugLineNum = 387;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,this,(int) (500));
this.state = 65;
return;
case 65:
//C
this.state = 24;
;
 //BA.debugLineNum = 388;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
parent.__c.StartActivity(ba,(Object)(parent._starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 if (true) break;

case 24:
//C
this.state = 25;
;
 //BA.debugLineNum = 390;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as CUANTOS fro";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._skmt.ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"FECHA"})));
 //BA.debugLineNum = 391;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 392;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
if (true) break;

case 25:
//if
this.state = 34;
if ((parent._c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
this.state = 27;
}else {
this.state = 29;
}if (true) break;

case 27:
//C
this.state = 34;
 //BA.debugLineNum = 393;BA.debugLine="LogColor($\"No hay fecha: ${c.GetString(\"CUANTOS\"";
parent.__c.LogImpl("41572914",("No hay fecha: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("CUANTOS")))+""),parent.__c.Colors.Red);
 //BA.debugLineNum = 394;BA.debugLine="cmd.Initialize";
parent._cmd.Initialize();
 //BA.debugLineNum = 395;BA.debugLine="cmd.Name = \"select_fecha\"";
parent._cmd.Name /*String*/  = "select_fecha";
 //BA.debugLineNum = 396;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fecha\")";
parent._reqmanager._executequery /*String*/ (parent._cmd,(int) (0),(Object)("fecha"));
 //BA.debugLineNum = 397;BA.debugLine="Msgbox(\"AJUSTAR FECHA\",\"AVISO\") 'Ignore";
parent.__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR FECHA"),BA.ObjectToCharSequence("AVISO"),ba);
 //BA.debugLineNum = 398;BA.debugLine="B4XPage_Appear";
parent._b4xpage_appear();
 if (true) break;

case 29:
//C
this.state = 30;
 //BA.debugLineNum = 400;BA.debugLine="LogColor($\"Si hay fecha: ${c.GetString(\"CUANTOS\"";
parent.__c.LogImpl("41572921",("Si hay fecha: "+parent.__c.SmartStringFormatter("",(Object)(parent._c.GetString("CUANTOS")))+""),parent.__c.Colors.Green);
 //BA.debugLineNum = 401;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_VA_VALOR from CAT_";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"FECHA"})));
 //BA.debugLineNum = 402;BA.debugLine="c.Position =0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 403;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 404;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
parent.__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 405;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
 //BA.debugLineNum = 410;BA.debugLine="If c.GetString(\"CAT_VA_VALOR\") > sDate Then";
if (true) break;

case 30:
//if
this.state = 33;
if ((double)(Double.parseDouble(parent._c.GetString("CAT_VA_VALOR")))>(double)(Double.parseDouble(_sdate))) { 
this.state = 32;
}if (true) break;

case 32:
//C
this.state = 33;
 //BA.debugLineNum = 411;BA.debugLine="Msgbox(\"AJUSTAR LA FECHA YA QUE ES MENOR AL SIS";
parent.__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA"),BA.ObjectToCharSequence("AVISO"),ba);
 //BA.debugLineNum = 412;BA.debugLine="B4XPage_Appear";
parent._b4xpage_appear();
 if (true) break;

case 33:
//C
this.state = 34;
;
 if (true) break;

case 34:
//C
this.state = 35;
;
 //BA.debugLineNum = 415;BA.debugLine="bu.Initialize";
parent._bu._initialize /*String*/ (ba);
 //BA.debugLineNum = 416;BA.debugLine="batterystatus = bu.BatteryInformation";
parent._batterystatus = parent._bu._getbatteryinformation /*int[]*/ ();
 //BA.debugLineNum = 418;BA.debugLine="CallSubDelayed(FirebaseMessaging, \"SubscribeToTop";
parent.__c.CallSubDelayed(ba,(Object)(parent._firebasemessaging.getObject()),"SubscribeToTopics");
 //BA.debugLineNum = 419;BA.debugLine="dameUsuario";
parent._dameusuario();
 //BA.debugLineNum = 420;BA.debugLine="c = skmt.ExecQuery(\"SELECT HABILITADA FROM IMPRES";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._skmt.ExecQuery("SELECT HABILITADA FROM IMPRESORA")));
 //BA.debugLineNum = 421;BA.debugLine="If c.RowCount >  0 Then";
if (true) break;

case 35:
//if
this.state = 46;
if (parent._c.getRowCount()>0) { 
this.state = 37;
}else {
this.state = 45;
}if (true) break;

case 37:
//C
this.state = 38;
 //BA.debugLineNum = 422;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 423;BA.debugLine="If c.GetString(\"HABILITADA\") = 1 Then";
if (true) break;

case 38:
//if
this.state = 43;
if ((parent._c.GetString("HABILITADA")).equals(BA.NumberToString(1))) { 
this.state = 40;
}else if((parent._c.GetString("HABILITADA")).equals(BA.NumberToString(0))) { 
this.state = 42;
}if (true) break;

case 40:
//C
this.state = 43;
 //BA.debugLineNum = 424;BA.debugLine="B4XSwitch1.Value = True";
parent._b4xswitch1._setvalue /*boolean*/ (parent.__c.True);
 if (true) break;

case 42:
//C
this.state = 43;
 //BA.debugLineNum = 426;BA.debugLine="B4XSwitch1.Value = False";
parent._b4xswitch1._setvalue /*boolean*/ (parent.__c.False);
 if (true) break;

case 43:
//C
this.state = 46;
;
 if (true) break;

case 45:
//C
this.state = 46;
 //BA.debugLineNum = 429;BA.debugLine="B4XSwitch1.Value = False";
parent._b4xswitch1._setvalue /*boolean*/ (parent.__c.False);
 if (true) break;

case 46:
//C
this.state = 47;
;
 //BA.debugLineNum = 431;BA.debugLine="c = skmt.ExecQuery(\"SELECT HABILITADO FROM GPS\")";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._skmt.ExecQuery("SELECT HABILITADO FROM GPS")));
 //BA.debugLineNum = 432;BA.debugLine="If c.RowCount = 0 Then";
if (true) break;

case 47:
//if
this.state = 50;
if (parent._c.getRowCount()==0) { 
this.state = 49;
}if (true) break;

case 49:
//C
this.state = 50;
 //BA.debugLineNum = 433;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO GPS VALUES (?)\",";
parent._skmt.ExecNonQuery2("INSERT INTO GPS VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 if (true) break;

case 50:
//C
this.state = 51;
;
 //BA.debugLineNum = 435;BA.debugLine="c = skmt.ExecQuery(\"SELECT HABILITADO FROM GPS\")";
parent._c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._skmt.ExecQuery("SELECT HABILITADO FROM GPS")));
 //BA.debugLineNum = 436;BA.debugLine="If c.RowCount >  0 Then";
if (true) break;

case 51:
//if
this.state = 62;
if (parent._c.getRowCount()>0) { 
this.state = 53;
}else {
this.state = 61;
}if (true) break;

case 53:
//C
this.state = 54;
 //BA.debugLineNum = 437;BA.debugLine="c.Position = 0";
parent._c.setPosition((int) (0));
 //BA.debugLineNum = 438;BA.debugLine="If c.GetString(\"HABILITADO\") = 1 Then";
if (true) break;

case 54:
//if
this.state = 59;
if ((parent._c.GetString("HABILITADO")).equals(BA.NumberToString(1))) { 
this.state = 56;
}else if((parent._c.GetString("HABILITADO")).equals(BA.NumberToString(0))) { 
this.state = 58;
}if (true) break;

case 56:
//C
this.state = 59;
 //BA.debugLineNum = 439;BA.debugLine="B4XSwitch2.Value = True";
parent._b4xswitch2._setvalue /*boolean*/ (parent.__c.True);
 if (true) break;

case 58:
//C
this.state = 59;
 //BA.debugLineNum = 441;BA.debugLine="B4XSwitch2.Value = False";
parent._b4xswitch2._setvalue /*boolean*/ (parent.__c.False);
 if (true) break;

case 59:
//C
this.state = 62;
;
 if (true) break;

case 61:
//C
this.state = 62;
 //BA.debugLineNum = 444;BA.debugLine="B4XSwitch2.Value = False";
parent._b4xswitch2._setvalue /*boolean*/ (parent.__c.False);
 if (true) break;

case 62:
//C
this.state = -1;
;
 //BA.debugLineNum = 446;BA.debugLine="Subs.guardaAppInfo";
parent._subs._guardaappinfo /*String*/ (ba);
 //BA.debugLineNum = 455;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _b4xpage_permissionresult(String _permission,boolean _result) throws Exception{
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(gunav2.keymon.com.mx.b4xmainpage parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.b4xmainpage parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
 //BA.debugLineNum = 797;BA.debugLine="Log(\"closreq\")";
parent.__c.LogImpl("41900545","closreq",0);
 //BA.debugLineNum = 798;BA.debugLine="Sleep(0)";
parent.__c.Sleep(ba,this,(int) (0));
this.state = 8;
return;
case 8:
//C
this.state = 1;
;
 //BA.debugLineNum = 799;BA.debugLine="If p_appUpdate.IsInitialized And p_appUpdate.Visi";
if (true) break;

case 1:
//if
this.state = 4;
if (parent._p_appupdate.IsInitialized() && parent._p_appupdate.getVisible()) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 800;BA.debugLine="p_appUpdate.Visible = False";
parent._p_appupdate.setVisible(parent.__c.False);
 //BA.debugLineNum = 801;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;
;
 //BA.debugLineNum = 803;BA.debugLine="If Not(p_appUpdate.Visible) Then";

case 4:
//if
this.state = 7;
if (parent.__c.Not(parent._p_appupdate.getVisible())) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
 //BA.debugLineNum = 804;BA.debugLine="Log(\"ExitApplication\")";
parent.__c.LogImpl("41900552","ExitApplication",0);
 //BA.debugLineNum = 805;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
 if (true) break;

case 7:
//C
this.state = -1;
;
 //BA.debugLineNum = 807;BA.debugLine="Return True";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.True));return;};
 //BA.debugLineNum = 808;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 108;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 109;BA.debugLine="Log(\"#####   CREAMOS MAINPAGE LOGIN\")";
__c.LogImpl("41507329","#####   CREAMOS MAINPAGE LOGIN",0);
 //BA.debugLineNum = 110;BA.debugLine="B4XPages.GetManager.LogEvents = True";
_b4xpages._getmanager /*gunav2.keymon.com.mx.b4xpagesmanager*/ (ba)._logevents /*boolean*/  = __c.True;
 //BA.debugLineNum = 111;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 112;BA.debugLine="Root.LoadLayout(\"login\")";
_root.LoadLayout("login",ba);
 //BA.debugLineNum = 116;BA.debugLine="login.Initialize";
_login._initialize /*String*/ (ba);
 //BA.debugLineNum = 117;BA.debugLine="B4XPages.AddPage(\"Login\", login)";
_b4xpages._addpage /*String*/ (ba,"Login",(Object)(_login));
 //BA.debugLineNum = 118;BA.debugLine="principal.Initialize";
_principal._initialize /*Object*/ (ba);
 //BA.debugLineNum = 119;BA.debugLine="B4XPages.AddPage(\"Principal\", principal)";
_b4xpages._addpage /*String*/ (ba,"Principal",(Object)(_principal));
 //BA.debugLineNum = 120;BA.debugLine="clientes.Initialize";
_clientes._initialize /*Object*/ (ba);
 //BA.debugLineNum = 121;BA.debugLine="B4XPages.AddPage(\"Clientes\", clientes)";
_b4xpages._addpage /*String*/ (ba,"Clientes",(Object)(_clientes));
 //BA.debugLineNum = 122;BA.debugLine="cliente.Initialize";
_cliente._initialize /*Object*/ (ba);
 //BA.debugLineNum = 123;BA.debugLine="B4XPages.AddPage(\"Cliente\", cliente)";
_b4xpages._addpage /*String*/ (ba,"Cliente",(Object)(_cliente));
 //BA.debugLineNum = 124;BA.debugLine="productos.Initialize";
_productos._initialize /*Object*/ (ba);
 //BA.debugLineNum = 125;BA.debugLine="B4XPages.AddPage(\"Productos\", productos)";
_b4xpages._addpage /*String*/ (ba,"Productos",(Object)(_productos));
 //BA.debugLineNum = 126;BA.debugLine="updateAvailable.Initialize";
_updateavailable._initialize /*Object*/ (ba);
 //BA.debugLineNum = 127;BA.debugLine="B4XPages.AddPage(\"updateAvailable\", updateAvailab";
_b4xpages._addpage /*String*/ (ba,"updateAvailable",(Object)(_updateavailable));
 //BA.debugLineNum = 128;BA.debugLine="mapas.Initialize";
_mapas._initialize /*Object*/ (ba);
 //BA.debugLineNum = 129;BA.debugLine="B4XPages.AddPage(\"Mapas\", mapas)";
_b4xpages._addpage /*String*/ (ba,"Mapas",(Object)(_mapas));
 //BA.debugLineNum = 130;BA.debugLine="nuevoCliente.Initialize";
_nuevocliente._initialize /*Object*/ (ba);
 //BA.debugLineNum = 131;BA.debugLine="B4XPages.AddPage(\"NuevoCliente\", nuevoCliente)";
_b4xpages._addpage /*String*/ (ba,"NuevoCliente",(Object)(_nuevocliente));
 //BA.debugLineNum = 132;BA.debugLine="ticketsDia.Initialize";
_ticketsdia._initialize /*Object*/ (ba);
 //BA.debugLineNum = 133;BA.debugLine="B4XPages.AddPage(\"TicketsDia\", ticketsDia)";
_b4xpages._addpage /*String*/ (ba,"TicketsDia",(Object)(_ticketsdia));
 //BA.debugLineNum = 134;BA.debugLine="noVenta.Initialize";
_noventa._initialize /*Object*/ (ba);
 //BA.debugLineNum = 135;BA.debugLine="B4XPages.AddPage(\"NoVenta\", noVenta)";
_b4xpages._addpage /*String*/ (ba,"NoVenta",(Object)(_noventa));
 //BA.debugLineNum = 136;BA.debugLine="nota.Initialize";
_nota._initialize /*Object*/ (ba);
 //BA.debugLineNum = 137;BA.debugLine="B4XPages.AddPage(\"Nota\", nota)";
_b4xpages._addpage /*String*/ (ba,"Nota",(Object)(_nota));
 //BA.debugLineNum = 138;BA.debugLine="pedidos.Initialize";
_pedidos._initialize /*Object*/ (ba);
 //BA.debugLineNum = 139;BA.debugLine="B4XPages.AddPage(\"Pedidos\", pedidos)";
_b4xpages._addpage /*String*/ (ba,"Pedidos",(Object)(_pedidos));
 //BA.debugLineNum = 140;BA.debugLine="promos.Initialize";
_promos._initialize /*Object*/ (ba);
 //BA.debugLineNum = 141;BA.debugLine="B4XPages.AddPage(\"Promos\", promos)";
_b4xpages._addpage /*String*/ (ba,"Promos",(Object)(_promos));
 //BA.debugLineNum = 142;BA.debugLine="historico.Initialize";
_historico._initialize /*Object*/ (ba);
 //BA.debugLineNum = 143;BA.debugLine="B4XPages.AddPage(\"Historico\", historico)";
_b4xpages._addpage /*String*/ (ba,"Historico",(Object)(_historico));
 //BA.debugLineNum = 145;BA.debugLine="historicobat.Initialize";
_historicobat._initialize /*Object*/ (ba);
 //BA.debugLineNum = 146;BA.debugLine="B4XPages.AddPage(\"historicobat\", historicobat)";
_b4xpages._addpage /*String*/ (ba,"historicobat",(Object)(_historicobat));
 //BA.debugLineNum = 148;BA.debugLine="historicobattodos.Initialize";
_historicobattodos._initialize /*Object*/ (ba);
 //BA.debugLineNum = 149;BA.debugLine="B4XPages.AddPage(\"historicobattodos\", historicoba";
_b4xpages._addpage /*String*/ (ba,"historicobattodos",(Object)(_historicobattodos));
 //BA.debugLineNum = 151;BA.debugLine="Clientes_Completos.Initialize";
_clientes_completos._initialize /*Object*/ (ba);
 //BA.debugLineNum = 152;BA.debugLine="B4XPages.AddPage(\"Clientes_Completos\", Clientes_C";
_b4xpages._addpage /*String*/ (ba,"Clientes_Completos",(Object)(_clientes_completos));
 //BA.debugLineNum = 154;BA.debugLine="Tclientes.Initialize";
_tclientes._initialize /*Object*/ (ba);
 //BA.debugLineNum = 155;BA.debugLine="B4XPages.AddPage(\"Tclientes\", Tclientes)";
_b4xpages._addpage /*String*/ (ba,"Tclientes",(Object)(_tclientes));
 //BA.debugLineNum = 159;BA.debugLine="p_Main.Height = Root.Height";
_p_main.setHeight(_root.getHeight());
 //BA.debugLineNum = 160;BA.debugLine="p_Main.Width = Root.Width";
_p_main.setWidth(_root.getWidth());
 //BA.debugLineNum = 161;BA.debugLine="ruta = Starter.ruta";
_ruta = _starter._ruta /*String*/ ;
 //BA.debugLineNum = 162;BA.debugLine="Provider.Initialize";
_provider._initialize /*String*/ (ba);
 //BA.debugLineNum = 163;BA.debugLine="If File.Exists(File.DirInternal, \"kmt.db\") = Fals";
if (__c.File.Exists(__c.File.getDirInternal(),"kmt.db")==__c.False) { 
 //BA.debugLineNum = 164;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", File.DirInte";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__c.File.getDirInternal(),"kmt.db");
 };
 //BA.debugLineNum = 166;BA.debugLine="skmt.Initialize(File.DirInternal,\"kmt.db\", True)";
_skmt.Initialize(__c.File.getDirInternal(),"kmt.db",__c.True);
 //BA.debugLineNum = 167;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS IMP";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS IMPRESORA (HABILITADA)");
 //BA.debugLineNum = 169;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS FOT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS FOTOS (CLIENTE TEXT, FOTO BLOB, MOVIMIENTO TEXT)");
 //BA.debugLineNum = 170;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS PLA";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS PLAN_LEALTAD (PL_CLIENTE TEXT, PL_BANDERA TEXT)");
 //BA.debugLineNum = 172;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ABO";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ABONOSP(NOTA TEXT, CLIENTE TEXT, SALDO_PENDIENTE TEXT, FECHA TEXT)");
 //BA.debugLineNum = 173;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ABO";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ABONOSPTOD(NOTA TEXT, CLIENTE TEXT, SALDO_PENDIENTE TEXT, FECHA TEXT)");
 //BA.debugLineNum = 176;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS COM";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS COMENTARIOS (COMENTARTIO TEXT, CLIENTE TEXT, DESCARGADO TEXT)");
 //BA.debugLineNum = 178;BA.debugLine="Subs.agregaColumna(\"PLAN_LEALTAD\", \"DESCARGADO\",";
_subs._agregacolumna /*String*/ (ba,"PLAN_LEALTAD","DESCARGADO","TEXT");
 //BA.debugLineNum = 179;BA.debugLine="Subs.agregaColumna(\"PEDIDO_CLIENTE\", \"PC_FACTURA\"";
_subs._agregacolumna /*String*/ (ba,"PEDIDO_CLIENTE","PC_FACTURA","INTEGER");
 //BA.debugLineNum = 180;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS GPS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS GPS (HABILITADO)");
 //BA.debugLineNum = 182;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_OBJETIVO_BAT (COB_VOLUMEN TEXT, COB_MARCAE TEXT, COB_PORTAFOLIO TEXT, COB_OBJPP TEXT, COB_GEV TEXT )");
 //BA.debugLineNum = 184;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_CATCLIENTESTODOS (CAT_CL_TIPO_RUTA TEXT, CAT_CL_DIAS_VISITA TEXT, CAT_CL_CODIGO TEXT, CAT_CL_FOTO TEXT, CAT_CL_CLASIFICADOR3 TEXT, CAT_CL_CLASIFICADOR4 TEXT, CAT_CL_CLASIFICADOR2 TEXT, CAT_CL_RUTA TEXT, CAT_CL_NOMBRE TEXT, CAT_CL_ATIENDE1 TEXT, CAT_CL_ATIENTE2 TEXT, CAT_CL_TELEFONO TEXT, CAT_CL_EMAIL TEXT, CAT_CL_CALLE TEXT, CAT_CL_NOEXT TEXT, CAT_CL_NOINT TEXT, CAT_CL_CALLE1 TEXT, CAT_CL_CALLE2 TEXT, CAT_CL_COLONIA TEXT, CAT_CL_MUNI TEXT, CAT_CL_EDO TEXT, CAT_CL_CP TEXT, CAT_CL_LONG TEXT, CAT_CL_LAT TEXT, CAT_CL_MTOCOMPRA TEXT, CAT_CL_NUM_SERIEFISICO TEXT, CAT_CL_BCREDITO TEXT, CAT_CL_DIASCREDITO TEXT, CAT_CL_TIPOCLIENTE TEXT, CAT_CL_LIMITECREDITO TEXT)");
 //BA.debugLineNum = 186;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS his";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS hist_ventastodos (HVD_CLIENTE TEX, HVD_PRONOMBRE TEXT, HVD_CANT TEXT, HVD_COSTO_TOT TEXT, HVD_FECHA TEXT)");
 //BA.debugLineNum = 188;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_GIRO(GIRO TEXT)");
 //BA.debugLineNum = 189;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CLI";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CLIENTES_NUEVOS(CN_ID TEXT, CN_FECHA TEXT, CN_USER TEXT, CN_LAT TEXT, CN_LON TEXT, CN_NOMBRE TEXT, CN_DIRECCION TEXT, CN_FOTO TEXT, CN_ALMACEN TEXT, CN_RUTA TEXT,CN_GIRO TEXT)");
 //BA.debugLineNum = 190;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_PROMOS_DESCUENTOS (CAT_PD_ALMACEN TEXT, CAT_PD_COD_PROMO TEXT, CAT_PD_RANGO INT, CAT_PD_VIGENCIA TEXT, CAT_PD_DESCUENTO TEXT, CAT_PD_PRODUCTO TEXT, CAT_PD_TIER TEXT)");
 //BA.debugLineNum = 191;BA.debugLine="Subs.agregaColumna(\"CAT_PROMOS_DESCUENTOS\", \"CAT_";
_subs._agregacolumna /*String*/ (ba,"CAT_PROMOS_DESCUENTOS","CAT_PD_RANGO2","INT");
 //BA.debugLineNum = 192;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_GUNAPROD2 (CAT_GP_CODPROMO TEXT, CAT_GP_INICIATIVA TEXT, CAT_GP_TIPOPROD TEXT, CAT_GP_DEV TEXT, CAT_GP_ALMACEN NUM, CAT_GP_ID TEXT, CAT_GP_NOMBRE TEXT, CAT_GP_IMP1 TEXT, CAT_GP_IMP2 TEXT, CAT_GP_PRECIO TEXT, CAT_GP_CLASIF TEXT, CAT_GP_STS TEXT, CAT_GP_TIPO TEXT, CAT_GP_SUBTIPO TEXT, CAT_GP_IMG )");
 //BA.debugLineNum = 193;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS PRO";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS PROMO_ESP (HVD_CLIENTE)");
 //BA.debugLineNum = 194;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_PROMO_ESP(CAT_PE_ID TEXT,CAT_PE_IDPROMO TEXT,CAT_PE_MONTO TEXT)");
 //BA.debugLineNum = 195;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_CUOTAS (HC_META6 TEXT, HC_META5 TEXT, HC_META4 TEXT, HC_META3 TEXT, HC_META2 TEXT, HC_META1 TEXT, HC_RUTA TEXT, HC_CUOTA1 TEXT, HC_CUOTA2 TEXT, HC_CUOTA3 TEXT, HC_CUOTA4 TEXT, HC_CUOTA5 TEXT, HC_CUOTA6 TEXT)");
 //BA.debugLineNum = 196;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_GPS (HGDATE TEXT, HGLAT TEXT, HGLON TEXT)");
 //BA.debugLineNum = 197;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_STAY_STORE (HSS_CODIGO TEXT, HSS_IN TEXT, HSS_OUT TEXT, HSS_TOT TEXT)");
 //BA.debugLineNum = 198;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_STAY_OUT (HSO_INI TEXT, HSO_FIN TEXT)");
 //BA.debugLineNum = 199;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS INV";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS INVENT_X_ENVIAR (ALMACEN TEXT, PROID TEXT, CANTIDAD TEXT)");
 //BA.debugLineNum = 200;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_RESUM_APK (HIST_RA_OBJMES TEXT, HIST_RA_VENTA TEXT, HIST_RA_TENDENCIA TEXT, HIST_RA_ALCANCE TEXT, HISR_RA_DRAOBJ TEXT, HIST_RA_DRAVTA TEXT, HIST_RA_DSOBJ TEXT, HIST_RA_DSVTA TEXT, HIST_RA_VPOOBJ TEXT, HIST_RA_VPOVTA TEXT, HIST_RA_COBCCC TEXT, HIST_RA_CTES TEXT, HIST_RA_ECO TEXT, HIST_RA_VISITPLAN TEXT, HIST_RA_VISIREAL TEXT, HIST_RA_COBVISIT TEXT, HIST_RA_FRECCOMPOBJ TEXT, HIST_RA_FRECCOMREAL TEXT, HIST_RA_VENTAMES1 TEXT, HIST_RA_VENTAMES2 TEXT, HIST_RA_VENTAMES3 TEXT, HIST_RA_VENTAMES4 TEXT, HIST_RA_RECHAZO TEXT, HIST_RA_RECHAZOPORCEN TEXT, HIST_RA_SEMANA1 TEXT, HIST_RA_SEMANA1_DIAS TEXT, HIST_RA_SEMANA1_DRA TEXT, HIST_RA_SEMANA2 TEXT, HIST_RA_SEMANA2_DIAS TEXT, HIST_RA_SEMANA2_DRA TEXT, HIST_RA_SEMANA3 TEXT, HIST_RA_SEMANA3_DIAS TEXT, HIST_RA_SEMANA4 TEXT, HIST_RA_SEMANA3_DRA TEXT, HIST_RA_SEMANA4_DIAS TEXT, HIST_RA_SEMANA4_DRA TEXT, HIST_RA_SEMANA5 TEXT, HIST_RA_SEMANA5_DIAS TEXT, HIST_RA_SEMANA5_DRA TEXT, HIST_RA_SEMANA1_LPT TEXT, HIST_RA_SEMANA2_LPT TEXT, HIST_RA_SEMANA3_LPT TEXT, HIST_RA_SEMANA4_LPT TEXT, HIST_RA_SEMANA5_LPT TEXT, HIST_RA_RUTA TEXT, HIST_RA_IDALMACEN TEXT)");
 //BA.debugLineNum = 201;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_COMISIONES_MOVIL (HCM_IDALMACEN TEXT, HCM_RUTA TEXT, HCM_TOTAL_V TEXT, HCM_TOTAL_VIVE TEXT, HCM_TOTAL_GUNA TEXT,	HCM_TOTAL_BEB TEXT)");
 //BA.debugLineNum = 202;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_GEOCERCA (HGCLIENTE TEXT, HGDATE TEXT, HGLAT TEXT, HGLON TEXT)");
 //BA.debugLineNum = 203;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_FACE (HFCLIENTE TEXT, HFALIAS TEXT, HFRUTA TEXT, HFALMACEN TEXT)");
 //BA.debugLineNum = 204;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)");
 //BA.debugLineNum = 205;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS CATA";
_skmt.ExecNonQuery("CREATE VIEW IF NOT EXISTS CATALOGO AS Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD UNION Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD GROUP BY CAT_GP_CLASIF, CAT_GP_ID");
 //BA.debugLineNum = 206;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS tota";
_skmt.ExecNonQuery("CREATE VIEW IF NOT EXISTS total_marcas AS 	Select  cat_gp_clasif, sum(pe_costo_tot) As total from CATALOGO, pedido where pe_proid = cat_gp_id 	And pe_cliente <> 0 	group by cat_gp_clasif");
 //BA.debugLineNum = 207;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_MARCAS_CUOTAS ( HMC_MARCA TEXT, HMC_TOTAL TEXT)");
 //BA.debugLineNum = 208;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_CODIGO_BARRAS(CODIGOKMTS TEXT, CODIGOB TEXT, LAT TEXT, LON TEXT)");
 //BA.debugLineNum = 209;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTA_MODULO1(CLIENTE TEXT,ALMACEN TEXT, P1 TEXT, P2 TEXT, P3 TEXT, P4 TEXT, P5 TEXT, P6 TEXT, P7 TEXT, P8 TEXT, P9 TEXT)");
 //BA.debugLineNum = 210;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTA_MODULO2 (CLIENTE TEXT, ALMACEN TEXT,P1 TEXT, P2 TEXT, P3 TEXT , P4 TEXT, P5 TEXT, P6 TEXT)");
 //BA.debugLineNum = 211;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS CAT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CAT_ENCUESTA_PREGUNTA (CAT_EP_ID TEXT,CAT_EP_IDTIPOPREGUNTA TEXT,CAT_CE_DESCRIPCION TEXT,CAT_EP_PREGUNTA TEXT,CAT_EP_RES1_PRED TEXT,CAT_EP_RES2_PRED TEXT,CAT_EP_RES3_PRED TEXT,CAT_EP_ORDEN_PREGUNTA TEXT)");
 //BA.debugLineNum = 212;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTA_MODULO3(CLIENTE TEXT,ALMACEN TEXT, P1 TEXT, P2 TEXT, P3 TEXT, P4 TEXT, P5 TEXT, P6 TEXT, P7 TEXT, P8 TEXT, P9 TEXT, P10 TEXT, P11 TEXT)");
 //BA.debugLineNum = 213;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTA_MODULO4 (CLIENTE TEXT, ALMACEN TEXT,P1 TEXT, P2 TEXT, P3 TEXT , P4 TEXT, P5 TEXT, P6 TEXT, P7 TEXT, P8 TEXT)");
 //BA.debugLineNum = 214;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTA_MODULO5 (CLIENTE TEXT, ALMACEN TEXT,P1 TEXT, P2 TEXT, P3 TEXT , P4 TEXT, P5 TEXT, P6 TEXT, P7 TEXT, P8 TEXT, P9 TEXT)");
 //BA.debugLineNum = 215;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA2(HE_CLIENTE TEXT)");
 //BA.debugLineNum = 216;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA_CLIENTE (HEC_CLIENTE TEXT, HEC_MODULO TEXT)");
 //BA.debugLineNum = 217;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA_AVISO_GIRO (HEAV_CLIENTE TEXT, HEAV_MODULO TEXT, HEAV_AVISO TEXT, HEAV_GIRO TEXT)");
 //BA.debugLineNum = 218;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA (HE_CLIE TEXT, HE_RES TEXT, HE_FECHA TEXT, HE_TIPO TEXT, HE_LAT TEXT, HE_LON TEXT)");
 //BA.debugLineNum = 219;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS kmt";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS kmt_info3(CAT_CL_FOTO BLOB, CAT_CL_NUM_SERIEFISICO TEXT, CAT_CL_MTOCOMPRA TEXT, CAT_CL_CEDIS TEXT, CAT_CL_LAT TEXT, CAT_CL_LONG TEXT, CAT_CL_FBAJA TEXT, CAT_CL_FALTA TEXT, CAT_CL_CP TEXT, CAT_CL_EDO TEXT, CAT_CL_MUNI TEXT, CAT_CL_COLONIA TEXT, CAT_CL_CALLE2 TEXT, CAT_CL_CALLE1 TEXT, CAT_CL_NOINT TEXT, CAT_CL_NOEXT TEXT, CAT_CL_CALLE TEXT, CAT_CL_EMAIL TEXT, CAT_CL_TELEFONO TEXT, CAT_CL_ATIENTE2 TEXT, CAT_CL_ATIENDE1 TEXT, CAT_CL_NOMBRE TEXT, CAT_CL_GIRO TEXT, CAT_CL_DIAS_VISITA TEXT, CAT_CL_TIPO_RUTA TEXT, CAT_CL_RUTA TEXT, CAT_CL_CODIGO TEXT, gestion NUMERIC)");
 //BA.debugLineNum = 220;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_PRO2265(H_IDCLIENTE TEXT)");
 //BA.debugLineNum = 221;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ATI";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ATIENDE(ATIENDE TEXT, CLIENTE TEXT)");
 //BA.debugLineNum = 223;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_ENCUESTA_BAT(CLIENTE)");
 //BA.debugLineNum = 224;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ENC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS ENCUESTAS_BAT (CLIENTE TEXT,RUTA TEXT,ALMACEN TEXT,P1 TEXT,P2 TEXT,P3 TEXT,P4 TEXT,P5 TEXT,P6 TEXT,P7 TEXT,P8 TEXT,P9 TEXT,P10 TEXT, FECHA TEXT)");
 //BA.debugLineNum = 226;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS COD";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS CODIGOS_CREDITO(CODIGO TEXT, BANDERA TEXT)");
 //BA.debugLineNum = 228;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS TEL";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS TELEFONO(TELEFONO TEXT, CLIENTE TEXT)");
 //BA.debugLineNum = 229;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_PRO3054(H_IDCLIENTE TEXT)");
 //BA.debugLineNum = 230;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_PRO3055(H_IDCLIENTE TEXT)");
 //BA.debugLineNum = 231;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUT";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS RUTA_SUPLENCIA(RS_RUTA TEXT)");
 //BA.debugLineNum = 232;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS TIC";
_skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS TICKET_IMPRESO (idCliente TEXT)");
 //BA.debugLineNum = 234;BA.debugLine="Subs.agregaColumna(\"HIST_ENCUESTA\", \"HE_LAT\", \"TE";
_subs._agregacolumna /*String*/ (ba,"HIST_ENCUESTA","HE_LAT","TEXT");
 //BA.debugLineNum = 235;BA.debugLine="Subs.agregaColumna(\"HIST_ENCUESTA\", \"HE_FOTO\", \"B";
_subs._agregacolumna /*String*/ (ba,"HIST_ENCUESTA","HE_FOTO","BLOB");
 //BA.debugLineNum = 236;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"foto\", \"BLOB\")";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","foto","BLOB");
 //BA.debugLineNum = 237;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_RECALCULO\", \"TEX";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_RECALCULO","TEXT");
 //BA.debugLineNum = 238;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_DESC\", \"TEXT\")";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_DESC","TEXT");
 //BA.debugLineNum = 239;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_RECALCULADO\", \"T";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_RECALCULADO","TEXT");
 //BA.debugLineNum = 240;BA.debugLine="Subs.agregaColumna(\"CODIGOS_CREDITO\", \"CLIENTE\",";
_subs._agregacolumna /*String*/ (ba,"CODIGOS_CREDITO","CLIENTE","TEXT");
 //BA.debugLineNum = 241;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_RECCEDIS\", \"TEXT";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_RECCEDIS","TEXT");
 //BA.debugLineNum = 242;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_FUTURO\", \"TEXT\")";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_FUTURO","TEXT");
 //BA.debugLineNum = 243;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_RECALCULOTOT\", \"";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_RECALCULOTOT","TEXT");
 //BA.debugLineNum = 244;BA.debugLine="Subs.agregaColumna(\"HIST_ENCUESTA\", \"HE_LON\", \"TE";
_subs._agregacolumna /*String*/ (ba,"HIST_ENCUESTA","HE_LON","TEXT");
 //BA.debugLineNum = 246;BA.debugLine="Subs.agregaColumna(\"hist_ventastodos\", \"HVD_NUM_T";
_subs._agregacolumna /*String*/ (ba,"hist_ventastodos","HVD_NUM_TICKET","TEXT");
 //BA.debugLineNum = 247;BA.debugLine="Subs.agregaColumna(\"hist_ventastodos\", \"HVD_CODPR";
_subs._agregacolumna /*String*/ (ba,"hist_ventastodos","HVD_CODPROMO","TEXT");
 //BA.debugLineNum = 249;BA.debugLine="Subs.agregaColumna(\"HIST_VENTAS\", \"HVD_FECHA\", \"T";
_subs._agregacolumna /*String*/ (ba,"HIST_VENTAS","HVD_FECHA","TEXT");
 //BA.debugLineNum = 250;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_NUMEROINT";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_NUMEROINT","TEXT");
 //BA.debugLineNum = 251;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_ORDENVISI";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_ORDENVISITA","TEXT");
 //BA.debugLineNum = 252;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_NUMEROEXT";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_NUMEROEXT","TEXT");
 //BA.debugLineNum = 253;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_REFERENCI";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_REFERENCIA","TEXT");
 //BA.debugLineNum = 254;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_NUMEROI";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_NUMEROINT","TEXT");
 //BA.debugLineNum = 255;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_NUMEROE";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_NUMEROEXT","TEXT");
 //BA.debugLineNum = 256;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_REFEREN";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_REFERENCIA","TEXT");
 //BA.debugLineNum = 257;BA.debugLine="Subs.agregaColumna(\"COMENTARIOS\", \"comentario_tmp";
_subs._agregacolumna /*String*/ (ba,"COMENTARIOS","comentario_tmp","TEXT");
 //BA.debugLineNum = 259;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"encuesta\", \"TEXT";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","encuesta","TEXT");
 //BA.debugLineNum = 260;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_CLASIFICA";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_CLASIFICADOR4","TEXT");
 //BA.debugLineNum = 261;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_GP_CONVER";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_GP_CONVERSION3","TEXT");
 //BA.debugLineNum = 262;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_GP_CONVER";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_GP_CONVERSION2","TEXT");
 //BA.debugLineNum = 264;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_CLASIFICA";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_CLASIFICADOR3","TEXT");
 //BA.debugLineNum = 265;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_CLASIFICA";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_CLASIFICADOR2","TEXT");
 //BA.debugLineNum = 266;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_CLASIFICA";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_CLASIFICADOR5","TEXT");
 //BA.debugLineNum = 268;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_TIPOCLIEN";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_TIPOCLIENTE","TEXT");
 //BA.debugLineNum = 269;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_LIMITECRE";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_LIMITECREDITO","TEXT");
 //BA.debugLineNum = 270;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_DIASCREDI";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_DIASCREDITO","TEXT");
 //BA.debugLineNum = 271;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CONFIRMADO\", \"TE";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CONFIRMADO","TEXT");
 //BA.debugLineNum = 272;BA.debugLine="Subs.agregaColumna(\"kmt_info3\", \"CAT_CL_BCREDITO\"";
_subs._agregacolumna /*String*/ (ba,"kmt_info3","CAT_CL_BCREDITO","TEXT");
 //BA.debugLineNum = 273;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_GP_DEV\",";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_GP_DEV","TEXT");
 //BA.debugLineNum = 274;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_PA_BSEGME";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_PA_BSEGMENTA","TEXT");
 //BA.debugLineNum = 275;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_LISTAPREC";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_LISTAPRECIO","TEXT");
 //BA.debugLineNum = 276;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD\", \"CAT_PA_SEGMEN";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD","CAT_PA_SEGMENTAV","TEXT");
 //BA.debugLineNum = 277;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD2\", \"CAT_PA_BSEGM";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD2","CAT_PA_BSEGMENTA","TEXT");
 //BA.debugLineNum = 278;BA.debugLine="Subs.agregaColumna(\"CAT_GUNAPROD2\", \"CAT_PA_SEGME";
_subs._agregacolumna /*String*/ (ba,"CAT_GUNAPROD2","CAT_PA_SEGMENTAV","TEXT");
 //BA.debugLineNum = 279;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_SOLICIT";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_SOLICITA","TEXT");
 //BA.debugLineNum = 280;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_COLONIA";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_COLONIA","TEXT");
 //BA.debugLineNum = 281;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_TELEFON";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_TELEFONO","TEXT");
 //BA.debugLineNum = 282;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_CP\", \"T";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_CP","TEXT");
 //BA.debugLineNum = 283;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_CALLE1\"";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_CALLE1","TEXT");
 //BA.debugLineNum = 284;BA.debugLine="Subs.agregaColumna(\"CLIENTES_NUEVOS\", \"CN_CALLE2\"";
_subs._agregacolumna /*String*/ (ba,"CLIENTES_NUEVOS","CN_CALLE2","TEXT");
 //BA.debugLineNum = 285;BA.debugLine="Subs.agregaColumna(\"PEDIDO\", \"PE_RECCANT\", \"TEXT\"";
_subs._agregacolumna /*String*/ (ba,"PEDIDO","PE_RECCANT","TEXT");
 //BA.debugLineNum = 286;BA.debugLine="Subs.agregaColumna(\"FOTOS\", \"FECHA\", \"TEXT\")";
_subs._agregacolumna /*String*/ (ba,"FOTOS","FECHA","TEXT");
 //BA.debugLineNum = 287;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
try { //BA.debugLineNum = 288;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('ENCUESTA_MODULO3') WHERE name='P10'")));
 //BA.debugLineNum = 289;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 290;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
if ((_c.GetString("fCol")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 291;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE ENCUESTA_MODULO3";
_skmt.ExecNonQuery("ALTER TABLE ENCUESTA_MODULO3 ADD COLUMN P10 TEXT");
 };
 } 
       catch (Exception e158) {
			ba.setLastException(e158); //BA.debugLineNum = 294;BA.debugLine="Try";
try { //BA.debugLineNum = 295;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE ENCUESTA_MODULO3";
_skmt.ExecNonQuery("ALTER TABLE ENCUESTA_MODULO3 ADD COLUMN P10 TEXT");
 } 
       catch (Exception e161) {
			ba.setLastException(e161); //BA.debugLineNum = 297;BA.debugLine="Log(LastException)";
__c.LogImpl("41507517",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
 //BA.debugLineNum = 300;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
try { //BA.debugLineNum = 301;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('ENCUESTA_MODULO3') WHERE name='P11'")));
 //BA.debugLineNum = 302;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 303;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
if ((_c.GetString("fCol")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 304;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE ENCUESTA_MODULO3";
_skmt.ExecNonQuery("ALTER TABLE ENCUESTA_MODULO3 ADD COLUMN P11 TEXT");
 };
 } 
       catch (Exception e171) {
			ba.setLastException(e171); //BA.debugLineNum = 307;BA.debugLine="Try";
try { //BA.debugLineNum = 308;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE ENCUESTA_MODULO3";
_skmt.ExecNonQuery("ALTER TABLE ENCUESTA_MODULO3 ADD COLUMN P11 TEXT");
 } 
       catch (Exception e174) {
			ba.setLastException(e174); //BA.debugLineNum = 310;BA.debugLine="Log(LastException)";
__c.LogImpl("41507530",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
 //BA.debugLineNum = 313;BA.debugLine="c=skmt.ExecQuery(\"select  COUNT(*) AS CUANTOS fro";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select  COUNT(*) AS CUANTOS from HIST_STAY_OUT ")));
 //BA.debugLineNum = 314;BA.debugLine="C.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 315;BA.debugLine="If c.GetString(\"CUANTOS\")  = 0 Then";
if ((_c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 316;BA.debugLine="skmt.ExecNonQuery(\"INSERT INTO HIST_STAY_OUT(HSO";
_skmt.ExecNonQuery("INSERT INTO HIST_STAY_OUT(HSO_INI, HSO_FIN) VALUES (0,0)");
 };
 //BA.debugLineNum = 318;BA.debugLine="C.Close";
_c.Close();
 //BA.debugLineNum = 322;BA.debugLine="l_version.Text = Application.VersionName";
_l_version.setText(BA.ObjectToCharSequence(__c.Application.getVersionName()));
 //BA.debugLineNum = 324;BA.debugLine="PopupMenu.Initialize(\"PopupMenu\", b_menu)";
_popupmenu.Initialize(ba,"PopupMenu",(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(_b_menu.getObject())));
 //BA.debugLineNum = 325;BA.debugLine="PopupMenu.AddMenuItem(0, 0, \"View\")";
_popupmenu.AddMenuItem((int) (0),(int) (0),"View");
 //BA.debugLineNum = 326;BA.debugLine="PopupMenu.AddMenuItem(1, 1, \"Edit\")";
_popupmenu.AddMenuItem((int) (1),(int) (1),"Edit");
 //BA.debugLineNum = 327;BA.debugLine="PopupMenu.AddMenuItem(2, 2, \"Details\")";
_popupmenu.AddMenuItem((int) (2),(int) (2),"Details");
 //BA.debugLineNum = 328;BA.debugLine="PopupMenu.AddMenuItem(3, 3, \"Remove\")";
_popupmenu.AddMenuItem((int) (3),(int) (3),"Remove");
 //BA.debugLineNum = 330;BA.debugLine="montoActual  = 0";
_montoactual = BA.NumberToString(0);
 //BA.debugLineNum = 331;BA.debugLine="clientesTotal = 0";
_clientestotal = BA.NumberToString(0);
 //BA.debugLineNum = 332;BA.debugLine="clientesVenta =  0";
_clientesventa = BA.NumberToString(0);
 //BA.debugLineNum = 333;BA.debugLine="clientesVisitados = 0";
_clientesvisitados = BA.NumberToString(0);
 //BA.debugLineNum = 334;BA.debugLine="almacen = 0";
_almacen = BA.NumberToString(0);
 //BA.debugLineNum = 335;BA.debugLine="rutaPreventa =  0";
_rutapreventa = BA.NumberToString(0);
 //BA.debugLineNum = 336;BA.debugLine="p_appUpdate.Visible = False";
_p_appupdate.setVisible(__c.False);
 //BA.debugLineNum = 338;BA.debugLine="If Subs.traeUsarIntentBDWA Then";
if (_subs._traeusarintentbdwa /*boolean*/ (ba)) { 
 //BA.debugLineNum = 339;BA.debugLine="Subs.importaBDDesdeWhatsApp";
_subs._importabddesdewhatsapp /*String*/ (ba);
 };
 //BA.debugLineNum = 341;BA.debugLine="End Sub";
return "";
}
public String  _b4xswitch1_valuechanged(boolean _value) throws Exception{
 //BA.debugLineNum = 970;BA.debugLine="Private Sub B4XSwitch1_ValueChanged (Value As Bool";
 //BA.debugLineNum = 971;BA.debugLine="If Value Then";
if (_value) { 
 //BA.debugLineNum = 972;BA.debugLine="Log(\"1\")";
__c.LogImpl("42883586","1",0);
 //BA.debugLineNum = 973;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE IMPRESORA SET HABILIT";
_skmt.ExecNonQuery2("UPDATE IMPRESORA SET HABILITADA = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 }else {
 //BA.debugLineNum = 975;BA.debugLine="Log(\"desactivado\")";
__c.LogImpl("42883589","desactivado",0);
 //BA.debugLineNum = 976;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE IMPRESORA SET HABILIT";
_skmt.ExecNonQuery2("UPDATE IMPRESORA SET HABILITADA = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 };
 //BA.debugLineNum = 978;BA.debugLine="End Sub";
return "";
}
public String  _b4xswitch2_valuechanged(boolean _value2) throws Exception{
 //BA.debugLineNum = 980;BA.debugLine="Private Sub B4XSwitch2_ValueChanged (Value2 As Boo";
 //BA.debugLineNum = 981;BA.debugLine="c = skmt.ExecQuery2(\"SELECT CAT_VA_VALOR FROM CAT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"CARGA_DIA"})));
 //BA.debugLineNum = 982;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 983;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 984;BA.debugLine="If c.GetString(\"CAT_VA_VALOR\") = 1 Then";
if ((_c.GetString("CAT_VA_VALOR")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 985;BA.debugLine="If Value2  Then";
if (_value2) { 
 //BA.debugLineNum = 986;BA.debugLine="p_validacion.Visible = True";
_p_validacion.setVisible(__c.True);
 //BA.debugLineNum = 987;BA.debugLine="p_validacion.Left = (Root.Width/2) - (p_appUpd";
_p_validacion.setLeft((int) ((_root.getWidth()/(double)2)-(_p_appupdate.getWidth()/(double)2)));
 //BA.debugLineNum = 988;BA.debugLine="Subs.panelVisible(p_validacion,0,0)";
_subs._panelvisible /*String*/ (ba,_p_validacion,(int) (0),(int) (0));
 //BA.debugLineNum = 989;BA.debugLine="p_validacion.Height = Root.Height";
_p_validacion.setHeight(_root.getHeight());
 //BA.debugLineNum = 990;BA.debugLine="p_validacion.Width = Root.Width";
_p_validacion.setWidth(_root.getWidth());
 }else {
 //BA.debugLineNum = 992;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE GPS SET HABILITADO";
_skmt.ExecNonQuery2("UPDATE GPS SET HABILITADO = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 };
 }else {
 //BA.debugLineNum = 995;BA.debugLine="MsgboxAsync(\"Por favor primero haz carga de día";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor primero haz carga de día"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 996;BA.debugLine="B4XSwitch2.Value = False";
_b4xswitch2._setvalue /*boolean*/ (__c.False);
 };
 }else {
 //BA.debugLineNum = 999;BA.debugLine="MsgboxAsync(\"Por favor primero haz carga de día\"";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor primero haz carga de día"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 1000;BA.debugLine="B4XSwitch2.Value = False";
_b4xswitch2._setvalue /*boolean*/ (__c.False);
 };
 //BA.debugLineNum = 1002;BA.debugLine="End Sub";
return "";
}
public String  _cb_importarbdwa_checkedchange(boolean _checked) throws Exception{
 //BA.debugLineNum = 1150;BA.debugLine="Private Sub cb_importarBDWA_CheckedChange(Checked";
 //BA.debugLineNum = 1152;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_VARIAB";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'IMPORTAR_BD_WA'");
 //BA.debugLineNum = 1153;BA.debugLine="Starter.skmt.ExecNonQuery($\"insert into CAT_VARIA";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('IMPORTAR_BD_WA', '"+__c.SmartStringFormatter("",(Object)(_checked))+"')"));
 //BA.debugLineNum = 1154;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 18;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 19;BA.debugLine="Private Root As B4XView";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 21;BA.debugLine="Public login As B4XMainPage";
_login = new gunav2.keymon.com.mx.b4xmainpage();
 //BA.debugLineNum = 22;BA.debugLine="Public principal As C_Principal";
_principal = new gunav2.keymon.com.mx.c_principal();
 //BA.debugLineNum = 23;BA.debugLine="Public clientes As C_Clientes";
_clientes = new gunav2.keymon.com.mx.c_clientes();
 //BA.debugLineNum = 24;BA.debugLine="Public cliente As C_Cliente";
_cliente = new gunav2.keymon.com.mx.c_cliente();
 //BA.debugLineNum = 25;BA.debugLine="Public productos As C_Productos";
_productos = new gunav2.keymon.com.mx.c_productos();
 //BA.debugLineNum = 26;BA.debugLine="Public updateAvailable As C_UpdateAvailable";
_updateavailable = new gunav2.keymon.com.mx.c_updateavailable();
 //BA.debugLineNum = 27;BA.debugLine="Public mapas As C_Mapas";
_mapas = new gunav2.keymon.com.mx.c_mapas();
 //BA.debugLineNum = 28;BA.debugLine="Public nuevoCliente As C_NuevoCliente";
_nuevocliente = new gunav2.keymon.com.mx.c_nuevocliente();
 //BA.debugLineNum = 29;BA.debugLine="Public ticketsDia As C_TicketsDia";
_ticketsdia = new gunav2.keymon.com.mx.c_ticketsdia();
 //BA.debugLineNum = 30;BA.debugLine="Public noVenta As C_NoVenta";
_noventa = new gunav2.keymon.com.mx.c_noventa();
 //BA.debugLineNum = 31;BA.debugLine="Public nota As C_Nota";
_nota = new gunav2.keymon.com.mx.c_nota();
 //BA.debugLineNum = 32;BA.debugLine="Public pedidos As C_Pedidos";
_pedidos = new gunav2.keymon.com.mx.c_pedidos();
 //BA.debugLineNum = 33;BA.debugLine="Public promos As C_Promos";
_promos = new gunav2.keymon.com.mx.c_promos();
 //BA.debugLineNum = 34;BA.debugLine="Public historico As C_Historico";
_historico = new gunav2.keymon.com.mx.c_historico();
 //BA.debugLineNum = 35;BA.debugLine="Public Clientes_Completos As C_ClientesCompletos";
_clientes_completos = new gunav2.keymon.com.mx.c_clientescompletos();
 //BA.debugLineNum = 36;BA.debugLine="Public Tclientes As V_Tclientes";
_tclientes = new gunav2.keymon.com.mx.v_tclientes();
 //BA.debugLineNum = 38;BA.debugLine="Public historicobat As C_historicobat";
_historicobat = new gunav2.keymon.com.mx.c_historicobat();
 //BA.debugLineNum = 39;BA.debugLine="Public historicobattodos As C_historicobatyodos";
_historicobattodos = new gunav2.keymon.com.mx.c_historicobatyodos();
 //BA.debugLineNum = 41;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new gunav2.keymon.com.mx.dbrequestmanager();
 //BA.debugLineNum = 42;BA.debugLine="Dim v As String = Application.VersionName";
_v = __c.Application.getVersionName();
 //BA.debugLineNum = 43;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 44;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
 //BA.debugLineNum = 45;BA.debugLine="Dim lat_gps, lon_gps As String";
_lat_gps = "";
_lon_gps = "";
 //BA.debugLineNum = 46;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 47;BA.debugLine="Dim batt As Int";
_batt = 0;
 //BA.debugLineNum = 48;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
 //BA.debugLineNum = 49;BA.debugLine="Dim montoActual, clientesTotal, clientesVenta, cl";
_montoactual = "";
_clientestotal = "";
_clientesventa = "";
_clientesvisitados = "";
_almacen = "";
_rutapreventa = "";
 //BA.debugLineNum = 50;BA.debugLine="Dim server, fechaRuta As String";
_server = "";
_fecharuta = "";
 //BA.debugLineNum = 51;BA.debugLine="Dim Logger As Boolean";
_logger = false;
 //BA.debugLineNum = 52;BA.debugLine="Dim mac_impresora As String";
_mac_impresora = "";
 //BA.debugLineNum = 53;BA.debugLine="Dim Phn As PhoneId";
_phn = new anywheresoftware.b4a.phone.Phone.PhoneId();
 //BA.debugLineNum = 55;BA.debugLine="Dim user As EditText";
_user = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 56;BA.debugLine="Dim pass As EditText";
_pass = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 57;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 58;BA.debugLine="Dim existe As String";
_existe = "";
 //BA.debugLineNum = 59;BA.debugLine="Dim paso1 As String";
_paso1 = "";
 //BA.debugLineNum = 60;BA.debugLine="Private IMEN As Label";
_imen = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 61;BA.debugLine="Dim IMEI As String = \"\"";
_imei = "";
 //BA.debugLineNum = 62;BA.debugLine="Dim alterno As String";
_alterno = "";
 //BA.debugLineNum = 63;BA.debugLine="Private b_menu As Button";
_b_menu = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 64;BA.debugLine="Dim PopupMenu As RSPopupMenu";
_popupmenu = new com.rootsoft.rspopupmenu.RSPopupMenu();
 //BA.debugLineNum = 65;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 66;BA.debugLine="Private PDF As Button";
_pdf = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Private bpv1 As BatteryProgressView";
_bpv1 = new batteryprogressviewwrapper.batteryprogressviewWrapper();
 //BA.debugLineNum = 68;BA.debugLine="Dim batterystatus(11) As Int";
_batterystatus = new int[(int) (11)];
;
 //BA.debugLineNum = 69;BA.debugLine="Private bu As BatteryUtilities";
_bu = new gunav2.keymon.com.mx.batteryutilities();
 //BA.debugLineNum = 70;BA.debugLine="Private b_apk As Button";
_b_apk = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 71;BA.debugLine="Private i_engrane As ImageView";
_i_engrane = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 72;BA.debugLine="Private p_Main As Panel";
_p_main = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 73;BA.debugLine="Private p_appUpdate As Panel";
_p_appupdate = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 74;BA.debugLine="Private b_regesar As Button";
_b_regesar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 75;BA.debugLine="Private l_version As Label";
_l_version = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 76;BA.debugLine="Private ImageView1 As ImageView";
_imageview1 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Private Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 78;BA.debugLine="Dim Entrar As Button";
_entrar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Dim tipo_venta As String = Subs.traeTipoVentaDeBD";
_tipo_venta = _subs._traetipoventadebd /*String*/ (ba);
 //BA.debugLineNum = 80;BA.debugLine="Dim bTerminarClicked As Boolean = False";
_bterminarclicked = __c.False;
 //BA.debugLineNum = 81;BA.debugLine="Private lv_server As ListView";
_lv_server = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 82;BA.debugLine="Private l_server As Label";
_l_server = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 83;BA.debugLine="Private b_envioBD As Button";
_b_enviobd = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 84;BA.debugLine="Public Provider As FileProvider";
_provider = new gunav2.keymon.com.mx.fileprovider();
 //BA.debugLineNum = 85;BA.debugLine="Public rutaBDBackup = \"\"";
_rutabdbackup = "";
 //BA.debugLineNum = 86;BA.debugLine="Private B4XSwitch1 As B4XSwitch";
_b4xswitch1 = new gunav2.keymon.com.mx.b4xswitch();
 //BA.debugLineNum = 87;BA.debugLine="Private p_validacion As Panel";
_p_validacion = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private B4XSwitch2 As B4XSwitch";
_b4xswitch2 = new gunav2.keymon.com.mx.b4xswitch();
 //BA.debugLineNum = 89;BA.debugLine="Dim x As Int";
_x = 0;
 //BA.debugLineNum = 90;BA.debugLine="Private et_codigo As EditText";
_et_codigo = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Dim buscandoActualizacion As Boolean = False";
_buscandoactualizacion = __c.False;
 //BA.debugLineNum = 92;BA.debugLine="Dim actualizacionRevisada As Boolean = False 'Par";
_actualizacionrevisada = __c.False;
 //BA.debugLineNum = 93;BA.debugLine="Private b_actualizacion As Button";
_b_actualizacion = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 94;BA.debugLine="Private et_server As EditText";
_et_server = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 95;BA.debugLine="Dim intentUsado As Boolean = False";
_intentusado = __c.False;
 //BA.debugLineNum = 96;BA.debugLine="Private p_importarBDWA As Panel";
_p_importarbdwa = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 97;BA.debugLine="Private cb_importarBDWA As CheckBox";
_cb_importarbdwa = new anywheresoftware.b4a.objects.CompoundButtonWrapper.CheckBoxWrapper();
 //BA.debugLineNum = 99;BA.debugLine="Dim pkg As PackageManager";
_pkg = new anywheresoftware.b4a.phone.PackageManagerWrapper();
 //BA.debugLineNum = 101;BA.debugLine="End Sub";
return "";
}
public void  _copiadb() throws Exception{
ResumableSub_copiaDB rsub = new ResumableSub_copiaDB(this);
rsub.resume(ba, null);
}
public static class ResumableSub_copiaDB extends BA.ResumableSub {
public ResumableSub_copiaDB(gunav2.keymon.com.mx.b4xmainpage parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.b4xmainpage parent;
String _permission = "";
boolean _result = false;
String _thedir = "";

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
try {

        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 865;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_WRITE_EXTERNAL_STORAGE);
 //BA.debugLineNum = 866;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 19;
return;
case 19:
//C
this.state = 1;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 867;BA.debugLine="Dim theDir As String = \"\"";
_thedir = "";
 //BA.debugLineNum = 868;BA.debugLine="If Result Then";
if (true) break;

case 1:
//if
this.state = 18;
if (_result) { 
this.state = 3;
}else {
this.state = 17;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 869;BA.debugLine="Dim theDir As String";
_thedir = "";
 //BA.debugLineNum = 870;BA.debugLine="Try";
if (true) break;

case 4:
//try
this.state = 9;
this.catchState = 8;
this.state = 6;
if (true) break;

case 6:
//C
this.state = 9;
this.catchState = 8;
 //BA.debugLineNum = 871;BA.debugLine="File.MakeDir(File.DirRootExternal,\"kmts\")";
parent.__c.File.MakeDir(parent.__c.File.getDirRootExternal(),"kmts");
 //BA.debugLineNum = 872;BA.debugLine="theDir = \"/kmts\"";
_thedir = "/kmts";
 if (true) break;

case 8:
//C
this.state = 9;
this.catchState = 0;
 //BA.debugLineNum = 874;BA.debugLine="theDir = \"\"";
_thedir = "";
 if (true) break;
if (true) break;

case 9:
//C
this.state = 10;
this.catchState = 0;
;
 //BA.debugLineNum = 876;BA.debugLine="rutaBDBackup = File.DirRootExternal&theDir";
parent._rutabdbackup = parent.__c.File.getDirRootExternal()+_thedir;
 //BA.debugLineNum = 877;BA.debugLine="Try";
if (true) break;

case 10:
//try
this.state = 15;
this.catchState = 14;
this.state = 12;
if (true) break;

case 12:
//C
this.state = 15;
this.catchState = 14;
 //BA.debugLineNum = 878;BA.debugLine="File.Copy(File.DirInternal,\"kmt.db\",File.DirRoo";
parent.__c.File.Copy(parent.__c.File.getDirInternal(),"kmt.db",parent.__c.File.getDirRootExternal()+_thedir,"cedex_kmt.db");
 //BA.debugLineNum = 879;BA.debugLine="ToastMessageShow(\"Listo\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Listo"),parent.__c.False);
 if (true) break;

case 14:
//C
this.state = 15;
this.catchState = 0;
 //BA.debugLineNum = 881;BA.debugLine="ToastMessageShow(\"No se pudo hacer la copia: \"&";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("No se pudo hacer la copia: "+BA.ObjectToString(parent.__c.LastException(ba))),parent.__c.True);
 if (true) break;
if (true) break;

case 15:
//C
this.state = 18;
this.catchState = 0;
;
 if (true) break;

case 17:
//C
this.state = 18;
 //BA.debugLineNum = 884;BA.debugLine="ToastMessageShow(\"Sin permisos\", False)";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Sin permisos"),parent.__c.False);
 if (true) break;

case 18:
//C
this.state = -1;
;
 //BA.debugLineNum = 886;BA.debugLine="Log(rutaBDBackup)";
parent.__c.LogImpl("42359318",parent._rutabdbackup,0);
 //BA.debugLineNum = 887;BA.debugLine="End Sub";
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
ba.setLastException(e0);}
            }
        }
    }
}
public String  _dameusuario() throws Exception{
 //BA.debugLineNum = 834;BA.debugLine="Sub dameUsuario";
 //BA.debugLineNum = 835;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("select count(*) as EXISTE1 from usuarioa where usuario = ?",new String[]{_user.getText()})));
 //BA.debugLineNum = 836;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 837;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
_existe = _c.GetString("EXISTE1");
 //BA.debugLineNum = 838;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 839;BA.debugLine="If existe > 0 Then";
if ((double)(Double.parseDouble(_existe))>0) { 
 //BA.debugLineNum = 840;BA.debugLine="c=skmt.ExecQuery(\"select USUARIO from usuarioa\")";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 841;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 842;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 }else {
 //BA.debugLineNum = 844;BA.debugLine="usuario = \"SINUSUARIO\"";
_usuario = "SINUSUARIO";
 };
 //BA.debugLineNum = 846;BA.debugLine="End Sub";
return "";
}
public String  _entrar_click() throws Exception{
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
int _api = 0;
anywheresoftware.b4a.phone.Phone _pp = null;
int _id = 0;
 //BA.debugLineNum = 458;BA.debugLine="Sub Entrar_Click";
 //BA.debugLineNum = 459;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
 //BA.debugLineNum = 460;BA.debugLine="Dim Api As Int";
_api = 0;
 //BA.debugLineNum = 461;BA.debugLine="Dim PP As Phone";
_pp = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 462;BA.debugLine="user.Text = user.Text.trim";
_user.setText(BA.ObjectToCharSequence(_user.getText().trim()));
 //BA.debugLineNum = 463;BA.debugLine="LogColor(Starter.server, Colors.Blue)";
__c.LogImpl("41638405",_starter._server /*String*/ ,__c.Colors.Blue);
 //BA.debugLineNum = 464;BA.debugLine="Api = r.GetStaticField(\"android.os.Build$VERSION\"";
_api = (int)(BA.ObjectToNumber(_r.GetStaticField("android.os.Build$VERSION","SDK_INT")));
 //BA.debugLineNum = 465;BA.debugLine="If Api < 9 Then";
if (_api<9) { 
 //BA.debugLineNum = 467;BA.debugLine="If File.Exists(File.DirInternal, \"__id\") Then";
if (__c.File.Exists(__c.File.getDirInternal(),"__id")) { 
 //BA.debugLineNum = 468;BA.debugLine="IMEI =  File.ReadString(File.DirInternal, \"__id";
_imei = __c.File.ReadString(__c.File.getDirInternal(),"__id");
 //BA.debugLineNum = 469;BA.debugLine="Log(1&\"-\"&IMEI)";
__c.LogImpl("41638411",BA.NumberToString(1)+"-"+_imei,0);
 }else {
 //BA.debugLineNum = 471;BA.debugLine="Dim id As Int";
_id = 0;
 //BA.debugLineNum = 472;BA.debugLine="id = Rnd(0x10000000, 0x7FFFFFFF)";
_id = __c.Rnd(((int)0x10000000),((int)0x7fffffff));
 //BA.debugLineNum = 473;BA.debugLine="File.WriteString(File.DirInternal, \"__id\", id)";
__c.File.WriteString(__c.File.getDirInternal(),"__id",BA.NumberToString(_id));
 //BA.debugLineNum = 474;BA.debugLine="IMEI =  id";
_imei = BA.NumberToString(_id);
 //BA.debugLineNum = 475;BA.debugLine="Log(2&\"-\"&IMEI)";
__c.LogImpl("41638417",BA.NumberToString(2)+"-"+_imei,0);
 };
 }else {
 //BA.debugLineNum = 479;BA.debugLine="IMEI =  r.GetStaticField(\"android.os.Build\", \"SE";
_imei = BA.ObjectToString(_r.GetStaticField("android.os.Build","SERIAL"));
 //BA.debugLineNum = 480;BA.debugLine="Log(3&\"-\"&IMEI)";
__c.LogImpl("41638422",BA.NumberToString(3)+"-"+_imei,0);
 };
 //BA.debugLineNum = 482;BA.debugLine="If IMEI.ToLowerCase = \"unknown\" Then";
if ((_imei.toLowerCase()).equals("unknown")) { 
 //BA.debugLineNum = 483;BA.debugLine="IMEI = PP.GetSettings(\"android_id\")";
_imei = _pp.GetSettings("android_id");
 };
 //BA.debugLineNum = 485;BA.debugLine="Log(\"IMEI = \" &  IMEI)";
__c.LogImpl("41638427","IMEI = "+_imei,0);
 //BA.debugLineNum = 486;BA.debugLine="If user.Text = \"ALTERNO\" Then";
if ((_user.getText()).equals("ALTERNO")) { 
 //BA.debugLineNum = 487;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?",new String[]{"SERVER"})));
 //BA.debugLineNum = 488;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 489;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
_server = _c.GetString("CAT_CO_CONFIGURACION");
 //BA.debugLineNum = 490;BA.debugLine="alterno = c.GetString(\"CAT_CO_RESULTADO\")";
_alterno = _c.GetString("CAT_CO_RESULTADO");
 //BA.debugLineNum = 491;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 492;BA.debugLine="If alterno = 1 Then";
if ((_alterno).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 493;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
_skmt.ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 //BA.debugLineNum = 494;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
_skmt.ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 }else if((_alterno).equals(BA.NumberToString(2))) { 
 //BA.debugLineNum = 496;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
_skmt.ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 //BA.debugLineNum = 497;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
_skmt.ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 };
 //BA.debugLineNum = 499;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?",new String[]{"SERVER"})));
 //BA.debugLineNum = 500;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 501;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
_server = _c.GetString("CAT_CO_CONFIGURACION");
 //BA.debugLineNum = 502;BA.debugLine="user.Text = server";
_user.setText(BA.ObjectToCharSequence(_server));
 //BA.debugLineNum = 503;BA.debugLine="c.Close";
_c.Close();
 }else if((_user.getText()).equals("KMTS1")) { 
 //BA.debugLineNum = 506;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
_skmt.ExecNonQuery("delete from usuarioa");
 //BA.debugLineNum = 507;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
_skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_user.getText()),(Object)(_pass.getText())}));
 //BA.debugLineNum = 508;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
_skmt.ExecNonQuery("delete from cat_almacen");
 //BA.debugLineNum = 509;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
_skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_pass.getText())}));
 //BA.debugLineNum = 510;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
_skmt.ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 511;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
_skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("2.1")}));
 //BA.debugLineNum = 512;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }else if((_user.getText()).equals("BERNA1")) { 
 //BA.debugLineNum = 514;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
_skmt.ExecNonQuery("delete from usuarioa");
 //BA.debugLineNum = 515;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
_skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_user.getText()),(Object)("1")}));
 //BA.debugLineNum = 516;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
_skmt.ExecNonQuery("delete from cat_almacen");
 //BA.debugLineNum = 517;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
_skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("1")}));
 //BA.debugLineNum = 518;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
_skmt.ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 519;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
_skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("2.1")}));
 //BA.debugLineNum = 520;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }else if((_user.getText()).equals("IMEI")) { 
 //BA.debugLineNum = 522;BA.debugLine="user.Text = IMEI";
_user.setText(BA.ObjectToCharSequence(_imei));
 };
 //BA.debugLineNum = 524;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("select count(*) as EXISTE1 from usuarioa where usuario = ?",new String[]{_user.getText()})));
 //BA.debugLineNum = 525;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 526;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
_existe = _c.GetString("EXISTE1");
 //BA.debugLineNum = 527;BA.debugLine="If Subs.traeAlmacen <> \"NA\" Then";
if ((_subs._traealmacen /*String*/ (ba)).equals("NA") == false) { 
 //BA.debugLineNum = 528;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 529;BA.debugLine="cmd.Name = \"selectVersionAppGuna\"";
_cmd.Name /*String*/  = "selectVersionAppGuna";
 //BA.debugLineNum = 530;BA.debugLine="cmd.Parameters = Array As Object(Subs.traeAlmace";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_subs._traealmacen /*String*/ (ba))};
 //BA.debugLineNum = 531;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"traeVersion\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("traeVersion"));
 };
 //BA.debugLineNum = 533;BA.debugLine="If existe = 0 Then";
if ((_existe).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 534;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 535;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 536;BA.debugLine="cmd.Name = \"select_usuario_guna_GV2_10\" 'Antes s";
_cmd.Name /*String*/  = "select_usuario_guna_GV2_10";
 //BA.debugLineNum = 537;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Trim,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_user.getText().trim()),(Object)(_pass.getText().trim())};
 //BA.debugLineNum = 538;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("usuario_10"));
 //BA.debugLineNum = 561;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 562;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 563;BA.debugLine="cmd.Name = \"select_version_GV2\"";
_cmd.Name /*String*/  = "select_version_GV2";
 //BA.debugLineNum = 564;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"version\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("version"));
 }else {
 //BA.debugLineNum = 566;BA.debugLine="usuario = user.Text";
_usuario = _user.getText();
 //BA.debugLineNum = 567;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 };
 //BA.debugLineNum = 569;BA.debugLine="End Sub";
return "";
}
public String  _entrar_longclick() throws Exception{
 //BA.debugLineNum = 571;BA.debugLine="Sub Entrar_LongClick";
 //BA.debugLineNum = 573;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 810;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 811;BA.debugLine="If user.text = \"GPS\" Then";
if ((_user.getText()).equals("GPS")) { 
 //BA.debugLineNum = 812;BA.debugLine="user.Text=Location1.Latitude";
_user.setText(BA.ObjectToCharSequence(_location1.getLatitude()));
 //BA.debugLineNum = 813;BA.debugLine="pass.text=Location1.Longitude";
_pass.setText(BA.ObjectToCharSequence(_location1.getLongitude()));
 };
 //BA.debugLineNum = 815;BA.debugLine="End Sub";
return "";
}
public String  _i_engrane_click() throws Exception{
 //BA.debugLineNum = 903;BA.debugLine="Sub i_engrane_Click";
 //BA.debugLineNum = 904;BA.debugLine="p_appUpdate.Left = (Root.Width/2) - (p_appUpdate.";
_p_appupdate.setLeft((int) ((_root.getWidth()/(double)2)-(_p_appupdate.getWidth()/(double)2)));
 //BA.debugLineNum = 905;BA.debugLine="lv_server.Clear";
_lv_server.Clear();
 //BA.debugLineNum = 906;BA.debugLine="lv_server.AddSingleLine(\"http://keymon.net:1782\")";
_lv_server.AddSingleLine(BA.ObjectToCharSequence("http://keymon.net:1782"));
 //BA.debugLineNum = 907;BA.debugLine="If user.Text = \"KMTS1\" Then lv_server.AddSingleLi";
if ((_user.getText()).equals("KMTS1")) { 
_lv_server.AddSingleLine(BA.ObjectToCharSequence("http://10.0.0.205:1782"));};
 //BA.debugLineNum = 908;BA.debugLine="l_server.Text = Starter.server";
_l_server.setText(BA.ObjectToCharSequence(_starter._server /*String*/ ));
 //BA.debugLineNum = 909;BA.debugLine="et_server.Text = Starter.server";
_et_server.setText(BA.ObjectToCharSequence(_starter._server /*String*/ ));
 //BA.debugLineNum = 910;BA.debugLine="Subs.panelVisible(p_appUpdate,0,0)";
_subs._panelvisible /*String*/ (ba,_p_appupdate,(int) (0),(int) (0));
 //BA.debugLineNum = 911;BA.debugLine="p_appUpdate.Height = Root.Height";
_p_appupdate.setHeight(_root.getHeight());
 //BA.debugLineNum = 912;BA.debugLine="p_appUpdate.Width = Root.Width";
_p_appupdate.setWidth(_root.getWidth());
 //BA.debugLineNum = 913;BA.debugLine="c = skmt.ExecQuery(\"SELECT HABILITADA FROM IMPRES";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT HABILITADA FROM IMPRESORA")));
 //BA.debugLineNum = 914;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 915;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO IMPRESORA VALUES";
_skmt.ExecNonQuery2("INSERT INTO IMPRESORA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 };
 //BA.debugLineNum = 917;BA.debugLine="c = skmt.ExecQuery(\"SELECT HABILITADO FROM GPS\")";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT HABILITADO FROM GPS")));
 //BA.debugLineNum = 918;BA.debugLine="If c.RowCount = 0 Then";
if (_c.getRowCount()==0) { 
 //BA.debugLineNum = 919;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO GPS VALUES (?)\",";
_skmt.ExecNonQuery2("INSERT INTO GPS VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 };
 //BA.debugLineNum = 921;BA.debugLine="If user.Text.Trim = \"KMTS1\" Then";
if ((_user.getText().trim()).equals("KMTS1")) { 
 //BA.debugLineNum = 922;BA.debugLine="p_importarBDWA.Visible = True";
_p_importarbdwa.setVisible(__c.True);
 }else {
 //BA.debugLineNum = 924;BA.debugLine="p_importarBDWA.Visible = False";
_p_importarbdwa.setVisible(__c.False);
 };
 //BA.debugLineNum = 926;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 103;BA.debugLine="Public Sub Initialize";
 //BA.debugLineNum = 105;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(gunav2.keymon.com.mx.httpjob _job) throws Exception{
gunav2.keymon.com.mx.dbrequestmanager._dbresult _result = null;
Object[] _records = null;
String _cat_ve_version = "";
String _k = "";
String _id_almacen = "";
gunav2.keymon.com.mx.dbrequestmanager._dbresult _result1 = null;
String _cuantosencuesta = "";
String _sdate = "";
String _stime = "";
String _fecha_hoy = "";
String _name = "";
String _imei_base = "";
String _version = "";
String _versionador = "";
String _actualizaraplicacion = "";
String _cuenta = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
String _rutades = "";
String _almacendes = "";
String _cat_ep_id = "";
String _cat_ep_idtipopregunta = "";
String _cat_ce_descripcion = "";
String _cat_ep_pregunta = "";
String _cat_ep_res1_pred = "";
String _cat_ep_res2_pred = "";
String _cat_ep_res3_pred = "";
String _cat_ep_orden_pregunta = "";
 //BA.debugLineNum = 579;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 580;BA.debugLine="Log(\"JOBDONE MAINPAGE\")";
__c.LogImpl("41835009","JOBDONE MAINPAGE",0);
 //BA.debugLineNum = 581;BA.debugLine="Log(Job.Success)";
__c.LogImpl("41835010",BA.ObjectToString(_job._success /*boolean*/ ),0);
 //BA.debugLineNum = 582;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 //BA.debugLineNum = 583;BA.debugLine="LogColor(\"Error: \" & Job.tag & \" : \" & Subs.pars";
__c.LogImpl("41835012","Error: "+BA.ObjectToString(_job._tag /*Object*/ )+" : "+_subs._parsehttperror /*String*/ (ba,_job._errormessage /*String*/ ),__c.Colors.Red);
 }else {
 //BA.debugLineNum = 586;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("41835015","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 587;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 588;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 589;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
 //BA.debugLineNum = 590;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group10 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen10 = group10.getSize()
;int index10 = 0;
;
for (; index10 < groupLen10;index10++){
_records = (Object[])(group10.Get(index10));
 //BA.debugLineNum = 591;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
_skmt.ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 592;BA.debugLine="Dim CAT_VE_VERSION As String = records(result";
_cat_ve_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_VERSION"))))]);
 //BA.debugLineNum = 593;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVER";
_skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ve_version)}));
 }
};
 };
 //BA.debugLineNum = 597;BA.debugLine="If result.Tag = \"select_fechat\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("select_fechat"))) { 
 //BA.debugLineNum = 598;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group17 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen17 = group17.getSize()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_records = (Object[])(group17.Get(index17));
 //BA.debugLineNum = 599;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group18 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen18 = group18.getSize()
;int index18 = 0;
;
for (; index18 < groupLen18;index18++){
_k = BA.ObjectToString(group18.Get(index18));
 //BA.debugLineNum = 600;BA.debugLine="Log(\"select_fechat: \" & k & \": \" & records(r";
__c.LogImpl("41835029","select_fechat: "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 606;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 607;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 608;BA.debugLine="If result.Tag = \"agencia\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("agencia"))) { 
 //BA.debugLineNum = 609;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group27 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen27 = group27.getSize()
;int index27 = 0;
;
for (; index27 < groupLen27;index27++){
_records = (Object[])(group27.Get(index27));
 //BA.debugLineNum = 610;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("ID_ALMACEN"))))]);
 }
};
 };
 };
 //BA.debugLineNum = 615;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 616;BA.debugLine="Dim result1 As DBResult = B4XPages.MainPage.req";
_result1 = _b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._reqmanager /*gunav2.keymon.com.mx.dbrequestmanager*/ ._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 617;BA.debugLine="If result1.Tag = \"CHECAENCUESTA\" Then 'query ta";
if ((_result1.Tag /*Object*/ ).equals((Object)("CHECAENCUESTA"))) { 
 //BA.debugLineNum = 618;BA.debugLine="For Each records() As Object In result1.Rows";
{
final anywheresoftware.b4a.BA.IterableList group35 = _result1.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen35 = group35.getSize()
;int index35 = 0;
;
for (; index35 < groupLen35;index35++){
_records = (Object[])(group35.Get(index35));
 //BA.debugLineNum = 619;BA.debugLine="Dim CUANTOSENCUESTA As String = records(resul";
_cuantosencuesta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result1.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOS"))))]);
 //BA.debugLineNum = 620;BA.debugLine="Log(CUANTOSENCUESTA)";
__c.LogImpl("41835049",_cuantosencuesta,0);
 }
};
 //BA.debugLineNum = 622;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 623;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 624;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 625;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 626;BA.debugLine="If CUANTOSENCUESTA = \"0\" Then";
if ((_cuantosencuesta).equals("0")) { 
 //BA.debugLineNum = 627;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 628;BA.debugLine="cmd.Name =\"insert_drop_GV2_4\"";
_cmd.Name /*String*/  = "insert_drop_GV2_4";
 //BA.debugLineNum = 629;BA.debugLine="cmd.Parameters = Array As Object(usuario,Subs";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_usuario),(Object)(_subs._traeruta /*String*/ (ba)),(Object)(_sdate),(Object)(""),(Object)(_stime),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)("ENCUESTA"),(Object)(_almacen),(Object)(__c.Application.getVersionName()),(Object)(_starter._encuesta /*String*/ )};
 //BA.debugLineNum = 630;BA.debugLine="B4XPages.MainPage.reqManager.ExecuteCommand(c";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._reqmanager /*gunav2.keymon.com.mx.dbrequestmanager*/ ._executecommand /*String*/ (_cmd,(Object)("inst_drop"));
 };
 };
 };
 //BA.debugLineNum = 635;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 636;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 637;BA.debugLine="If result.Tag = \"fecha\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("fecha"))) { 
 //BA.debugLineNum = 638;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group54 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen54 = group54.getSize()
;int index54 = 0;
;
for (; index54 < groupLen54;index54++){
_records = (Object[])(group54.Get(index54));
 //BA.debugLineNum = 639;BA.debugLine="Dim FECHA_HOY As String = records(result.Colu";
_fecha_hoy = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("FECHA"))))]);
 //BA.debugLineNum = 640;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA")}));
 //BA.debugLineNum = 641;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA"),(Object)(_fecha_hoy)}));
 }
};
 };
 };
 //BA.debugLineNum = 646;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 647;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 648;BA.debugLine="If result.Tag = \"usuario\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuario"))) { 
 //BA.debugLineNum = 649;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group64 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen64 = group64.getSize()
;int index64 = 0;
;
for (; index64 < groupLen64;index64++){
_records = (Object[])(group64.Get(index64));
 //BA.debugLineNum = 650;BA.debugLine="Dim name As String = records(result.Columns.G";
_name = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("USUARIO"))))]);
 //BA.debugLineNum = 651;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_AGENCIA"))))]);
 //BA.debugLineNum = 652;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
_imei_base = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]);
 //BA.debugLineNum = 653;BA.debugLine="Log(records(result.Columns.Get(\"CAT_LO_IDTELE";
__c.LogImpl("41835082",BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]),0);
 }
};
 //BA.debugLineNum = 655;BA.debugLine="paso1 = 1";
_paso1 = BA.NumberToString(1);
 //BA.debugLineNum = 656;BA.debugLine="ToastMessageShow(name, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_name),__c.False);
 };
 };
 //BA.debugLineNum = 660;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 661;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 662;BA.debugLine="If result.Tag = \"usuario_10\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuario_10"))) { 
 //BA.debugLineNum = 663;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group77 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen77 = group77.getSize()
;int index77 = 0;
;
for (; index77 < groupLen77;index77++){
_records = (Object[])(group77.Get(index77));
 //BA.debugLineNum = 664;BA.debugLine="Dim name As String = records(result.Columns.G";
_name = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("USUARIO"))))]);
 //BA.debugLineNum = 665;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_AGENCIA"))))]);
 //BA.debugLineNum = 666;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
_imei_base = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]);
 //BA.debugLineNum = 667;BA.debugLine="Private version As String =  records(result.C";
_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_VERSION"))))]);
 //BA.debugLineNum = 668;BA.debugLine="Private versionador As String =  records(resu";
_versionador = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_VERSIONADOR"))))]);
 //BA.debugLineNum = 669;BA.debugLine="Private actualizarAplicacion As String =  rec";
_actualizaraplicacion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_ACTUALIZACION"))))]);
 }
};
 //BA.debugLineNum = 671;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("VERSION_NUEVA")}));
 //BA.debugLineNum = 672;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("VERSION_NUEVA"),(Object)(_version)}));
 //BA.debugLineNum = 673;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FORZAR_ACTUALIZACION")}));
 //BA.debugLineNum = 674;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FORZAR_ACTUALIZACION"),(Object)(_actualizaraplicacion)}));
 //BA.debugLineNum = 677;BA.debugLine="Log(\"|\"&name&\"|\")";
__c.LogImpl("41835106","|"+_name+"|",0);
 //BA.debugLineNum = 678;BA.debugLine="Log($\">>>>  GUARDAMOS NUEVA VERSION: ${version";
__c.LogImpl("41835107",(">>>>  GUARDAMOS NUEVA VERSION: "+__c.SmartStringFormatter("",(Object)(_version))+", "+__c.SmartStringFormatter("",(Object)(_actualizaraplicacion))+""),0);
 //BA.debugLineNum = 679;BA.debugLine="paso1 = 1";
_paso1 = BA.NumberToString(1);
 //BA.debugLineNum = 680;BA.debugLine="IMEI_BASE = \"\"";
_imei_base = "";
 //BA.debugLineNum = 681;BA.debugLine="IMEI = \"\"";
_imei = "";
 };
 //BA.debugLineNum = 684;BA.debugLine="If result.Tag = \"traeVersion\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("traeVersion"))) { 
 //BA.debugLineNum = 685;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group96 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen96 = group96.getSize()
;int index96 = 0;
;
for (; index96 < groupLen96;index96++){
_records = (Object[])(group96.Get(index96));
 //BA.debugLineNum = 686;BA.debugLine="Private version As String =  records(result.C";
_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_VERSION"))))]);
 //BA.debugLineNum = 687;BA.debugLine="Private actualizarAplicacion As String =  rec";
_actualizaraplicacion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_AL_ACTUALIZACION"))))]);
 }
};
 //BA.debugLineNum = 689;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("VERSION_NUEVA")}));
 //BA.debugLineNum = 690;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("VERSION_NUEVA"),(Object)(_version)}));
 //BA.debugLineNum = 691;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FORZAR_ACTUALIZACION")}));
 //BA.debugLineNum = 692;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FORZAR_ACTUALIZACION"),(Object)(_actualizaraplicacion)}));
 //BA.debugLineNum = 693;BA.debugLine="Log($\">>>>  GUARDAMOS NUEVA VERSION: ${version";
__c.LogImpl("41835122",(">>>>  GUARDAMOS NUEVA VERSION: "+__c.SmartStringFormatter("",(Object)(_version))+", "+__c.SmartStringFormatter("",(Object)(_actualizaraplicacion))+""),0);
 };
 };
 //BA.debugLineNum = 697;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 698;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 699;BA.debugLine="If result.Tag = \"geopass\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("geopass"))) { 
 //BA.debugLineNum = 700;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group110 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen110 = group110.getSize()
;int index110 = 0;
;
for (; index110 < groupLen110;index110++){
_records = (Object[])(group110.Get(index110));
 //BA.debugLineNum = 701;BA.debugLine="Dim cuenta As String = records(result.Columns";
_cuenta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUENTA"))))]);
 }
};
 //BA.debugLineNum = 703;BA.debugLine="If cuenta = \"1\" Then";
if ((_cuenta).equals("1")) { 
 //BA.debugLineNum = 704;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 705;BA.debugLine="B4XSwitch2.Value = True";
_b4xswitch2._setvalue /*boolean*/ (__c.True);
 //BA.debugLineNum = 706;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE GPS SET HABILITADO";
_skmt.ExecNonQuery2("UPDATE GPS SET HABILITADO = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(1)}));
 //BA.debugLineNum = 707;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 708;BA.debugLine="Private c2 As Cursor = skmt.ExecQuery(\"select";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select distinct CAT_CL_RUTA from kmt_info3 where CAT_CL_RUTA not in (select * from ruta_suplencia)")));
 //BA.debugLineNum = 709;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 710;BA.debugLine="Private rutades As String = c2.GetString(\"CAT";
_rutades = _c2.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 711;BA.debugLine="c2.Close";
_c2.Close();
 //BA.debugLineNum = 712;BA.debugLine="Private c2 As Cursor = skmt.ExecQuery(\"SELECT";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT ID_ALMACEN FROM CAT_ALMACEN")));
 //BA.debugLineNum = 713;BA.debugLine="c2.Position = 0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 714;BA.debugLine="Private almacendes As String = c2.GetString(\"";
_almacendes = _c2.GetString("ID_ALMACEN");
 //BA.debugLineNum = 715;BA.debugLine="c2.Close";
_c2.Close();
 //BA.debugLineNum = 716;BA.debugLine="Dim cmd As DBCommand";
_cmd = new gunav2.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 717;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 718;BA.debugLine="cmd.Name = \"delete_geoPass_GUNA\"";
_cmd.Name /*String*/  = "delete_geoPass_GUNA";
 //BA.debugLineNum = 720;BA.debugLine="cmd.Parameters = Array As Object( almacendes,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacendes),(Object)(_rutades)};
 //BA.debugLineNum = 721;BA.debugLine="reqManager.ExecuteCommand(cmd , \"traeGeoPass\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("traeGeoPass"));
 }else if((_cuenta).equals("0")) { 
 //BA.debugLineNum = 723;BA.debugLine="MsgboxAsync(\"Codigo incorrecto\",\"Atención\")";
__c.MsgboxAsync(BA.ObjectToCharSequence("Codigo incorrecto"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 724;BA.debugLine="p_validacion.Visible = False";
_p_validacion.setVisible(__c.False);
 //BA.debugLineNum = 725;BA.debugLine="B4XSwitch2.Value = False";
_b4xswitch2._setvalue /*boolean*/ (__c.False);
 //BA.debugLineNum = 726;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE GPS SET HABILITADO";
_skmt.ExecNonQuery2("UPDATE GPS SET HABILITADO = (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(0)}));
 //BA.debugLineNum = 727;BA.debugLine="et_codigo.Text = \"\"";
_et_codigo.setText(BA.ObjectToCharSequence(""));
 };
 };
 };
 //BA.debugLineNum = 732;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 733;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*gunav2.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 734;BA.debugLine="If result.Tag = \"carga_encuesta\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("carga_encuesta"))) { 
 //BA.debugLineNum = 735;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group143 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen143 = group143.getSize()
;int index143 = 0;
;
for (; index143 < groupLen143;index143++){
_records = (Object[])(group143.Get(index143));
 //BA.debugLineNum = 736;BA.debugLine="Dim CAT_EP_ID As String = records(result.COLU";
_cat_ep_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_ID"))))]);
 //BA.debugLineNum = 737;BA.debugLine="Dim CAT_EP_IDTIPOPREGUNTA As String = records";
_cat_ep_idtipopregunta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_IDTIPOPREGUNTA"))))]);
 //BA.debugLineNum = 738;BA.debugLine="Dim CAT_CE_DESCRIPCION As String = records(re";
_cat_ce_descripcion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CE_DESCRIPCION"))))]);
 //BA.debugLineNum = 739;BA.debugLine="Dim CAT_EP_PREGUNTA As String = records(resul";
_cat_ep_pregunta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_PREGUNTA"))))]);
 //BA.debugLineNum = 740;BA.debugLine="Dim CAT_EP_RES1_PRED As String = records(resu";
_cat_ep_res1_pred = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_RES1_PRED"))))]);
 //BA.debugLineNum = 741;BA.debugLine="Dim CAT_EP_RES2_PRED As String = records(resu";
_cat_ep_res2_pred = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_RES2_PRED"))))]);
 //BA.debugLineNum = 742;BA.debugLine="Dim CAT_EP_RES3_PRED As String = records(resu";
_cat_ep_res3_pred = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_RES3_PRED"))))]);
 //BA.debugLineNum = 743;BA.debugLine="Dim CAT_EP_ORDEN_PREGUNTA As String = records";
_cat_ep_orden_pregunta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_EP_ORDEN_PREGUNTA"))))]);
 //BA.debugLineNum = 744;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ENCUESTA_";
_skmt.ExecNonQuery2("INSERT INTO CAT_ENCUESTA_PREGUNTA (CAT_EP_ID ,CAT_EP_IDTIPOPREGUNTA ,CAT_CE_DESCRIPCION ,CAT_EP_PREGUNTA ,CAT_EP_RES1_PRED ,CAT_EP_RES2_PRED ,CAT_EP_RES3_PRED ,CAT_EP_ORDEN_PREGUNTA ) VALUES (?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ep_id),(Object)(_cat_ep_idtipopregunta),(Object)(_cat_ce_descripcion),(Object)(_cat_ep_pregunta),(Object)(_cat_ep_res1_pred),(Object)(_cat_ep_res2_pred),(Object)(_cat_ep_res3_pred),(Object)(_cat_ep_orden_pregunta)}));
 }
};
 };
 };
 //BA.debugLineNum = 748;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 };
 //BA.debugLineNum = 751;BA.debugLine="Log($\"Paso1 = ${paso1} - Name: ${name} - IMEI: ${";
__c.LogImpl("41835180",("Paso1 = "+__c.SmartStringFormatter("",(Object)(_paso1))+" - Name: "+__c.SmartStringFormatter("",(Object)(_name))+" - IMEI: "+__c.SmartStringFormatter("",(Object)(_imei))+" - IMEI_BASE: "+__c.SmartStringFormatter("",(Object)(_imei_base))+""),0);
 //BA.debugLineNum = 752;BA.debugLine="If paso1 = 1 Then";
if ((_paso1).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 753;BA.debugLine="If IMEI = \"\" Then";
if ((_imei).equals("")) { 
 //BA.debugLineNum = 754;BA.debugLine="If user.Text = \"KMTS1\" Then name = \"OKActivo\"";
if ((_user.getText()).equals("KMTS1")) { 
_name = "OKActivo";};
 //BA.debugLineNum = 755;BA.debugLine="If name = \"OKActivo\"  Then";
if ((_name).equals("OKActivo")) { 
 //BA.debugLineNum = 756;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
_skmt.ExecNonQuery("delete from usuarioa");
 //BA.debugLineNum = 757;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUE";
_skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_user.getText()),(Object)(_pass.getText())}));
 //BA.debugLineNum = 758;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
_skmt.ExecNonQuery("delete from cat_almacen");
 //BA.debugLineNum = 759;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID";
_skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_id_almacen)}));
 //BA.debugLineNum = 760;BA.debugLine="usuario = user.Text";
_usuario = _user.getText();
 //BA.debugLineNum = 761;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }else if((_name).equals("OKExpirado")) { 
 //BA.debugLineNum = 763;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administrad";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else if((_name).equals("OKCancelado")) { 
 //BA.debugLineNum = 765;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administra";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else {
 //BA.debugLineNum = 767;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'Ig";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 };
 //BA.debugLineNum = 769;BA.debugLine="paso1 = 0";
_paso1 = BA.NumberToString(0);
 }else {
 //BA.debugLineNum = 771;BA.debugLine="If name = \"OKActivo\" & IMEI And  IMEI = IMEI_BA";
if ((_name).equals("OKActivo"+_imei) && (_imei).equals(_imei_base)) { 
 //BA.debugLineNum = 772;BA.debugLine="If name = \"OKActivo\" & IMEI Then";
if ((_name).equals("OKActivo"+_imei)) { 
 //BA.debugLineNum = 773;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
_skmt.ExecNonQuery("delete from usuarioa");
 //BA.debugLineNum = 774;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALU";
_skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_user.getText()),(Object)(_pass.getText())}));
 //BA.debugLineNum = 775;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
_skmt.ExecNonQuery("delete from cat_almacen");
 //BA.debugLineNum = 776;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(I";
_skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_id_almacen)}));
 //BA.debugLineNum = 777;BA.debugLine="usuario = user.Text";
_usuario = _user.getText();
 //BA.debugLineNum = 778;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }else if((_name).equals("OKExpirado"+_imei)) { 
 //BA.debugLineNum = 780;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administra";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else if((_name).equals("OKCancelado"+_imei)) { 
 //BA.debugLineNum = 782;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administr";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else {
 //BA.debugLineNum = 784;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'i";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 };
 //BA.debugLineNum = 786;BA.debugLine="paso1 = 0";
_paso1 = BA.NumberToString(0);
 }else if((_name).equals("OKActivo")) { 
 //BA.debugLineNum = 788;BA.debugLine="Msgbox(\"Telefono no VALIDO!\",\"\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Telefono no VALIDO!"),BA.ObjectToCharSequence(""),ba);
 }else {
 //BA.debugLineNum = 790;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 };
 };
 };
 //BA.debugLineNum = 794;BA.debugLine="End Sub";
return "";
}
public String  _lv_server_itemclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 941;BA.debugLine="Private Sub lv_server_ItemClick (Position As Int,";
 //BA.debugLineNum = 942;BA.debugLine="Starter.server = Value";
_starter._server /*String*/  = BA.ObjectToString(_value);
 //BA.debugLineNum = 943;BA.debugLine="l_server.Text = Value";
_l_server.setText(BA.ObjectToCharSequence(_value));
 //BA.debugLineNum = 944;BA.debugLine="et_server.Text = Value";
_et_server.setText(BA.ObjectToCharSequence(_value));
 //BA.debugLineNum = 945;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
_skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("DBReqServer")}));
 //BA.debugLineNum = 946;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
_skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("DBReqServer"),_value}));
 //BA.debugLineNum = 947;BA.debugLine="Starter.reqManager.Initialize(Me, Value)";
_starter._reqmanager /*gunav2.keymon.com.mx.dbrequestmanager*/ ._initialize /*String*/ (ba,this,BA.ObjectToString(_value));
 //BA.debugLineNum = 948;BA.debugLine="ToastMessageShow(\"Servidor modificado\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Servidor modificado"),__c.False);
 //BA.debugLineNum = 949;BA.debugLine="End Sub";
return "";
}
public String  _muestraprogreso(String _mensaje) throws Exception{
 //BA.debugLineNum = 894;BA.debugLine="Sub muestraProgreso(mensaje As String)";
 //BA.debugLineNum = 895;BA.debugLine="ProgressDialogShow(mensaje)";
__c.ProgressDialogShow(ba,BA.ObjectToCharSequence(_mensaje));
 //BA.debugLineNum = 896;BA.debugLine="End Sub";
return "";
}
public String  _ocultaprogreso() throws Exception{
 //BA.debugLineNum = 899;BA.debugLine="Sub ocultaProgreso";
 //BA.debugLineNum = 900;BA.debugLine="ProgressDialogHide";
__c.ProgressDialogHide();
 //BA.debugLineNum = 901;BA.debugLine="End Sub";
return "";
}
public String  _p_validacion_click() throws Exception{
 //BA.debugLineNum = 1004;BA.debugLine="Private Sub p_validacion_Click";
 //BA.debugLineNum = 1005;BA.debugLine="End Sub";
return "";
}
public String  _pdf_click() throws Exception{
 //BA.debugLineNum = 830;BA.debugLine="Sub PDF_Click";
 //BA.debugLineNum = 832;BA.debugLine="End Sub";
return "";
}
public String  _popupmenu_dismiss() throws Exception{
 //BA.debugLineNum = 817;BA.debugLine="Sub PopupMenu_Dismiss";
 //BA.debugLineNum = 818;BA.debugLine="ToastMessageShow(\"PopupMenu dismissed\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("PopupMenu dismissed"),__c.False);
 //BA.debugLineNum = 819;BA.debugLine="End Sub";
return "";
}
public boolean  _popupmenu_menuitemclick(int _itemid) throws Exception{
 //BA.debugLineNum = 821;BA.debugLine="Sub PopupMenu_MenuItemClick (ItemId As Int) As Boo";
 //BA.debugLineNum = 822;BA.debugLine="ToastMessageShow(\"Item \" & ItemId & \" clicked.\",";
__c.ToastMessageShow(BA.ObjectToCharSequence("Item "+BA.NumberToString(_itemid)+" clicked."),__c.False);
 //BA.debugLineNum = 823;BA.debugLine="Return False";
if (true) return __c.False;
 //BA.debugLineNum = 824;BA.debugLine="End Sub";
return false;
}
public void  _revisaactualizacion() throws Exception{
ResumableSub_revisaActualizacion rsub = new ResumableSub_revisaActualizacion(this);
rsub.resume(ba, null);
}
public static class ResumableSub_revisaActualizacion extends BA.ResumableSub {
public ResumableSub_revisaActualizacion(gunav2.keymon.com.mx.b4xmainpage parent) {
this.parent = parent;
}
gunav2.keymon.com.mx.b4xmainpage parent;
String _link = "";
gunav2.keymon.com.mx.httpjob _j = null;
String[] _app = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
try {

        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 1069;BA.debugLine="LogColor(\"Buscarmos archivo Ver\", Colors.red)";
parent.__c.LogImpl("43211270","Buscarmos archivo Ver",parent.__c.Colors.Red);
 //BA.debugLineNum = 1070;BA.debugLine="Private link As String = \"https://keymon.net/movi";
_link = "https://keymon.net/movil/guna/gunaPreventa.ver";
 //BA.debugLineNum = 1071;BA.debugLine="Wait For (traeArchivoVer(Me, link)) JobDone (j As";
parent.__c.WaitFor("jobdone", ba, this, (Object)(parent._traearchivover(parent,_link)));
this.state = 28;
return;
case 28:
//C
this.state = 1;
_j = (gunav2.keymon.com.mx.httpjob) result[0];
;
 //BA.debugLineNum = 1072;BA.debugLine="If j.Success Then";
if (true) break;

case 1:
//if
this.state = 27;
if (_j._success /*boolean*/ ) { 
this.state = 3;
}else {
this.state = 22;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 1073;BA.debugLine="LogColor(\"Archivo .VER encontrado.\", Colors.red)";
parent.__c.LogImpl("43211274","Archivo .VER encontrado.",parent.__c.Colors.Red);
 //BA.debugLineNum = 1074;BA.debugLine="Try";
if (true) break;

case 4:
//try
this.state = 20;
this.catchState = 15;
this.state = 6;
if (true) break;

case 6:
//C
this.state = 7;
this.catchState = 15;
 //BA.debugLineNum = 1075;BA.debugLine="Dim app() As String = Regex.Split(Chr(9),j.GetS";
_app = parent.__c.Regex.Split(BA.ObjectToString(parent.__c.Chr((int) (9))),_j._getstring /*String*/ ());
 //BA.debugLineNum = 1077;BA.debugLine="Starter.newApp.appLink = app(3)   'Liga a nuevo";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .appLink /*String*/  = _app[(int) (3)];
 //BA.debugLineNum = 1078;BA.debugLine="Starter.newApp.newMsg = app(1)  'Texto de que h";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .newMsg /*String*/  = _app[(int) (1)];
 //BA.debugLineNum = 1079;BA.debugLine="Starter.newApp.okMsg = app(2)    'Texto de app";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .okMsg /*String*/  = _app[(int) (2)];
 //BA.debugLineNum = 1080;BA.debugLine="Starter.newApp.version = app(0)   'Version actu";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .version /*String*/  = _app[(int) (0)];
 //BA.debugLineNum = 1081;BA.debugLine="Log($\"Application.VersionName=${Application.Ver";
parent.__c.LogImpl("43211282",("Application.VersionName="+parent.__c.SmartStringFormatter("",(Object)(parent.__c.Application.getVersionName()))+", newApp="+parent.__c.SmartStringFormatter("",(Object)(parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ ))+""),0);
 //BA.debugLineNum = 1083;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
parent.__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1084;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES w";
parent._skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("REVISION_APK")}));
 //BA.debugLineNum = 1085;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(C";
parent._skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("REVISION_APK"),(Object)(parent.__c.DateTime.Date(parent.__c.DateTime.getNow()))}));
 //BA.debugLineNum = 1087;BA.debugLine="If Starter.newApp.version = Application.Version";
if (true) break;

case 7:
//if
this.state = 10;
if ((parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .version /*String*/ ).equals(parent.__c.Application.getVersionName())) { 
this.state = 9;
}if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 1088;BA.debugLine="Starter.newApp.update = False";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .update /*boolean*/  = parent.__c.False;
 //BA.debugLineNum = 1089;BA.debugLine="LogColor(\"No hay nuevo APK\", Colors.red)";
parent.__c.LogImpl("43211290","No hay nuevo APK",parent.__c.Colors.Red);
 //BA.debugLineNum = 1090;BA.debugLine="B4XPages.MainPage.Entrar.Enabled = True";
parent._b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._entrar /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setEnabled(parent.__c.True);
 if (true) break;
;
 //BA.debugLineNum = 1092;BA.debugLine="If Starter.newApp.version <> Application.Versio";

case 10:
//if
this.state = 13;
if ((parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .version /*String*/ ).equals(parent.__c.Application.getVersionName()) == false) { 
this.state = 12;
}if (true) break;

case 12:
//C
this.state = 13;
 //BA.debugLineNum = 1093;BA.debugLine="Starter.newApp.update = True";
parent._starter._newapp /*gunav2.keymon.com.mx.appupdater._mnewversion*/ .update /*boolean*/  = parent.__c.True;
 //BA.debugLineNum = 1094;BA.debugLine="LogColor(\"Hay nuevo APK\", Colors.red)";
parent.__c.LogImpl("43211295","Hay nuevo APK",parent.__c.Colors.Red);
 //BA.debugLineNum = 1095;BA.debugLine="b_actualizacion.Visible = True";
parent._b_actualizacion.setVisible(parent.__c.True);
 //BA.debugLineNum = 1096;BA.debugLine="CallSubDelayed(appUpdater, \"download_newApk\")";
parent.__c.CallSubDelayed(ba,(Object)(parent._appupdater.getObject()),"download_newApk");
 if (true) break;

case 13:
//C
this.state = 20;
;
 if (true) break;

case 15:
//C
this.state = 16;
this.catchState = 0;
 //BA.debugLineNum = 1099;BA.debugLine="LogColor(\"appUpdater(), Job Failed, error  \" &";
parent.__c.LogImpl("43211300","appUpdater(), Job Failed, error  "+parent.__c.LastException(ba).getMessage(),parent.__c.Colors.Red);
 //BA.debugLineNum = 1100;BA.debugLine="If Msgbox2(\"Hubo un error: \" & LastException.Me";
if (true) break;

case 16:
//if
this.state = 19;
if (parent.__c.Msgbox2(BA.ObjectToCharSequence("Hubo un error: "+parent.__c.LastException(ba).getMessage()),BA.ObjectToCharSequence("FALLO LA ACTUALIZACIÓN"),"OK","","",(android.graphics.Bitmap)(parent.__c.Null),ba)==parent.__c.DialogResponse.POSITIVE) { 
this.state = 18;
}if (true) break;

case 18:
//C
this.state = 19;
 //BA.debugLineNum = 1101;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
 if (true) break;

case 19:
//C
this.state = 20;
;
 if (true) break;
if (true) break;

case 20:
//C
this.state = 27;
this.catchState = 0;
;
 if (true) break;

case 22:
//C
this.state = 23;
 //BA.debugLineNum = 1106;BA.debugLine="If Msgbox2(\"Es necesaria una conexión a internet";
if (true) break;

case 23:
//if
this.state = 26;
if (parent.__c.Msgbox2(BA.ObjectToCharSequence("Es necesaria una conexión a internet, por favor revise su conexión y vuelva a intentar"),BA.ObjectToCharSequence("ATENCIÓN"),"OK","","",(android.graphics.Bitmap)(parent.__c.Null),ba)==parent.__c.DialogResponse.POSITIVE) { 
this.state = 25;
}if (true) break;

case 25:
//C
this.state = 26;
 //BA.debugLineNum = 1107;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
 if (true) break;

case 26:
//C
this.state = 27;
;
 if (true) break;

case 27:
//C
this.state = -1;
;
 //BA.debugLineNum = 1110;BA.debugLine="j.Release";
_j._release /*String*/ ();
 //BA.debugLineNum = 1111;BA.debugLine="End Sub";
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
ba.setLastException(e0);}
            }
        }
    }
}
public gunav2.keymon.com.mx.httpjob  _traearchivover(Object _callback,String _link) throws Exception{
gunav2.keymon.com.mx.httpjob _j = null;
 //BA.debugLineNum = 1119;BA.debugLine="Sub traeArchivoVer (Callback As Object, link As St";
 //BA.debugLineNum = 1120;BA.debugLine="Dim j As HttpJob";
_j = new gunav2.keymon.com.mx.httpjob();
 //BA.debugLineNum = 1121;BA.debugLine="j.Initialize(\"\", Callback)";
_j._initialize /*String*/ (ba,"",_callback);
 //BA.debugLineNum = 1122;BA.debugLine="j.GetRequest.Timeout = 5000";
_j._getrequest /*anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest*/ ().setTimeout((int) (5000));
 //BA.debugLineNum = 1123;BA.debugLine="j.Download(link)";
_j._download /*String*/ (_link);
 //BA.debugLineNum = 1124;BA.debugLine="Return j";
if (true) return _j;
 //BA.debugLineNum = 1125;BA.debugLine="End Sub";
return null;
}
public String  _user_enterpressed() throws Exception{
 //BA.debugLineNum = 575;BA.debugLine="Private Sub user_EnterPressed";
 //BA.debugLineNum = 576;BA.debugLine="If user.text = \"KMTS1\" Then Entrar.Enabled = True";
if ((_user.getText()).equals("KMTS1")) { 
_entrar.setEnabled(__c.True);};
 //BA.debugLineNum = 577;BA.debugLine="End Sub";
return "";
}
public boolean  _versionrevisadahoy() throws Exception{
boolean _revisada = false;
 //BA.debugLineNum = 1128;BA.debugLine="Sub versionRevisadaHoy As Boolean";
 //BA.debugLineNum = 1129;BA.debugLine="Private revisada As Boolean = False";
_revisada = __c.False;
 //BA.debugLineNum = 1130;BA.debugLine="c = skmt.ExecQuery2(\"select CAT_VA_VALOR from CAT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"REVISION_APK"})));
 //BA.debugLineNum = 1131;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1132;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1133;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 1134;BA.debugLine="If DateTime.Date(DateTime.Now) = c.GetString(\"CA";
if ((__c.DateTime.Date(__c.DateTime.getNow())).equals(_c.GetString("CAT_VA_VALOR"))) { 
 //BA.debugLineNum = 1135;BA.debugLine="revisada = True";
_revisada = __c.True;
 //BA.debugLineNum = 1136;BA.debugLine="LogColor(\"La versión ya se revisó el día de hoy";
__c.LogImpl("43342344","La versión ya se revisó el día de hoy.",__c.Colors.Red);
 };
 };
 //BA.debugLineNum = 1142;BA.debugLine="Return False";
if (true) return __c.False;
 //BA.debugLineNum = 1144;BA.debugLine="End Sub";
return false;
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
	return _jobdone((gunav2.keymon.com.mx.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
