package keymon.lat.medicomed;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class b4xmainpage_subs_0 {


public static RemoteObject  _b_apk_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_apk_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,621);
if (RapidSub.canDelegate("b_apk_click")) { return __ref.runUserSub(false, "b4xmainpage","b_apk_click", __ref);}
 BA.debugLineNum = 621;BA.debugLine="Sub b_apk_Click";
Debug.ShouldStop(4096);
 BA.debugLineNum = 622;BA.debugLine="StartService(appUpdater)";
Debug.ShouldStop(8192);
b4xmainpage.__c.runVoidMethod ("StartService",__ref.getField(false, "ba"),(Object)((b4xmainpage._appupdater.getObject())));
 BA.debugLineNum = 623;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _b_enviobd_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_envioBD_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,678);
if (RapidSub.canDelegate("b_enviobd_click")) { __ref.runUserSub(false, "b4xmainpage","b_enviobd_click", __ref); return;}
ResumableSub_b_envioBD_Click rsub = new ResumableSub_b_envioBD_Click(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_b_envioBD_Click extends BA.ResumableSub {
public ResumableSub_b_envioBD_Click(keymon.lat.medicomed.b4xmainpage parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
keymon.lat.medicomed.b4xmainpage parent;
RemoteObject _filename = RemoteObject.createImmutable("");
RemoteObject _email = RemoteObject.declareNull("anywheresoftware.b4a.phone.Phone.Email");
RemoteObject _in = RemoteObject.declareNull("anywheresoftware.b4a.objects.IntentWrapper");

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("b_envioBD_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,678);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

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

case 0:
//C
this.state = -1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 681;BA.debugLine="Dim FileName As String = \"kmt.db\"";
Debug.ShouldStop(256);
_filename = BA.ObjectToString("kmt.db");Debug.locals.put("FileName", _filename);Debug.locals.put("FileName", _filename);
 BA.debugLineNum = 683;BA.debugLine="Log(\"xxxxxx:\"&Provider.SharedFolder)";
Debug.ShouldStop(1024);
parent.__c.runVoidMethod ("LogImpl","32097157",RemoteObject.concat(RemoteObject.createImmutable("xxxxxx:"),__ref.getField(false,"_provider" /*RemoteObject*/ ).getField(true,"_sharedfolder" /*RemoteObject*/ )),0);
 BA.debugLineNum = 684;BA.debugLine="Sleep(1000)";
Debug.ShouldStop(2048);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "b4xmainpage", "b_enviobd_click"),BA.numberCast(int.class, 1000));
this.state = 1;
return;
case 1:
//C
this.state = -1;
;
 BA.debugLineNum = 685;BA.debugLine="File.Copy(File.DirInternal, FileName, Provider.Sh";
Debug.ShouldStop(4096);
parent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(parent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(_filename),(Object)(__ref.getField(false,"_provider" /*RemoteObject*/ ).getField(true,"_sharedfolder" /*RemoteObject*/ )),(Object)(_filename));
 BA.debugLineNum = 686;BA.debugLine="Dim email As Email";
Debug.ShouldStop(8192);
_email = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.Email");Debug.locals.put("email", _email);
 BA.debugLineNum = 687;BA.debugLine="email.To.Add(\"cheveguerra@gmail.com\")";
Debug.ShouldStop(16384);
_email.getField(false,"To").runVoidMethod ("Add",(Object)((RemoteObject.createImmutable("cheveguerra@gmail.com"))));
 BA.debugLineNum = 688;BA.debugLine="email.Subject = \"subject\"";
Debug.ShouldStop(32768);
_email.setField ("Subject",BA.ObjectToString("subject"));
 BA.debugLineNum = 689;BA.debugLine="email.Attachments.Add(Provider.GetFileUri(FileNam";
Debug.ShouldStop(65536);
_email.getField(false,"Attachments").runVoidMethod ("Add",(Object)(__ref.getField(false,"_provider" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.fileprovider.class, "_getfileuri" /*RemoteObject*/ ,(Object)(_filename))));
 BA.debugLineNum = 691;BA.debugLine="Dim in As Intent = email.GetIntent";
Debug.ShouldStop(262144);
_in = RemoteObject.createNew ("anywheresoftware.b4a.objects.IntentWrapper");
_in = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.IntentWrapper"), _email.runMethod(false,"GetIntent"));Debug.locals.put("in", _in);Debug.locals.put("in", _in);
 BA.debugLineNum = 692;BA.debugLine="in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION";
Debug.ShouldStop(524288);
_in.runMethod(true,"setFlags",BA.numberCast(int.class, 1));
 BA.debugLineNum = 693;BA.debugLine="StartActivity(in)";
Debug.ShouldStop(1048576);
parent.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((_in.getObject())));
 BA.debugLineNum = 694;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b_menu_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_menu_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,547);
if (RapidSub.canDelegate("b_menu_click")) { return __ref.runUserSub(false, "b4xmainpage","b_menu_click", __ref);}
 BA.debugLineNum = 547;BA.debugLine="Sub b_menu_Click";
Debug.ShouldStop(4);
 BA.debugLineNum = 548;BA.debugLine="PopupMenu.Show";
Debug.ShouldStop(8);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("Show");
 BA.debugLineNum = 549;BA.debugLine="End Sub";
Debug.ShouldStop(16);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_regesar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("b_regesar_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,644);
if (RapidSub.canDelegate("b_regesar_click")) { return __ref.runUserSub(false, "b4xmainpage","b_regesar_click", __ref);}
 BA.debugLineNum = 644;BA.debugLine="Sub b_regesar_Click";
Debug.ShouldStop(8);
 BA.debugLineNum = 645;BA.debugLine="p_appUpdate.Visible = False";
Debug.ShouldStop(16);
__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"setVisible",b4xmainpage.__c.getField(true,"False"));
 BA.debugLineNum = 646;BA.debugLine="Subs.panelVisible(p_Main,0,0)";
Debug.ShouldStop(32);
b4xmainpage._subs.runVoidMethod ("_panelvisible" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_p_main" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)));
 BA.debugLineNum = 647;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _b_server_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B_SERVER_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,653);
if (RapidSub.canDelegate("b_server_click")) { return __ref.runUserSub(false, "b4xmainpage","b_server_click", __ref);}
 BA.debugLineNum = 653;BA.debugLine="Sub B_SERVER_Click";
Debug.ShouldStop(4096);
 BA.debugLineNum = 654;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
Debug.ShouldStop(8192);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("SERVER"))})))));
 BA.debugLineNum = 655;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
Debug.ShouldStop(16384);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {RemoteObject.createImmutable(("SERVER")),(__ref.getField(false,"_et_server" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 656;BA.debugLine="Starter.server = et_server.text";
Debug.ShouldStop(32768);
b4xmainpage._starter._server /*RemoteObject*/  = __ref.getField(false,"_et_server" /*RemoteObject*/ ).runMethod(true,"getText");
 BA.debugLineNum = 657;BA.debugLine="If Logger Then Log(\"Inicializamos reqManager con";
Debug.ShouldStop(65536);
if (__ref.getField(true,"_logger" /*RemoteObject*/ ).<Boolean>get().booleanValue()) { 
b4xmainpage.__c.runVoidMethod ("LogImpl","31900548",RemoteObject.concat(RemoteObject.createImmutable("Inicializamos reqManager con "),b4xmainpage._starter._server /*RemoteObject*/ ),0);};
 BA.debugLineNum = 658;BA.debugLine="reqManager.Initialize(Me, Starter.server)";
Debug.ShouldStop(131072);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)(b4xmainpage._starter._server /*RemoteObject*/ ));
 BA.debugLineNum = 659;BA.debugLine="CallSubDelayed(Starter, \"reinicializaReqManager\")";
Debug.ShouldStop(262144);
b4xmainpage.__c.runVoidMethod ("CallSubDelayed",__ref.getField(false, "ba"),(Object)((b4xmainpage._starter.getObject())),(Object)(RemoteObject.createImmutable("reinicializaReqManager")));
 BA.debugLineNum = 660;BA.debugLine="Subs.panelVisible(p_Main,0,0)";
Debug.ShouldStop(524288);
b4xmainpage._subs.runVoidMethod ("_panelvisible" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_p_main" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)));
 BA.debugLineNum = 661;BA.debugLine="p_appUpdate.Visible = False";
Debug.ShouldStop(1048576);
__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"setVisible",b4xmainpage.__c.getField(true,"False"));
 BA.debugLineNum = 663;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _b4xpage_appear(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,244);
if (RapidSub.canDelegate("b4xpage_appear")) { __ref.runUserSub(false, "b4xmainpage","b4xpage_appear", __ref); return;}
ResumableSub_B4XPage_Appear rsub = new ResumableSub_B4XPage_Appear(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_B4XPage_Appear extends BA.ResumableSub {
public ResumableSub_B4XPage_Appear(keymon.lat.medicomed.b4xmainpage parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
keymon.lat.medicomed.b4xmainpage parent;
RemoteObject _ph = RemoteObject.declareNull("anywheresoftware.b4a.phone.Phone");
RemoteObject _deviceid = RemoteObject.createImmutable("");
RemoteObject _sdate = RemoteObject.createImmutable("");
RemoteObject _stime = RemoteObject.createImmutable("");

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Appear (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,244);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

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

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 245;BA.debugLine="If Starter.muestraProgreso = 1 Then";
Debug.ShouldStop(1048576);
if (true) break;

case 1:
//if
this.state = 4;
if (RemoteObject.solveBoolean("=",parent._starter._muestraprogreso /*RemoteObject*/ ,BA.NumberToString(1))) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 246;BA.debugLine="muestraProgreso(\"Descargando actualización\")";
Debug.ShouldStop(2097152);
__ref.runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_muestraprogreso" /*RemoteObject*/ ,(Object)(RemoteObject.createImmutable("Descargando actualización")));
 BA.debugLineNum = 247;BA.debugLine="Starter.muestraProgreso = 0";
Debug.ShouldStop(4194304);
parent._starter._muestraprogreso /*RemoteObject*/  = BA.NumberToString(0);
 if (true) break;

case 4:
//C
this.state = 5;
;
 BA.debugLineNum = 249;BA.debugLine="Dim ph As Phone 'Get Id Device";
Debug.ShouldStop(16777216);
_ph = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");Debug.locals.put("ph", _ph);
 BA.debugLineNum = 250;BA.debugLine="Dim DeviceID As String = ph.GetSettings(\"android_";
Debug.ShouldStop(33554432);
_deviceid = _ph.runMethod(true,"GetSettings",(Object)(RemoteObject.createImmutable("android_id"))).runMethod(true,"toUpperCase");Debug.locals.put("DeviceID", _deviceid);Debug.locals.put("DeviceID", _deviceid);
 BA.debugLineNum = 251;BA.debugLine="LogColor($\"//////////////////   DeviceID: ${Devic";
Debug.ShouldStop(67108864);
parent.__c.runVoidMethod ("LogImpl","3786439",(RemoteObject.concat(RemoteObject.createImmutable("//////////////////   DeviceID: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_deviceid))),RemoteObject.createImmutable(" ////////////////// "))),parent.__c.getField(false,"Colors").getField(true,"Blue"));
 BA.debugLineNum = 252;BA.debugLine="server = Starter.server";
Debug.ShouldStop(134217728);
__ref.setField ("_server" /*RemoteObject*/ ,parent._starter._server /*RemoteObject*/ );
 BA.debugLineNum = 253;BA.debugLine="reqManager.Initialize(Me, Starter.server)";
Debug.ShouldStop(268435456);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)(parent._starter._server /*RemoteObject*/ ));
 BA.debugLineNum = 254;BA.debugLine="tgl.Initialize()";
Debug.ShouldStop(536870912);
__ref.getField(false,"_tgl" /*RemoteObject*/ ).runVoidMethod ("Initialize",__ref.getField(false, "ba"));
 BA.debugLineNum = 255;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
Debug.ShouldStop(1073741824);
if (true) break;

case 5:
//if
this.state = 8;
if (parent.__c.runMethod(true,"Not",(Object)(parent._starter._gps /*RemoteObject*/ .runMethod(true,"getGPSEnabled"))).<Boolean>get().booleanValue()) { 
this.state = 7;
}if (true) break;

case 7:
//C
this.state = 8;
 BA.debugLineNum = 256;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
Debug.ShouldStop(-2147483648);
parent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Es necesario tener el GPS encendido")),(Object)(parent.__c.getField(true,"True")));
 BA.debugLineNum = 257;BA.debugLine="Sleep(500)";
Debug.ShouldStop(1);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "b4xmainpage", "b4xpage_appear"),BA.numberCast(int.class, 500));
this.state = 19;
return;
case 19:
//C
this.state = 8;
;
 BA.debugLineNum = 258;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
Debug.ShouldStop(2);
parent.__c.runVoidMethod ("StartActivity",__ref.getField(false, "ba"),(Object)((parent._starter._gps /*RemoteObject*/ .runMethod(false,"getLocationSettingsIntent"))));
 if (true) break;

case 8:
//C
this.state = 9;
;
 BA.debugLineNum = 260;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as CUANTOS fro";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("FECHA")}))));
 BA.debugLineNum = 261;BA.debugLine="c.Position = 0";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 262;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
Debug.ShouldStop(32);
if (true) break;

case 9:
//if
this.state = 18;
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
this.state = 11;
}else {
this.state = 13;
}if (true) break;

case 11:
//C
this.state = 18;
 BA.debugLineNum = 263;BA.debugLine="LogColor($\"No hay fecha: ${c.GetString(\"CUANTOS\"";
Debug.ShouldStop(64);
parent.__c.runVoidMethod ("LogImpl","3786451",(RemoteObject.concat(RemoteObject.createImmutable("No hay fecha: "),parent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS")))))),RemoteObject.createImmutable(""))),parent.__c.getField(false,"Colors").getField(true,"Red"));
 BA.debugLineNum = 264;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(128);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 265;BA.debugLine="cmd.Name = \"select_fecha\"";
Debug.ShouldStop(256);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_fecha"));
 BA.debugLineNum = 266;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fecha\")";
Debug.ShouldStop(512);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_cmd" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("fecha"))));
 BA.debugLineNum = 267;BA.debugLine="Msgbox(\"AJUSTAR FECHA\",\"AVISO\") 'Ignore";
Debug.ShouldStop(1024);
parent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("AJUSTAR FECHA")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("AVISO"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 268;BA.debugLine="B4XPage_Appear";
Debug.ShouldStop(2048);
__ref.runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_b4xpage_appear" /*void*/ );
 if (true) break;

case 13:
//C
this.state = 14;
 BA.debugLineNum = 271;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_VA_VALOR from CAT_";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("FECHA")}))));
 BA.debugLineNum = 272;BA.debugLine="c.Position =0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 273;BA.debugLine="Dim sDate, sTime As String";
Debug.ShouldStop(65536);
_sdate = RemoteObject.createImmutable("");Debug.locals.put("sDate", _sdate);
_stime = RemoteObject.createImmutable("");Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 274;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
Debug.ShouldStop(131072);
parent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("yyyyMMdd"));
 BA.debugLineNum = 275;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(262144);
_sdate = parent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(parent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sDate", _sdate);
 BA.debugLineNum = 280;BA.debugLine="If c.GetString(\"CAT_VA_VALOR\") > sDate Then";
Debug.ShouldStop(8388608);
if (true) break;

case 14:
//if
this.state = 17;
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_VA_VALOR")))),BA.numberCast(double.class, _sdate))) { 
this.state = 16;
}if (true) break;

case 16:
//C
this.state = 17;
 BA.debugLineNum = 281;BA.debugLine="Msgbox(\"AJUSTAR LA FECHA YA QUE ES MENOR AL SIS";
Debug.ShouldStop(16777216);
parent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("AVISO"))),__ref.getField(false, "ba"));
 BA.debugLineNum = 282;BA.debugLine="B4XPage_Appear";
Debug.ShouldStop(33554432);
__ref.runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_b4xpage_appear" /*void*/ );
 if (true) break;

case 17:
//C
this.state = 18;
;
 if (true) break;

case 18:
//C
this.state = -1;
;
 BA.debugLineNum = 285;BA.debugLine="bu.Initialize";
Debug.ShouldStop(268435456);
__ref.getField(false,"_bu" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.batteryutilities.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 286;BA.debugLine="batterystatus = bu.BatteryInformation";
Debug.ShouldStop(536870912);
__ref.setField ("_batterystatus" /*RemoteObject*/ ,__ref.getField(false,"_bu" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.batteryutilities.class, "_getbatteryinformation" /*RemoteObject*/ ));
 BA.debugLineNum = 289;BA.debugLine="dameUsuario";
Debug.ShouldStop(1);
__ref.runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_dameusuario" /*RemoteObject*/ );
 BA.debugLineNum = 290;BA.debugLine="End Sub";
Debug.ShouldStop(2);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b4xpage_closerequest(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,516);
if (RapidSub.canDelegate("b4xpage_closerequest")) { return __ref.runUserSub(false, "b4xmainpage","b4xpage_closerequest", __ref);}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(null,__ref);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(keymon.lat.medicomed.b4xmainpage parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
keymon.lat.medicomed.b4xmainpage parent;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_CloseRequest (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,516);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 517;BA.debugLine="Log(\"closreq\")";
Debug.ShouldStop(16);
parent.__c.runVoidMethod ("LogImpl","3983041",RemoteObject.createImmutable("closreq"),0);
 BA.debugLineNum = 518;BA.debugLine="Sleep(0)";
Debug.ShouldStop(32);
parent.__c.runVoidMethod ("Sleep",__ref.getField(false, "ba"),anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "b4xmainpage", "b4xpage_closerequest"),BA.numberCast(int.class, 0));
this.state = 8;
return;
case 8:
//C
this.state = 1;
;
 BA.debugLineNum = 519;BA.debugLine="If p_appUpdate.Visible Then";
Debug.ShouldStop(64);
if (true) break;

case 1:
//if
this.state = 4;
if (__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"getVisible").<Boolean>get().booleanValue()) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 520;BA.debugLine="Log(\"update visible\")";
Debug.ShouldStop(128);
parent.__c.runVoidMethod ("LogImpl","3983044",RemoteObject.createImmutable("update visible"),0);
 BA.debugLineNum = 521;BA.debugLine="p_appUpdate.Visible = False";
Debug.ShouldStop(256);
__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"setVisible",parent.__c.getField(true,"False"));
 BA.debugLineNum = 522;BA.debugLine="Return False";
Debug.ShouldStop(512);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"False")));return;};
 if (true) break;
;
 BA.debugLineNum = 524;BA.debugLine="If Not(p_appUpdate.Visible) Then";
Debug.ShouldStop(2048);

case 4:
//if
this.state = 7;
if (parent.__c.runMethod(true,"Not",(Object)(__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"getVisible"))).<Boolean>get().booleanValue()) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
 BA.debugLineNum = 525;BA.debugLine="Log(\"ExitApplication\")";
Debug.ShouldStop(4096);
parent.__c.runVoidMethod ("LogImpl","3983049",RemoteObject.createImmutable("ExitApplication"),0);
 BA.debugLineNum = 526;BA.debugLine="ExitApplication";
Debug.ShouldStop(8192);
parent.__c.runVoidMethod ("ExitApplication");
 if (true) break;

case 7:
//C
this.state = -1;
;
 BA.debugLineNum = 528;BA.debugLine="Return True";
Debug.ShouldStop(32768);
if (true) {
parent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.__c.getField(true,"True")));return;};
 BA.debugLineNum = 529;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,101);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "b4xmainpage","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 101;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(16);
 BA.debugLineNum = 102;BA.debugLine="B4XPages.GetManager.LogEvents = True";
Debug.ShouldStop(32);
b4xmainpage._b4xpages.runMethod(false,"_getmanager" /*RemoteObject*/ ,__ref.getField(false, "ba")).setField ("_logevents" /*RemoteObject*/ ,b4xmainpage.__c.getField(true,"True"));
 BA.debugLineNum = 103;BA.debugLine="Root = Root1";
Debug.ShouldStop(64);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 104;BA.debugLine="Root.LoadLayout(\"login\")";
Debug.ShouldStop(128);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("login")),__ref.getField(false, "ba"));
 BA.debugLineNum = 105;BA.debugLine="B4XPages.SetTitle(Me, \"Medicomed Preventa\")";
Debug.ShouldStop(256);
b4xmainpage._b4xpages.runVoidMethod ("_settitle" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)((RemoteObject.createImmutable("Medicomed Preventa"))));
 BA.debugLineNum = 106;BA.debugLine="login.Initialize";
Debug.ShouldStop(512);
__ref.getField(false,"_login" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 107;BA.debugLine="B4XPages.AddPage(\"Login\", login)";
Debug.ShouldStop(1024);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Login")),(Object)((__ref.getField(false,"_login" /*RemoteObject*/ ))));
 BA.debugLineNum = 108;BA.debugLine="principal.Initialize";
Debug.ShouldStop(2048);
__ref.getField(false,"_principal" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_principal.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 109;BA.debugLine="B4XPages.AddPage(\"Principal\", principal)";
Debug.ShouldStop(4096);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Principal")),(Object)((__ref.getField(false,"_principal" /*RemoteObject*/ ))));
 BA.debugLineNum = 110;BA.debugLine="clientes.Initialize";
Debug.ShouldStop(8192);
__ref.getField(false,"_clientes" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_clientes.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 111;BA.debugLine="B4XPages.AddPage(\"Clientes\", clientes)";
Debug.ShouldStop(16384);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Clientes")),(Object)((__ref.getField(false,"_clientes" /*RemoteObject*/ ))));
 BA.debugLineNum = 112;BA.debugLine="cliente.Initialize";
Debug.ShouldStop(32768);
__ref.getField(false,"_cliente" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_cliente.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 113;BA.debugLine="B4XPages.AddPage(\"Cliente\", cliente)";
Debug.ShouldStop(65536);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Cliente")),(Object)((__ref.getField(false,"_cliente" /*RemoteObject*/ ))));
 BA.debugLineNum = 114;BA.debugLine="productos.Initialize";
Debug.ShouldStop(131072);
__ref.getField(false,"_productos" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_productos.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 115;BA.debugLine="B4XPages.AddPage(\"Productos\", productos)";
Debug.ShouldStop(262144);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Productos")),(Object)((__ref.getField(false,"_productos" /*RemoteObject*/ ))));
 BA.debugLineNum = 116;BA.debugLine="updateAvailable.Initialize";
Debug.ShouldStop(524288);
__ref.getField(false,"_updateavailable" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_updateavailable.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 117;BA.debugLine="B4XPages.AddPage(\"updateAvailable\", updateAvailab";
Debug.ShouldStop(1048576);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("updateAvailable")),(Object)((__ref.getField(false,"_updateavailable" /*RemoteObject*/ ))));
 BA.debugLineNum = 118;BA.debugLine="mapas.Initialize";
Debug.ShouldStop(2097152);
__ref.getField(false,"_mapas" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_mapas.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 119;BA.debugLine="B4XPages.AddPage(\"Mapas\", mapas)";
Debug.ShouldStop(4194304);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Mapas")),(Object)((__ref.getField(false,"_mapas" /*RemoteObject*/ ))));
 BA.debugLineNum = 120;BA.debugLine="nuevoCliente.Initialize";
Debug.ShouldStop(8388608);
__ref.getField(false,"_nuevocliente" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_nuevocliente.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 121;BA.debugLine="B4XPages.AddPage(\"NuevoCliente\", nuevoCliente)";
Debug.ShouldStop(16777216);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("NuevoCliente")),(Object)((__ref.getField(false,"_nuevocliente" /*RemoteObject*/ ))));
 BA.debugLineNum = 122;BA.debugLine="ticketsDia.Initialize";
Debug.ShouldStop(33554432);
__ref.getField(false,"_ticketsdia" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_ticketsdia.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 123;BA.debugLine="B4XPages.AddPage(\"TicketsDia\", ticketsDia)";
Debug.ShouldStop(67108864);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("TicketsDia")),(Object)((__ref.getField(false,"_ticketsdia" /*RemoteObject*/ ))));
 BA.debugLineNum = 124;BA.debugLine="noVenta.Initialize";
Debug.ShouldStop(134217728);
__ref.getField(false,"_noventa" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_noventa.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 125;BA.debugLine="B4XPages.AddPage(\"NoVenta\", noVenta)";
Debug.ShouldStop(268435456);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("NoVenta")),(Object)((__ref.getField(false,"_noventa" /*RemoteObject*/ ))));
 BA.debugLineNum = 126;BA.debugLine="nota.Initialize";
Debug.ShouldStop(536870912);
__ref.getField(false,"_nota" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_nota.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 127;BA.debugLine="B4XPages.AddPage(\"Nota\", nota)";
Debug.ShouldStop(1073741824);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Nota")),(Object)((__ref.getField(false,"_nota" /*RemoteObject*/ ))));
 BA.debugLineNum = 128;BA.debugLine="pedidos.Initialize";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_pedidos" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_pedidos.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 129;BA.debugLine="B4XPages.AddPage(\"Pedidos\", pedidos)";
Debug.ShouldStop(1);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Pedidos")),(Object)((__ref.getField(false,"_pedidos" /*RemoteObject*/ ))));
 BA.debugLineNum = 130;BA.debugLine="promos.Initialize";
Debug.ShouldStop(2);
__ref.getField(false,"_promos" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_promos.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 131;BA.debugLine="B4XPages.AddPage(\"Promos\", promos)";
Debug.ShouldStop(4);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Promos")),(Object)((__ref.getField(false,"_promos" /*RemoteObject*/ ))));
 BA.debugLineNum = 132;BA.debugLine="historico.Initialize";
Debug.ShouldStop(8);
__ref.getField(false,"_historico" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.c_historico.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 133;BA.debugLine="B4XPages.AddPage(\"Historico\", historico)";
Debug.ShouldStop(16);
b4xmainpage._b4xpages.runVoidMethod ("_addpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("Historico")),(Object)((__ref.getField(false,"_historico" /*RemoteObject*/ ))));
 BA.debugLineNum = 134;BA.debugLine="ruta = Starter.ruta";
Debug.ShouldStop(32);
__ref.setField ("_ruta" /*RemoteObject*/ ,b4xmainpage._starter._ruta /*RemoteObject*/ );
 BA.debugLineNum = 136;BA.debugLine="Provider.Initialize";
Debug.ShouldStop(128);
__ref.getField(false,"_provider" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.fileprovider.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"));
 BA.debugLineNum = 139;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",b4xmainpage.__c.getField(false,"File").runMethod(true,"Exists",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db"))),b4xmainpage.__c.getField(true,"False"))) { 
 BA.debugLineNum = 140;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
Debug.ShouldStop(2048);
b4xmainpage.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirAssets")),(Object)(BA.ObjectToString("kmt.db")),(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(RemoteObject.createImmutable("kmt.db")));
 BA.debugLineNum = 141;BA.debugLine="Log(File.DirAssets)";
Debug.ShouldStop(4096);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720936",b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirAssets"),0);
 BA.debugLineNum = 142;BA.debugLine="LogColor(\"copiamos kmt.db de \"&File.DirAssets &";
Debug.ShouldStop(8192);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720937",RemoteObject.concat(RemoteObject.createImmutable("copiamos kmt.db de "),b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirAssets"),RemoteObject.createImmutable(" a "),__ref.getField(true,"_ruta" /*RemoteObject*/ )),b4xmainpage.__c.getField(false,"Colors").getField(true,"Green"));
 };
 BA.debugLineNum = 144;BA.debugLine="Log(ruta)";
Debug.ShouldStop(32768);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720939",__ref.getField(true,"_ruta" /*RemoteObject*/ ),0);
 BA.debugLineNum = 145;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
Debug.ShouldStop(65536);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("Initialize",(Object)(__ref.getField(true,"_ruta" /*RemoteObject*/ )),(Object)(BA.ObjectToString("kmt.db")),(Object)(b4xmainpage.__c.getField(true,"True")));
 BA.debugLineNum = 146;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(131072);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("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 = 147;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(262144);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_GPS (HGDATE TEXT, HGLAT TEXT, HGLON TEXT)")));
 BA.debugLineNum = 148;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(524288);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_STAY_STORE (HSS_CODIGO TEXT, HSS_IN TEXT, HSS_OUT TEXT, HSS_TOT TEXT)")));
 BA.debugLineNum = 149;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(1048576);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_STAY_OUT (HSO_INI TEXT, HSO_FIN TEXT)")));
 BA.debugLineNum = 150;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS INV";
Debug.ShouldStop(2097152);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS INVENT_X_ENVIAR (ALMACEN TEXT, PROID TEXT, CANTIDAD TEXT)")));
 BA.debugLineNum = 151;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(4194304);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("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 = 152;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(8388608);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("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 = 153;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(16777216);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_GEOCERCA (HGCLIENTE TEXT, HGDATE TEXT, HGLAT TEXT, HGLON TEXT)")));
 BA.debugLineNum = 154;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(33554432);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_FACE (HFCLIENTE TEXT, HFALIAS TEXT, HFRUTA TEXT, HFALMACEN TEXT)")));
 BA.debugLineNum = 155;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUT";
Debug.ShouldStop(67108864);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)")));
 BA.debugLineNum = 156;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS CATA";
Debug.ShouldStop(134217728);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("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 = 157;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS tota";
Debug.ShouldStop(268435456);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("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 = 158;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(536870912);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_MARCAS_CUOTAS (HMC_MARCA TEXT, HMC_TOTAL TEXT)")));
 BA.debugLineNum = 159;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS HIST_CODIGO_BARRAS(CODIGOKMTS TEXT, CODIGOB TEXT, LAT TEXT, LON TEXT)")));
 BA.debugLineNum = 160;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ABO";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS ABONOS (a_usuario TEXT, a_ruta TEXT, a_cliente TEXT, a_abono TEXT, a_fecha TEXT, a_enviado TEXT)")));
 BA.debugLineNum = 161;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS BIT";
Debug.ShouldStop(1);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS BITACORAGPS(fechab TEXT, usuariob TEXT, almacenb TEXT, rutab TEXT, eventob TEXT, clienteb TEXT, iniciob TEXT, finb TEXT, latitudb TEXT, longitudb TEXT, precision TEXT, motivonoventa TEXT, motivonovisita TEXT)")));
 BA.debugLineNum = 162;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS VEN";
Debug.ShouldStop(2);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS VENTA_No_VENTA(usuariov TEXT, almacenv TEXT, rutav TEXT, eventov TEXT, clientev TEXT, iniciov TEXT, latitudv TEXT, longitudv TEXT)")));
 BA.debugLineNum = 164;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS kmt";
Debug.ShouldStop(8);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("CREATE TABLE IF NOT EXISTS kmt_info (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, CAT_CL_DIASEMANA TEXT, CAT_CL_SECUENCIA INT)")));
 BA.debugLineNum = 166;BA.debugLine="Subs.agregaColumna(\"VENTA_No_VENTA\", \"montoVentav";
Debug.ShouldStop(32);
b4xmainpage._subs.runVoidMethod ("_agregacolumna" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(BA.ObjectToString("VENTA_No_VENTA")),(Object)(BA.ObjectToString("montoVentav")),(Object)(RemoteObject.createImmutable("TEXT")));
 BA.debugLineNum = 168;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
Debug.ShouldStop(128);
try { BA.debugLineNum = 169;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
Debug.ShouldStop(256);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT COUNT(*) AS fCol FROM pragma_table_info('kmt_info') WHERE name='CAT_CL_DIASEMANA'"))));
 BA.debugLineNum = 170;BA.debugLine="c.Position = 0";
Debug.ShouldStop(512);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 171;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fCol"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 172;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
Debug.ShouldStop(2048);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE kmt_info ADD COLUMN CAT_CL_DIASEMANA TEXT")));
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e68) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e68.toString()); BA.debugLineNum = 175;BA.debugLine="Try";
Debug.ShouldStop(16384);
try { BA.debugLineNum = 176;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
Debug.ShouldStop(32768);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE kmt_info ADD COLUMN CAT_CL_DIASEMANA TEXT")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e71) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e71.toString()); BA.debugLineNum = 178;BA.debugLine="Log(LastException)";
Debug.ShouldStop(131072);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720973",BA.ObjectToString(b4xmainpage.__c.runMethod(false,"LastException",__ref.getField(false, "ba"))),0);
 };
 };
 BA.debugLineNum = 181;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
Debug.ShouldStop(1048576);
try { BA.debugLineNum = 182;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
Debug.ShouldStop(2097152);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT COUNT(*) AS fCol FROM pragma_table_info('CAT_GUNAPROD') WHERE name='CAT_GP_TIPOPROD2'"))));
 BA.debugLineNum = 183;BA.debugLine="c.Position = 0";
Debug.ShouldStop(4194304);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 184;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fCol"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 185;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE CAT_GUNAPROD ADD";
Debug.ShouldStop(16777216);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE CAT_GUNAPROD ADD COLUMN CAT_GP_TIPOPROD2 TEXT")));
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e81) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e81.toString()); BA.debugLineNum = 188;BA.debugLine="Try";
Debug.ShouldStop(134217728);
try { BA.debugLineNum = 189;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE CAT_GUNAPROD ADD";
Debug.ShouldStop(268435456);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE CAT_GUNAPROD ADD COLUMN CAT_GP_TIPOPROD2 TEXT")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e84) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e84.toString()); BA.debugLineNum = 191;BA.debugLine="Log(LastException)";
Debug.ShouldStop(1073741824);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720986",BA.ObjectToString(b4xmainpage.__c.runMethod(false,"LastException",__ref.getField(false, "ba"))),0);
 };
 };
 BA.debugLineNum = 194;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
Debug.ShouldStop(2);
try { BA.debugLineNum = 195;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
Debug.ShouldStop(4);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("SELECT COUNT(*) AS fCol FROM pragma_table_info('kmt_info') WHERE name='CAT_CL_SECUENCIA'"))));
 BA.debugLineNum = 196;BA.debugLine="c.Position = 0";
Debug.ShouldStop(8);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 197;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("fCol"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 198;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
Debug.ShouldStop(32);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE kmt_info ADD COLUMN CAT_CL_SECUENCIA INT")));
 };
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e94) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e94.toString()); BA.debugLineNum = 201;BA.debugLine="Try";
Debug.ShouldStop(256);
try { BA.debugLineNum = 202;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
Debug.ShouldStop(512);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("ALTER TABLE kmt_info ADD COLUMN CAT_CL_SECUENCIA INT")));
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e97) {
			BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e97.toString()); BA.debugLineNum = 204;BA.debugLine="Log(LastException)";
Debug.ShouldStop(2048);
b4xmainpage.__c.runVoidMethod ("LogImpl","3720999",BA.ObjectToString(b4xmainpage.__c.runMethod(false,"LastException",__ref.getField(false, "ba"))),0);
 };
 };
 BA.debugLineNum = 207;BA.debugLine="c=skmt.ExecQuery(\"select COUNT(*) AS CUANTOS from";
Debug.ShouldStop(16384);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select COUNT(*) AS CUANTOS from HIST_STAY_OUT "))));
 BA.debugLineNum = 208;BA.debugLine="C.Position = 0";
Debug.ShouldStop(32768);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 209;BA.debugLine="If c.GetString(\"CUANTOS\")  = 0 Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUANTOS"))),BA.NumberToString(0))) { 
 BA.debugLineNum = 210;BA.debugLine="skmt.ExecNonQuery(\"INSERT INTO HIST_STAY_OUT(HSO";
Debug.ShouldStop(131072);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("INSERT INTO HIST_STAY_OUT(HSO_INI, HSO_FIN) VALUES (0,0)")));
 };
 BA.debugLineNum = 212;BA.debugLine="C.Close";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 216;BA.debugLine="l_version.Text = Application.VersionName";
Debug.ShouldStop(8388608);
__ref.getField(false,"_l_version" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence(b4xmainpage.__c.getField(false,"Application").runMethod(true,"getVersionName")));
 BA.debugLineNum = 218;BA.debugLine="PopupMenu.Initialize(\"PopupMenu\", b_menu)";
Debug.ShouldStop(33554432);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("Initialize",__ref.getField(false, "ba"),(Object)(BA.ObjectToString("PopupMenu")),RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.ConcreteViewWrapper"), __ref.getField(false,"_b_menu" /*RemoteObject*/ ).getObject()));
 BA.debugLineNum = 219;BA.debugLine="PopupMenu.AddMenuItem(0, 0, \"View\")";
Debug.ShouldStop(67108864);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("AddMenuItem",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(RemoteObject.createImmutable("View")));
 BA.debugLineNum = 220;BA.debugLine="PopupMenu.AddMenuItem(1, 1, \"Edit\")";
Debug.ShouldStop(134217728);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("AddMenuItem",(Object)(BA.numberCast(int.class, 1)),(Object)(BA.numberCast(int.class, 1)),(Object)(RemoteObject.createImmutable("Edit")));
 BA.debugLineNum = 221;BA.debugLine="PopupMenu.AddMenuItem(2, 2, \"Details\")";
Debug.ShouldStop(268435456);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("AddMenuItem",(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 2)),(Object)(RemoteObject.createImmutable("Details")));
 BA.debugLineNum = 222;BA.debugLine="PopupMenu.AddMenuItem(3, 3, \"Remove\")";
Debug.ShouldStop(536870912);
__ref.getField(false,"_popupmenu" /*RemoteObject*/ ).runVoidMethod ("AddMenuItem",(Object)(BA.numberCast(int.class, 3)),(Object)(BA.numberCast(int.class, 3)),(Object)(RemoteObject.createImmutable("Remove")));
 BA.debugLineNum = 224;BA.debugLine="montoActual  = 0";
Debug.ShouldStop(-2147483648);
__ref.setField ("_montoactual" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 225;BA.debugLine="clientesTotal = 0";
Debug.ShouldStop(1);
__ref.setField ("_clientestotal" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 226;BA.debugLine="clientesVenta =  0";
Debug.ShouldStop(2);
__ref.setField ("_clientesventa" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 227;BA.debugLine="clientesVisitados = 0";
Debug.ShouldStop(4);
__ref.setField ("_clientesvisitados" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 228;BA.debugLine="almacen = 0";
Debug.ShouldStop(8);
__ref.setField ("_almacen" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 229;BA.debugLine="rutaPreventa =  0";
Debug.ShouldStop(16);
__ref.setField ("_rutapreventa" /*RemoteObject*/ ,BA.NumberToString(0));
 BA.debugLineNum = 230;BA.debugLine="p_appUpdate.Visible = False";
Debug.ShouldStop(32);
__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"setVisible",b4xmainpage.__c.getField(true,"False"));
 BA.debugLineNum = 241;BA.debugLine="p_appUpdate.Visible = False";
Debug.ShouldStop(65536);
__ref.getField(false,"_p_appupdate" /*RemoteObject*/ ).runMethod(true,"setVisible",b4xmainpage.__c.getField(true,"False"));
 BA.debugLineNum = 242;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 18;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 19;BA.debugLine="Private Root As B4XView";
b4xmainpage._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",b4xmainpage._root);
 //BA.debugLineNum = 20;BA.debugLine="Private xui As XUI";
b4xmainpage._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",b4xmainpage._xui);
 //BA.debugLineNum = 21;BA.debugLine="Public login As B4XMainPage";
b4xmainpage._login = RemoteObject.createNew ("keymon.lat.medicomed.b4xmainpage");__ref.setField("_login",b4xmainpage._login);
 //BA.debugLineNum = 22;BA.debugLine="Dim reqManager As DBRequestManager";
b4xmainpage._reqmanager = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager");__ref.setField("_reqmanager",b4xmainpage._reqmanager);
 //BA.debugLineNum = 23;BA.debugLine="Public principal As C_Principal";
b4xmainpage._principal = RemoteObject.createNew ("keymon.lat.medicomed.c_principal");__ref.setField("_principal",b4xmainpage._principal);
 //BA.debugLineNum = 24;BA.debugLine="Public clientes As C_Clientes";
b4xmainpage._clientes = RemoteObject.createNew ("keymon.lat.medicomed.c_clientes");__ref.setField("_clientes",b4xmainpage._clientes);
 //BA.debugLineNum = 25;BA.debugLine="Public cliente As C_Cliente";
b4xmainpage._cliente = RemoteObject.createNew ("keymon.lat.medicomed.c_cliente");__ref.setField("_cliente",b4xmainpage._cliente);
 //BA.debugLineNum = 26;BA.debugLine="Public productos As C_Productos";
b4xmainpage._productos = RemoteObject.createNew ("keymon.lat.medicomed.c_productos");__ref.setField("_productos",b4xmainpage._productos);
 //BA.debugLineNum = 27;BA.debugLine="Public updateAvailable As C_UpdateAvailable";
b4xmainpage._updateavailable = RemoteObject.createNew ("keymon.lat.medicomed.c_updateavailable");__ref.setField("_updateavailable",b4xmainpage._updateavailable);
 //BA.debugLineNum = 28;BA.debugLine="Public mapas As C_Mapas";
b4xmainpage._mapas = RemoteObject.createNew ("keymon.lat.medicomed.c_mapas");__ref.setField("_mapas",b4xmainpage._mapas);
 //BA.debugLineNum = 29;BA.debugLine="Public nuevoCliente As C_NuevoCliente";
b4xmainpage._nuevocliente = RemoteObject.createNew ("keymon.lat.medicomed.c_nuevocliente");__ref.setField("_nuevocliente",b4xmainpage._nuevocliente);
 //BA.debugLineNum = 30;BA.debugLine="Public ticketsDia As C_TicketsDia";
b4xmainpage._ticketsdia = RemoteObject.createNew ("keymon.lat.medicomed.c_ticketsdia");__ref.setField("_ticketsdia",b4xmainpage._ticketsdia);
 //BA.debugLineNum = 31;BA.debugLine="Public noVenta As C_NoVenta";
b4xmainpage._noventa = RemoteObject.createNew ("keymon.lat.medicomed.c_noventa");__ref.setField("_noventa",b4xmainpage._noventa);
 //BA.debugLineNum = 32;BA.debugLine="Public nota As C_Nota";
b4xmainpage._nota = RemoteObject.createNew ("keymon.lat.medicomed.c_nota");__ref.setField("_nota",b4xmainpage._nota);
 //BA.debugLineNum = 33;BA.debugLine="Public pedidos As C_Pedidos";
b4xmainpage._pedidos = RemoteObject.createNew ("keymon.lat.medicomed.c_pedidos");__ref.setField("_pedidos",b4xmainpage._pedidos);
 //BA.debugLineNum = 34;BA.debugLine="Public promos As C_Promos";
b4xmainpage._promos = RemoteObject.createNew ("keymon.lat.medicomed.c_promos");__ref.setField("_promos",b4xmainpage._promos);
 //BA.debugLineNum = 35;BA.debugLine="Public historico As C_Historico";
b4xmainpage._historico = RemoteObject.createNew ("keymon.lat.medicomed.c_historico");__ref.setField("_historico",b4xmainpage._historico);
 //BA.debugLineNum = 47;BA.debugLine="Dim reqManager As DBRequestManager";
b4xmainpage._reqmanager = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager");__ref.setField("_reqmanager",b4xmainpage._reqmanager);
 //BA.debugLineNum = 48;BA.debugLine="Dim v As String = Application.VersionName";
b4xmainpage._v = b4xmainpage.__c.getField(false,"Application").runMethod(true,"getVersionName");__ref.setField("_v",b4xmainpage._v);
 //BA.debugLineNum = 49;BA.debugLine="Dim ruta As String";
b4xmainpage._ruta = RemoteObject.createImmutable("");__ref.setField("_ruta",b4xmainpage._ruta);
 //BA.debugLineNum = 50;BA.debugLine="Dim tgl As Toggle";
b4xmainpage._tgl = RemoteObject.createNew ("com.rootsoft.togglelibrary.ToggleLibrary");__ref.setField("_tgl",b4xmainpage._tgl);
 //BA.debugLineNum = 51;BA.debugLine="Dim lat_gps, lon_gps As String";
b4xmainpage._lat_gps = RemoteObject.createImmutable("");__ref.setField("_lat_gps",b4xmainpage._lat_gps);
b4xmainpage._lon_gps = RemoteObject.createImmutable("");__ref.setField("_lon_gps",b4xmainpage._lon_gps);
 //BA.debugLineNum = 52;BA.debugLine="Dim usuario As String";
b4xmainpage._usuario = RemoteObject.createImmutable("");__ref.setField("_usuario",b4xmainpage._usuario);
 //BA.debugLineNum = 53;BA.debugLine="Dim batt As Int";
b4xmainpage._batt = RemoteObject.createImmutable(0);__ref.setField("_batt",b4xmainpage._batt);
 //BA.debugLineNum = 54;BA.debugLine="Dim skmt As SQL";
b4xmainpage._skmt = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL");__ref.setField("_skmt",b4xmainpage._skmt);
 //BA.debugLineNum = 55;BA.debugLine="Dim montoActual, clientesTotal, clientesVenta, cl";
b4xmainpage._montoactual = RemoteObject.createImmutable("");__ref.setField("_montoactual",b4xmainpage._montoactual);
b4xmainpage._clientestotal = RemoteObject.createImmutable("");__ref.setField("_clientestotal",b4xmainpage._clientestotal);
b4xmainpage._clientesventa = RemoteObject.createImmutable("");__ref.setField("_clientesventa",b4xmainpage._clientesventa);
b4xmainpage._clientesvisitados = RemoteObject.createImmutable("");__ref.setField("_clientesvisitados",b4xmainpage._clientesvisitados);
b4xmainpage._almacen = RemoteObject.createImmutable("");__ref.setField("_almacen",b4xmainpage._almacen);
b4xmainpage._rutapreventa = RemoteObject.createImmutable("");__ref.setField("_rutapreventa",b4xmainpage._rutapreventa);
 //BA.debugLineNum = 56;BA.debugLine="Dim server, fechaRuta As String";
b4xmainpage._server = RemoteObject.createImmutable("");__ref.setField("_server",b4xmainpage._server);
b4xmainpage._fecharuta = RemoteObject.createImmutable("");__ref.setField("_fecharuta",b4xmainpage._fecharuta);
 //BA.debugLineNum = 57;BA.debugLine="Dim Logger As Boolean";
b4xmainpage._logger = RemoteObject.createImmutable(false);__ref.setField("_logger",b4xmainpage._logger);
 //BA.debugLineNum = 58;BA.debugLine="Dim mac_impresora As String";
b4xmainpage._mac_impresora = RemoteObject.createImmutable("");__ref.setField("_mac_impresora",b4xmainpage._mac_impresora);
 //BA.debugLineNum = 59;BA.debugLine="Dim Phn As PhoneId";
b4xmainpage._phn = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone.PhoneId");__ref.setField("_phn",b4xmainpage._phn);
 //BA.debugLineNum = 61;BA.debugLine="Dim user As EditText";
b4xmainpage._user = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_user",b4xmainpage._user);
 //BA.debugLineNum = 62;BA.debugLine="Dim pass As EditText";
b4xmainpage._pass = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_pass",b4xmainpage._pass);
 //BA.debugLineNum = 63;BA.debugLine="Dim c As Cursor";
b4xmainpage._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c",b4xmainpage._c);
 //BA.debugLineNum = 64;BA.debugLine="Dim existe As String";
b4xmainpage._existe = RemoteObject.createImmutable("");__ref.setField("_existe",b4xmainpage._existe);
 //BA.debugLineNum = 65;BA.debugLine="Dim paso1 As String";
b4xmainpage._paso1 = RemoteObject.createImmutable("");__ref.setField("_paso1",b4xmainpage._paso1);
 //BA.debugLineNum = 66;BA.debugLine="Private IMEN As Label";
b4xmainpage._imen = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_imen",b4xmainpage._imen);
 //BA.debugLineNum = 67;BA.debugLine="Dim IMEI As String = \"\"";
b4xmainpage._imei = BA.ObjectToString("");__ref.setField("_imei",b4xmainpage._imei);
 //BA.debugLineNum = 68;BA.debugLine="Dim alterno As String";
b4xmainpage._alterno = RemoteObject.createImmutable("");__ref.setField("_alterno",b4xmainpage._alterno);
 //BA.debugLineNum = 69;BA.debugLine="Private b_menu As Button";
b4xmainpage._b_menu = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_menu",b4xmainpage._b_menu);
 //BA.debugLineNum = 70;BA.debugLine="Dim PopupMenu As RSPopupMenu";
b4xmainpage._popupmenu = RemoteObject.createNew ("com.rootsoft.rspopupmenu.RSPopupMenu");__ref.setField("_popupmenu",b4xmainpage._popupmenu);
 //BA.debugLineNum = 71;BA.debugLine="Dim cmd As DBCommand";
b4xmainpage._cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");__ref.setField("_cmd",b4xmainpage._cmd);
 //BA.debugLineNum = 72;BA.debugLine="Private PDF As Button";
b4xmainpage._pdf = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_pdf",b4xmainpage._pdf);
 //BA.debugLineNum = 73;BA.debugLine="Private bpv1 As BatteryProgressView";
b4xmainpage._bpv1 = RemoteObject.createNew ("batteryprogressviewwrapper.batteryprogressviewWrapper");__ref.setField("_bpv1",b4xmainpage._bpv1);
 //BA.debugLineNum = 74;BA.debugLine="Dim batterystatus(11) As Int";
b4xmainpage._batterystatus = RemoteObject.createNewArray ("int", new int[] {11}, new Object[]{});__ref.setField("_batterystatus",b4xmainpage._batterystatus);
 //BA.debugLineNum = 75;BA.debugLine="Private bu As BatteryUtilities";
b4xmainpage._bu = RemoteObject.createNew ("keymon.lat.medicomed.batteryutilities");__ref.setField("_bu",b4xmainpage._bu);
 //BA.debugLineNum = 76;BA.debugLine="Private b_apk As Button";
b4xmainpage._b_apk = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_apk",b4xmainpage._b_apk);
 //BA.debugLineNum = 77;BA.debugLine="Private i_engrane As ImageView";
b4xmainpage._i_engrane = RemoteObject.createNew ("anywheresoftware.b4a.objects.ImageViewWrapper");__ref.setField("_i_engrane",b4xmainpage._i_engrane);
 //BA.debugLineNum = 78;BA.debugLine="Private p_Main As Panel";
b4xmainpage._p_main = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_main",b4xmainpage._p_main);
 //BA.debugLineNum = 79;BA.debugLine="Private p_appUpdate As Panel";
b4xmainpage._p_appupdate = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_p_appupdate",b4xmainpage._p_appupdate);
 //BA.debugLineNum = 80;BA.debugLine="Private b_regesar As Button";
b4xmainpage._b_regesar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_regesar",b4xmainpage._b_regesar);
 //BA.debugLineNum = 81;BA.debugLine="Private l_version As Label";
b4xmainpage._l_version = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_version",b4xmainpage._l_version);
 //BA.debugLineNum = 82;BA.debugLine="Private ImageView1 As ImageView";
b4xmainpage._imageview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ImageViewWrapper");__ref.setField("_imageview1",b4xmainpage._imageview1);
 //BA.debugLineNum = 83;BA.debugLine="Private Label2 As Label";
b4xmainpage._label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_label2",b4xmainpage._label2);
 //BA.debugLineNum = 84;BA.debugLine="Private Entrar As Button";
b4xmainpage._entrar = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_entrar",b4xmainpage._entrar);
 //BA.debugLineNum = 85;BA.debugLine="Dim tipo_venta As String";
b4xmainpage._tipo_venta = RemoteObject.createImmutable("");__ref.setField("_tipo_venta",b4xmainpage._tipo_venta);
 //BA.debugLineNum = 86;BA.debugLine="Dim bTerminarClicked As Boolean = False";
b4xmainpage._bterminarclicked = b4xmainpage.__c.getField(true,"False");__ref.setField("_bterminarclicked",b4xmainpage._bterminarclicked);
 //BA.debugLineNum = 87;BA.debugLine="Private lv_server As ListView";
b4xmainpage._lv_server = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_lv_server",b4xmainpage._lv_server);
 //BA.debugLineNum = 88;BA.debugLine="Private l_server As Label";
b4xmainpage._l_server = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_l_server",b4xmainpage._l_server);
 //BA.debugLineNum = 89;BA.debugLine="Private et_server As EditText";
b4xmainpage._et_server = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_et_server",b4xmainpage._et_server);
 //BA.debugLineNum = 90;BA.debugLine="Private b_server As Button";
b4xmainpage._b_server = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_server",b4xmainpage._b_server);
 //BA.debugLineNum = 91;BA.debugLine="Private b_envioBD As Button";
b4xmainpage._b_enviobd = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");__ref.setField("_b_enviobd",b4xmainpage._b_enviobd);
 //BA.debugLineNum = 92;BA.debugLine="Public Provider As FileProvider";
b4xmainpage._provider = RemoteObject.createNew ("keymon.lat.medicomed.fileprovider");__ref.setField("_provider",b4xmainpage._provider);
 //BA.debugLineNum = 93;BA.debugLine="Public rutaBDBackup As String = \"\"";
b4xmainpage._rutabdbackup = BA.ObjectToString("");__ref.setField("_rutabdbackup",b4xmainpage._rutabdbackup);
 //BA.debugLineNum = 94;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static void  _copiadb(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("copiaDB (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,592);
if (RapidSub.canDelegate("copiadb")) { __ref.runUserSub(false, "b4xmainpage","copiadb", __ref); return;}
ResumableSub_copiaDB rsub = new ResumableSub_copiaDB(null,__ref);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_copiaDB extends BA.ResumableSub {
public ResumableSub_copiaDB(keymon.lat.medicomed.b4xmainpage parent,RemoteObject __ref) {
this.parent = parent;
this.__ref = __ref;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
RemoteObject __ref;
keymon.lat.medicomed.b4xmainpage parent;
RemoteObject _permission = RemoteObject.createImmutable("");
RemoteObject _result = RemoteObject.createImmutable(false);
RemoteObject _thedir = RemoteObject.createImmutable("");

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("copiaDB (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,592);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
try {

        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
Debug.locals.put("_ref", __ref);
 BA.debugLineNum = 593;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
Debug.ShouldStop(65536);
parent._starter._rp /*RemoteObject*/ .runVoidMethod ("CheckAndRequest",__ref.getField(false, "ba"),(Object)(parent._starter._rp /*RemoteObject*/ .getField(true,"PERMISSION_WRITE_EXTERNAL_STORAGE")));
 BA.debugLineNum = 594;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
Debug.ShouldStop(131072);
parent.__c.runVoidMethod ("WaitFor","b4xpage_permissionresult", __ref.getField(false, "ba"), anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "b4xmainpage", "copiadb"), null);
this.state = 18;
return;
case 18:
//C
this.state = 1;
_permission = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(1));Debug.locals.put("Permission", _permission);
_result = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(2));Debug.locals.put("Result", _result);
;
 BA.debugLineNum = 595;BA.debugLine="Dim theDir As String = \"\"";
Debug.ShouldStop(262144);
_thedir = BA.ObjectToString("");Debug.locals.put("theDir", _thedir);Debug.locals.put("theDir", _thedir);
 BA.debugLineNum = 596;BA.debugLine="If Result Then";
Debug.ShouldStop(524288);
if (true) break;

case 1:
//if
this.state = 17;
if (_result.<Boolean>get().booleanValue()) { 
this.state = 3;
}else {
this.state = 16;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 603;BA.debugLine="Dim theDir As String";
Debug.ShouldStop(67108864);
_thedir = RemoteObject.createImmutable("");Debug.locals.put("theDir", _thedir);
 BA.debugLineNum = 604;BA.debugLine="Try";
Debug.ShouldStop(134217728);
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 = 605;BA.debugLine="File.MakeDir(File.DirRootExternal,\"kmts\")";
Debug.ShouldStop(268435456);
parent.__c.getField(false,"File").runVoidMethod ("MakeDir",(Object)(parent.__c.getField(false,"File").runMethod(true,"getDirRootExternal")),(Object)(RemoteObject.createImmutable("kmts")));
 BA.debugLineNum = 606;BA.debugLine="theDir = \"/kmts\"";
Debug.ShouldStop(536870912);
_thedir = BA.ObjectToString("/kmts");Debug.locals.put("theDir", _thedir);
 Debug.CheckDeviceExceptions();
if (true) break;

case 8:
//C
this.state = 9;
this.catchState = 0;
 BA.debugLineNum = 608;BA.debugLine="theDir = \"\"";
Debug.ShouldStop(-2147483648);
_thedir = BA.ObjectToString("");Debug.locals.put("theDir", _thedir);
 if (true) break;
if (true) break;
;
 BA.debugLineNum = 610;BA.debugLine="Try";
Debug.ShouldStop(2);

case 9:
//try
this.state = 14;
this.catchState = 0;
this.catchState = 13;
this.state = 11;
if (true) break;

case 11:
//C
this.state = 14;
this.catchState = 13;
 BA.debugLineNum = 611;BA.debugLine="File.Copy(File.DirInternal,\"kmt.db\",File.DirRoo";
Debug.ShouldStop(4);
parent.__c.getField(false,"File").runVoidMethod ("Copy",(Object)(parent.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("kmt.db")),(Object)(RemoteObject.concat(parent.__c.getField(false,"File").runMethod(true,"getDirRootExternal"),_thedir)),(Object)(RemoteObject.createImmutable("medicomed_kmt.db")));
 BA.debugLineNum = 612;BA.debugLine="ToastMessageShow(\"Listo, copiado a \" & File.Dir";
Debug.ShouldStop(8);
parent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Listo, copiado a "),parent.__c.getField(false,"File").runMethod(true,"getDirRootExternal"),_thedir,RemoteObject.createImmutable("/medicomed_kmt_kmt.db")))),(Object)(parent.__c.getField(true,"False")));
 Debug.CheckDeviceExceptions();
if (true) break;

case 13:
//C
this.state = 14;
this.catchState = 0;
 BA.debugLineNum = 614;BA.debugLine="ToastMessageShow(\"No se pudo hacer la copia: \"&";
Debug.ShouldStop(32);
parent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("No se pudo hacer la copia: "),parent.__c.runMethod(false,"LastException",__ref.getField(false, "ba"))))),(Object)(parent.__c.getField(true,"True")));
 if (true) break;
if (true) break;

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

case 16:
//C
this.state = 17;
 BA.debugLineNum = 617;BA.debugLine="ToastMessageShow(\"Sin permisos\", False)";
Debug.ShouldStop(256);
parent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Sin permisos")),(Object)(parent.__c.getField(true,"False")));
 if (true) break;

case 17:
//C
this.state = -1;
;
 BA.debugLineNum = 619;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e0.toString());}
            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _b4xpage_permissionresult(RemoteObject __ref,RemoteObject _permission,RemoteObject _result) throws Exception{
}
public static RemoteObject  _dameusuario(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("dameUsuario (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,562);
if (RapidSub.canDelegate("dameusuario")) { return __ref.runUserSub(false, "b4xmainpage","dameusuario", __ref);}
 BA.debugLineNum = 562;BA.debugLine="Sub dameUsuario";
Debug.ShouldStop(131072);
 BA.debugLineNum = 563;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
Debug.ShouldStop(262144);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select count(*) as EXISTE1 from usuarioa where usuario = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText")}))));
 BA.debugLineNum = 564;BA.debugLine="c.Position=0";
Debug.ShouldStop(524288);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 565;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
Debug.ShouldStop(1048576);
__ref.setField ("_existe" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("EXISTE1"))));
 BA.debugLineNum = 566;BA.debugLine="c.Close";
Debug.ShouldStop(2097152);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 567;BA.debugLine="If existe > 0 Then";
Debug.ShouldStop(4194304);
if (RemoteObject.solveBoolean(">",BA.numberCast(double.class, __ref.getField(true,"_existe" /*RemoteObject*/ )),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 568;BA.debugLine="c=skmt.ExecQuery(\"select USUARIO from usuarioa\")";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 569;BA.debugLine="c.Position=0";
Debug.ShouldStop(16777216);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 570;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
Debug.ShouldStop(33554432);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO"))));
 }else {
 BA.debugLineNum = 572;BA.debugLine="usuario = \"SINUSUARIO\"";
Debug.ShouldStop(134217728);
__ref.setField ("_usuario" /*RemoteObject*/ ,BA.ObjectToString("SINUSUARIO"));
 };
 BA.debugLineNum = 574;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _entrar_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("Entrar_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,293);
if (RapidSub.canDelegate("entrar_click")) { return __ref.runUserSub(false, "b4xmainpage","entrar_click", __ref);}
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.agraham.reflection.Reflection");
RemoteObject _api = RemoteObject.createImmutable(0);
RemoteObject _pp = RemoteObject.declareNull("anywheresoftware.b4a.phone.Phone");
RemoteObject _id = RemoteObject.createImmutable(0);
 BA.debugLineNum = 293;BA.debugLine="Sub Entrar_Click";
Debug.ShouldStop(16);
 BA.debugLineNum = 294;BA.debugLine="Dim r As Reflector";
Debug.ShouldStop(32);
_r = RemoteObject.createNew ("anywheresoftware.b4a.agraham.reflection.Reflection");Debug.locals.put("r", _r);
 BA.debugLineNum = 295;BA.debugLine="Dim Api As Int";
Debug.ShouldStop(64);
_api = RemoteObject.createImmutable(0);Debug.locals.put("Api", _api);
 BA.debugLineNum = 296;BA.debugLine="Dim PP As Phone";
Debug.ShouldStop(128);
_pp = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");Debug.locals.put("PP", _pp);
 BA.debugLineNum = 297;BA.debugLine="Api = r.GetStaticField(\"android.os.Build$VERSION\"";
Debug.ShouldStop(256);
_api = BA.numberCast(int.class, _r.runMethod(false,"GetStaticField",(Object)(BA.ObjectToString("android.os.Build$VERSION")),(Object)(RemoteObject.createImmutable("SDK_INT"))));Debug.locals.put("Api", _api);
 BA.debugLineNum = 298;BA.debugLine="If Api < 9 Then";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("<",_api,BA.numberCast(double.class, 9))) { 
 BA.debugLineNum = 300;BA.debugLine="If File.Exists(File.DirInternal, \"__id\") Then";
Debug.ShouldStop(2048);
if (b4xmainpage.__c.getField(false,"File").runMethod(true,"Exists",(Object)(b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("__id"))).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 301;BA.debugLine="IMEI =  File.ReadString(File.DirInternal, \"__id";
Debug.ShouldStop(4096);
__ref.setField ("_imei" /*RemoteObject*/ ,b4xmainpage.__c.getField(false,"File").runMethod(true,"ReadString",(Object)(b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(RemoteObject.createImmutable("__id"))));
 BA.debugLineNum = 302;BA.debugLine="Log(1&\"-\"&IMEI)";
Debug.ShouldStop(8192);
b4xmainpage.__c.runVoidMethod ("LogImpl","3851977",RemoteObject.concat(RemoteObject.createImmutable(1),RemoteObject.createImmutable("-"),__ref.getField(true,"_imei" /*RemoteObject*/ )),0);
 }else {
 BA.debugLineNum = 304;BA.debugLine="Dim id As Int";
Debug.ShouldStop(32768);
_id = RemoteObject.createImmutable(0);Debug.locals.put("id", _id);
 BA.debugLineNum = 305;BA.debugLine="id = Rnd(0x10000000, 0x7FFFFFFF)";
Debug.ShouldStop(65536);
_id = b4xmainpage.__c.runMethod(true,"Rnd",(Object)(BA.numberCast(int.class, ((int)0x10000000))),(Object)(BA.numberCast(int.class, ((int)0x7fffffff))));Debug.locals.put("id", _id);
 BA.debugLineNum = 306;BA.debugLine="File.WriteString(File.DirInternal, \"__id\", id)";
Debug.ShouldStop(131072);
b4xmainpage.__c.getField(false,"File").runVoidMethod ("WriteString",(Object)(b4xmainpage.__c.getField(false,"File").runMethod(true,"getDirInternal")),(Object)(BA.ObjectToString("__id")),(Object)(BA.NumberToString(_id)));
 BA.debugLineNum = 307;BA.debugLine="IMEI =  id";
Debug.ShouldStop(262144);
__ref.setField ("_imei" /*RemoteObject*/ ,BA.NumberToString(_id));
 BA.debugLineNum = 308;BA.debugLine="Log(2&\"-\"&IMEI)";
Debug.ShouldStop(524288);
b4xmainpage.__c.runVoidMethod ("LogImpl","3851983",RemoteObject.concat(RemoteObject.createImmutable(2),RemoteObject.createImmutable("-"),__ref.getField(true,"_imei" /*RemoteObject*/ )),0);
 };
 }else {
 BA.debugLineNum = 312;BA.debugLine="IMEI =  r.GetStaticField(\"android.os.Build\", \"SE";
Debug.ShouldStop(8388608);
__ref.setField ("_imei" /*RemoteObject*/ ,BA.ObjectToString(_r.runMethod(false,"GetStaticField",(Object)(BA.ObjectToString("android.os.Build")),(Object)(RemoteObject.createImmutable("SERIAL")))));
 };
 BA.debugLineNum = 315;BA.debugLine="If IMEI.ToLowerCase = \"unknown\" Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_imei" /*RemoteObject*/ ).runMethod(true,"toLowerCase"),BA.ObjectToString("unknown"))) { 
 BA.debugLineNum = 316;BA.debugLine="IMEI = PP.GetSettings(\"android_id\")";
Debug.ShouldStop(134217728);
__ref.setField ("_imei" /*RemoteObject*/ ,_pp.runMethod(true,"GetSettings",(Object)(RemoteObject.createImmutable("android_id"))));
 };
 BA.debugLineNum = 320;BA.debugLine="If user.Text = \"ALTERNO\" Then";
Debug.ShouldStop(-2147483648);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("ALTERNO"))) { 
 BA.debugLineNum = 321;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
Debug.ShouldStop(1);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")}))));
 BA.debugLineNum = 322;BA.debugLine="c.Position =0";
Debug.ShouldStop(2);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 323;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
Debug.ShouldStop(4);
__ref.setField ("_server" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CO_CONFIGURACION"))));
 BA.debugLineNum = 324;BA.debugLine="alterno = c.GetString(\"CAT_CO_RESULTADO\")";
Debug.ShouldStop(8);
__ref.setField ("_alterno" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CO_RESULTADO"))));
 BA.debugLineNum = 325;BA.debugLine="c.Close";
Debug.ShouldStop(16);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 BA.debugLineNum = 326;BA.debugLine="If alterno = 1 Then";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_alterno" /*RemoteObject*/ ),BA.NumberToString(1))) { 
 BA.debugLineNum = 327;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
Debug.ShouldStop(64);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")})))));
 BA.debugLineNum = 328;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
Debug.ShouldStop(128);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")})))));
 }else 
{ BA.debugLineNum = 329;BA.debugLine="Else if alterno = 2 Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_alterno" /*RemoteObject*/ ),BA.NumberToString(2))) { 
 BA.debugLineNum = 330;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
Debug.ShouldStop(512);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")})))));
 BA.debugLineNum = 331;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
Debug.ShouldStop(1024);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")})))));
 }}
;
 BA.debugLineNum = 333;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
Debug.ShouldStop(4096);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("SERVER")}))));
 BA.debugLineNum = 334;BA.debugLine="c.Position =0";
Debug.ShouldStop(8192);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 335;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
Debug.ShouldStop(16384);
__ref.setField ("_server" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CO_CONFIGURACION"))));
 BA.debugLineNum = 336;BA.debugLine="user.Text = server";
Debug.ShouldStop(32768);
__ref.getField(false,"_user" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(__ref.getField(true,"_server" /*RemoteObject*/ )));
 BA.debugLineNum = 337;BA.debugLine="c.Close";
Debug.ShouldStop(65536);
__ref.getField(false,"_c" /*RemoteObject*/ ).runVoidMethod ("Close");
 }else 
{ BA.debugLineNum = 339;BA.debugLine="else if user.Text = \"KMTS1\" Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("KMTS1"))) { 
 BA.debugLineNum = 340;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
Debug.ShouldStop(524288);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from usuarioa")));
 BA.debugLineNum = 341;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
Debug.ShouldStop(1048576);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO USUARIOA VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 342;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
Debug.ShouldStop(2097152);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from cat_almacen")));
 BA.debugLineNum = 343;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
Debug.ShouldStop(4194304);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText"))})))));
 BA.debugLineNum = 344;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
Debug.ShouldStop(8388608);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from VERSION")));
 BA.debugLineNum = 345;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
Debug.ShouldStop(16777216);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO VERSION(NOVERSION) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("2.1"))})))));
 BA.debugLineNum = 346;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
Debug.ShouldStop(33554432);
b4xmainpage._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Clientes")));
 }else 
{ BA.debugLineNum = 347;BA.debugLine="else if user.Text = \"BERNA1\" Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("BERNA1"))) { 
 BA.debugLineNum = 348;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
Debug.ShouldStop(134217728);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from usuarioa")));
 BA.debugLineNum = 349;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
Debug.ShouldStop(268435456);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO USUARIOA VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText")),(RemoteObject.createImmutable("1"))})))));
 BA.debugLineNum = 350;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
Debug.ShouldStop(536870912);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from cat_almacen")));
 BA.debugLineNum = 351;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("1"))})))));
 BA.debugLineNum = 352;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from VERSION")));
 BA.debugLineNum = 353;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
Debug.ShouldStop(1);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO VERSION(NOVERSION) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("2.1"))})))));
 BA.debugLineNum = 354;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
Debug.ShouldStop(2);
b4xmainpage._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Clientes")));
 }else 
{ BA.debugLineNum = 355;BA.debugLine="else if user.Text = \"IMEI\" Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("IMEI"))) { 
 BA.debugLineNum = 356;BA.debugLine="user.Text = IMEI";
Debug.ShouldStop(8);
__ref.getField(false,"_user" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(__ref.getField(true,"_imei" /*RemoteObject*/ )));
 }}}}
;
 BA.debugLineNum = 359;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
Debug.ShouldStop(64);
__ref.getField(false,"_c" /*RemoteObject*/ ).setObject (__ref.getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select count(*) as EXISTE1 from usuarioa where usuario = ?")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText")}))));
 BA.debugLineNum = 360;BA.debugLine="c.Position=0";
Debug.ShouldStop(128);
__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 361;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
Debug.ShouldStop(256);
__ref.setField ("_existe" /*RemoteObject*/ ,__ref.getField(false,"_c" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("EXISTE1"))));
 BA.debugLineNum = 362;BA.debugLine="If existe = 0 Then";
Debug.ShouldStop(512);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_existe" /*RemoteObject*/ ),BA.NumberToString(0))) { 
 BA.debugLineNum = 363;BA.debugLine="If IMEI = \"\" Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_imei" /*RemoteObject*/ ),BA.ObjectToString(""))) { 
 BA.debugLineNum = 364;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(2048);
b4xmainpage._cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");__ref.setField("_cmd",b4xmainpage._cmd);
 BA.debugLineNum = 365;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(4096);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 366;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\" 'Antes sele";
Debug.ShouldStop(8192);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_usuario_MEDI_10"));
 BA.debugLineNum = 367;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Trim";
Debug.ShouldStop(16384);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim"))}));
 BA.debugLineNum = 368;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
Debug.ShouldStop(32768);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_cmd" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("usuario_10"))));
 }else {
 BA.debugLineNum = 370;BA.debugLine="If IMEI = \"\" Then";
Debug.ShouldStop(131072);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_imei" /*RemoteObject*/ ),BA.ObjectToString(""))) { 
 BA.debugLineNum = 371;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(262144);
b4xmainpage._cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");__ref.setField("_cmd",b4xmainpage._cmd);
 BA.debugLineNum = 372;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(524288);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 373;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\"";
Debug.ShouldStop(1048576);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_usuario_MEDI_10"));
 BA.debugLineNum = 374;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Tri";
Debug.ShouldStop(2097152);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim"))}));
 BA.debugLineNum = 375;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
Debug.ShouldStop(4194304);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_cmd" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("usuario_10"))));
 }else {
 BA.debugLineNum = 377;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(16777216);
b4xmainpage._cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");__ref.setField("_cmd",b4xmainpage._cmd);
 BA.debugLineNum = 378;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(33554432);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 379;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\" 'Antes sel";
Debug.ShouldStop(67108864);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_usuario_MEDI_10"));
 BA.debugLineNum = 380;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Tri";
Debug.ShouldStop(134217728);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Parameters" /*RemoteObject*/ ,RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim"))}));
 BA.debugLineNum = 381;BA.debugLine="Log(\"Mandamos: \"&user.Text&\"|\"& pass.Text)";
Debug.ShouldStop(268435456);
b4xmainpage.__c.runVoidMethod ("LogImpl","3852056",RemoteObject.concat(RemoteObject.createImmutable("Mandamos: "),__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),RemoteObject.createImmutable("|"),__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText")),0);
 BA.debugLineNum = 382;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
Debug.ShouldStop(536870912);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_cmd" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("usuario_10"))));
 };
 };
 BA.debugLineNum = 385;BA.debugLine="Dim cmd As DBCommand";
Debug.ShouldStop(1);
b4xmainpage._cmd = RemoteObject.createNew ("keymon.lat.medicomed.dbrequestmanager._dbcommand");__ref.setField("_cmd",b4xmainpage._cmd);
 BA.debugLineNum = 386;BA.debugLine="cmd.Initialize";
Debug.ShouldStop(2);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).runVoidMethod ("Initialize");
 BA.debugLineNum = 387;BA.debugLine="cmd.Name = \"select_version_MEDI\"";
Debug.ShouldStop(4);
__ref.getField(false,"_cmd" /*RemoteObject*/ ).setField ("Name" /*RemoteObject*/ ,BA.ObjectToString("select_version_MEDI"));
 BA.debugLineNum = 388;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"version\")";
Debug.ShouldStop(8);
__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_executequery" /*RemoteObject*/ ,(Object)(__ref.getField(false,"_cmd" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)((RemoteObject.createImmutable("version"))));
 }else {
 BA.debugLineNum = 390;BA.debugLine="usuario = user.Text";
Debug.ShouldStop(32);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"));
 BA.debugLineNum = 391;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(64);
b4xmainpage._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 };
 BA.debugLineNum = 393;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _entrar_longclick(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("Entrar_LongClick (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,665);
if (RapidSub.canDelegate("entrar_longclick")) { return __ref.runUserSub(false, "b4xmainpage","entrar_longclick", __ref);}
 BA.debugLineNum = 665;BA.debugLine="Sub Entrar_LongClick";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 667;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _gps_locationchanged(RemoteObject __ref,RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,531);
if (RapidSub.canDelegate("gps_locationchanged")) { return __ref.runUserSub(false, "b4xmainpage","gps_locationchanged", __ref, _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 531;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(262144);
 BA.debugLineNum = 532;BA.debugLine="If user.text = \"GPS\" Then";
Debug.ShouldStop(524288);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("GPS"))) { 
 BA.debugLineNum = 533;BA.debugLine="user.Text=Location1.Latitude";
Debug.ShouldStop(1048576);
__ref.getField(false,"_user" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_location1.runMethod(true,"getLatitude")));
 BA.debugLineNum = 534;BA.debugLine="pass.text=Location1.Longitude";
Debug.ShouldStop(2097152);
__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_location1.runMethod(true,"getLongitude")));
 };
 BA.debugLineNum = 536;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _i_engrane_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("i_engrane_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,635);
if (RapidSub.canDelegate("i_engrane_click")) { return __ref.runUserSub(false, "b4xmainpage","i_engrane_click", __ref);}
 BA.debugLineNum = 635;BA.debugLine="Sub i_engrane_Click";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 636;BA.debugLine="lv_server.Clear";
Debug.ShouldStop(134217728);
__ref.getField(false,"_lv_server" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 637;BA.debugLine="lv_server.AddSingleLine(\"http://keymon.lat:1781\")";
Debug.ShouldStop(268435456);
__ref.getField(false,"_lv_server" /*RemoteObject*/ ).runVoidMethod ("AddSingleLine",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("http://keymon.lat:1781"))));
 BA.debugLineNum = 638;BA.debugLine="If user.Text = \"KMTS1\" Then lv_server.AddSingleLi";
Debug.ShouldStop(536870912);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("KMTS1"))) { 
__ref.getField(false,"_lv_server" /*RemoteObject*/ ).runVoidMethod ("AddSingleLine",(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("http://10.0.0.205:1781"))));};
 BA.debugLineNum = 640;BA.debugLine="et_server.Text = Starter.server";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_et_server" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(b4xmainpage._starter._server /*RemoteObject*/ ));
 BA.debugLineNum = 641;BA.debugLine="Subs.panelVisible(p_appUpdate,0,0)";
Debug.ShouldStop(1);
b4xmainpage._subs.runVoidMethod ("_panelvisible" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_p_appupdate" /*RemoteObject*/ )),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)));
 BA.debugLineNum = 642;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _i_engrane_longclick(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("i_engrane_LongClick (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,649);
if (RapidSub.canDelegate("i_engrane_longclick")) { return __ref.runUserSub(false, "b4xmainpage","i_engrane_longclick", __ref);}
 BA.debugLineNum = 649;BA.debugLine="Sub i_engrane_LongClick";
Debug.ShouldStop(256);
 BA.debugLineNum = 650;BA.debugLine="copiaDB";
Debug.ShouldStop(512);
__ref.runClassMethod (keymon.lat.medicomed.b4xmainpage.class, "_copiadb" /*void*/ );
 BA.debugLineNum = 651;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,96);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "b4xmainpage","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 96;BA.debugLine="Public Sub Initialize";
Debug.ShouldStop(-2147483648);
 BA.debugLineNum = 98;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _jobdone(RemoteObject __ref,RemoteObject _job) throws Exception{
try {
		Debug.PushSubsStack("JobDone (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,395);
if (RapidSub.canDelegate("jobdone")) { return __ref.runUserSub(false, "b4xmainpage","jobdone", __ref, _job);}
RemoteObject _result = RemoteObject.declareNull("keymon.lat.medicomed.dbrequestmanager._dbresult");
RemoteObject _records = null;
RemoteObject _cat_ve_version = RemoteObject.createImmutable("");
RemoteObject _k = RemoteObject.createImmutable("");
RemoteObject _id_almacen = RemoteObject.createImmutable("");
RemoteObject _fecha_hoy = RemoteObject.createImmutable("");
RemoteObject _name = RemoteObject.createImmutable("");
RemoteObject _imei_base = RemoteObject.createImmutable("");
Debug.locals.put("Job", _job);
 BA.debugLineNum = 395;BA.debugLine="Sub JobDone(Job As HttpJob)";
Debug.ShouldStop(1024);
 BA.debugLineNum = 396;BA.debugLine="Log(Job.Success)";
Debug.ShouldStop(2048);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917505",BA.ObjectToString(_job.getField(true,"_success" /*RemoteObject*/ )),0);
 BA.debugLineNum = 397;BA.debugLine="If Job.Success = False Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_success" /*RemoteObject*/ ),b4xmainpage.__c.getField(true,"False"))) { 
 BA.debugLineNum = 398;BA.debugLine="ToastMessageShow(\"Error - MainPage: \" & Job.Erro";
Debug.ShouldStop(8192);
b4xmainpage.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Error - MainPage: "),_job.getField(true,"_errormessage" /*RemoteObject*/ )))),(Object)(b4xmainpage.__c.getField(true,"True")));
 }else {
 BA.debugLineNum = 400;BA.debugLine="LogColor(\"JobDone - MainPage: '\" & reqManager.Ha";
Debug.ShouldStop(32768);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917509",RemoteObject.concat(RemoteObject.createImmutable("JobDone - MainPage: '"),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable("' - Registros: "),__ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job)).getField(false,"Rows" /*RemoteObject*/ ).runMethod(true,"getSize")),b4xmainpage.__c.getField(false,"Colors").getField(true,"Green"));
 BA.debugLineNum = 401;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 402;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
Debug.ShouldStop(131072);
_result = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("result", _result);Debug.locals.put("result", _result);
 BA.debugLineNum = 403;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("version")))) { 
 BA.debugLineNum = 404;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(524288);
{
final RemoteObject group9 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen9 = group9.runMethod(true,"getSize").<Integer>get()
;int index9 = 0;
;
for (; index9 < groupLen9;index9++){
_records = (group9.runMethod(false,"Get",index9));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 405;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
Debug.ShouldStop(1048576);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from VERSION")));
 BA.debugLineNum = 406;BA.debugLine="Dim CAT_VE_VERSION As String = records(result";
Debug.ShouldStop(2097152);
_cat_ve_version = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_VE_VERSION")))))));Debug.locals.put("CAT_VE_VERSION", _cat_ve_version);Debug.locals.put("CAT_VE_VERSION", _cat_ve_version);
 BA.debugLineNum = 407;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVER";
Debug.ShouldStop(4194304);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO VERSION(NOVERSION) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_cat_ve_version)})))));
 }
}Debug.locals.put("records", _records);
;
 };
 BA.debugLineNum = 411;BA.debugLine="If result.Tag = \"select_fechat\" Then 'query tag";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("select_fechat")))) { 
 BA.debugLineNum = 412;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(134217728);
{
final RemoteObject group16 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen16 = group16.runMethod(true,"getSize").<Integer>get()
;int index16 = 0;
;
for (; index16 < groupLen16;index16++){
_records = (group16.runMethod(false,"Get",index16));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 413;BA.debugLine="For Each k As String In result.Columns.Keys";
Debug.ShouldStop(268435456);
{
final RemoteObject group17 = _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Keys");
final int groupLen17 = group17.runMethod(true,"getSize").<Integer>get()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_k = BA.ObjectToString(group17.runMethod(false,"Get",index17));Debug.locals.put("k", _k);
Debug.locals.put("k", _k);
 BA.debugLineNum = 414;BA.debugLine="Log(\"select_fechat: \" & k & \": \" & records(r";
Debug.ShouldStop(536870912);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917523",RemoteObject.concat(RemoteObject.createImmutable("select_fechat: "),_k,RemoteObject.createImmutable(": "),_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((_k)))))),0);
 }
}Debug.locals.put("k", _k);
;
 }
}Debug.locals.put("records", _records);
;
 };
 };
 BA.debugLineNum = 420;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 421;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
Debug.ShouldStop(16);
_result = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("result", _result);Debug.locals.put("result", _result);
 BA.debugLineNum = 422;BA.debugLine="If result.Tag = \"agencia\" Then 'query tag";
Debug.ShouldStop(32);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("agencia")))) { 
 BA.debugLineNum = 423;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(64);
{
final RemoteObject group26 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen26 = group26.runMethod(true,"getSize").<Integer>get()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_records = (group26.runMethod(false,"Get",index26));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 424;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
Debug.ShouldStop(128);
_id_almacen = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("ID_ALMACEN")))))));Debug.locals.put("ID_ALMACEN", _id_almacen);Debug.locals.put("ID_ALMACEN", _id_almacen);
 }
}Debug.locals.put("records", _records);
;
 };
 };
 BA.debugLineNum = 429;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 430;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
Debug.ShouldStop(8192);
_result = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("result", _result);Debug.locals.put("result", _result);
 BA.debugLineNum = 431;BA.debugLine="If result.Tag = \"fecha\" Then 'query tag";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("fecha")))) { 
 BA.debugLineNum = 432;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(32768);
{
final RemoteObject group34 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen34 = group34.runMethod(true,"getSize").<Integer>get()
;int index34 = 0;
;
for (; index34 < groupLen34;index34++){
_records = (group34.runMethod(false,"Get",index34));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 433;BA.debugLine="Dim FECHA_HOY As String = records(result.Colu";
Debug.ShouldStop(65536);
_fecha_hoy = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("FECHA")))))));Debug.locals.put("FECHA_HOY", _fecha_hoy);Debug.locals.put("FECHA_HOY", _fecha_hoy);
 BA.debugLineNum = 434;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
Debug.ShouldStop(131072);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(RemoteObject.createImmutable("FECHA"))})))));
 BA.debugLineNum = 435;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES";
Debug.ShouldStop(262144);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {RemoteObject.createImmutable(("FECHA")),(_fecha_hoy)})))));
 }
}Debug.locals.put("records", _records);
;
 };
 };
 BA.debugLineNum = 440;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 441;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
Debug.ShouldStop(16777216);
_result = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("result", _result);Debug.locals.put("result", _result);
 BA.debugLineNum = 442;BA.debugLine="If result.Tag = \"usuario\" Then 'query tag";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("usuario")))) { 
 BA.debugLineNum = 443;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(67108864);
{
final RemoteObject group44 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen44 = group44.runMethod(true,"getSize").<Integer>get()
;int index44 = 0;
;
for (; index44 < groupLen44;index44++){
_records = (group44.runMethod(false,"Get",index44));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 444;BA.debugLine="Dim name As String = records(result.Columns.G";
Debug.ShouldStop(134217728);
_name = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("USUARIO")))))));Debug.locals.put("name", _name);Debug.locals.put("name", _name);
 BA.debugLineNum = 445;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
Debug.ShouldStop(268435456);
_id_almacen = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_LO_AGENCIA")))))));Debug.locals.put("ID_ALMACEN", _id_almacen);Debug.locals.put("ID_ALMACEN", _id_almacen);
 BA.debugLineNum = 446;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
Debug.ShouldStop(536870912);
_imei_base = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_LO_IDTELEFONO")))))));Debug.locals.put("IMEI_BASE", _imei_base);Debug.locals.put("IMEI_BASE", _imei_base);
 BA.debugLineNum = 447;BA.debugLine="Log(records(result.Columns.Get(\"CAT_LO_IDTELE";
Debug.ShouldStop(1073741824);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917556",BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_LO_IDTELEFONO"))))))),0);
 }
}Debug.locals.put("records", _records);
;
 BA.debugLineNum = 449;BA.debugLine="paso1 = 1";
Debug.ShouldStop(1);
__ref.setField ("_paso1" /*RemoteObject*/ ,BA.NumberToString(1));
 BA.debugLineNum = 450;BA.debugLine="ToastMessageShow(name, False)";
Debug.ShouldStop(2);
b4xmainpage.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(_name)),(Object)(b4xmainpage.__c.getField(true,"False")));
 BA.debugLineNum = 451;BA.debugLine="Log(\"//////////////////////////  \"&name)";
Debug.ShouldStop(4);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917560",RemoteObject.concat(RemoteObject.createImmutable("//////////////////////////  "),_name),0);
 };
 };
 BA.debugLineNum = 455;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",_job.getField(true,"_jobname" /*RemoteObject*/ ),BA.ObjectToString("DBRequest"))) { 
 BA.debugLineNum = 456;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
Debug.ShouldStop(128);
_result = __ref.getField(false,"_reqmanager" /*RemoteObject*/ ).runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_handlejob" /*RemoteObject*/ ,(Object)(_job));Debug.locals.put("result", _result);Debug.locals.put("result", _result);
 BA.debugLineNum = 457;BA.debugLine="If result.Tag = \"usuario_10\" Then 'query tag";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",_result.getField(false,"Tag" /*RemoteObject*/ ),RemoteObject.createImmutable(("usuario_10")))) { 
 BA.debugLineNum = 458;BA.debugLine="For Each records() As Object In result.Rows";
Debug.ShouldStop(512);
{
final RemoteObject group58 = _result.getField(false,"Rows" /*RemoteObject*/ );
final int groupLen58 = group58.runMethod(true,"getSize").<Integer>get()
;int index58 = 0;
;
for (; index58 < groupLen58;index58++){
_records = (group58.runMethod(false,"Get",index58));Debug.locals.put("records", _records);
Debug.locals.put("records", _records);
 BA.debugLineNum = 459;BA.debugLine="Dim name As String = records(result.Columns.G";
Debug.ShouldStop(1024);
_name = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("USUARIO")))))));Debug.locals.put("name", _name);Debug.locals.put("name", _name);
 BA.debugLineNum = 460;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
Debug.ShouldStop(2048);
_id_almacen = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_LO_AGENCIA")))))));Debug.locals.put("ID_ALMACEN", _id_almacen);Debug.locals.put("ID_ALMACEN", _id_almacen);
 BA.debugLineNum = 461;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
Debug.ShouldStop(4096);
_imei_base = BA.ObjectToString(_records.getArrayElement(false,BA.numberCast(int.class, _result.getField(false,"Columns" /*RemoteObject*/ ).runMethod(false,"Get",(Object)((RemoteObject.createImmutable("CAT_LO_IDTELEFONO")))))));Debug.locals.put("IMEI_BASE", _imei_base);Debug.locals.put("IMEI_BASE", _imei_base);
 }
}Debug.locals.put("records", _records);
;
 BA.debugLineNum = 463;BA.debugLine="Log(\"|\"&name&\"|\")";
Debug.ShouldStop(16384);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917572",RemoteObject.concat(RemoteObject.createImmutable("|"),_name,RemoteObject.createImmutable("|")),0);
 BA.debugLineNum = 464;BA.debugLine="paso1 = 1";
Debug.ShouldStop(32768);
__ref.setField ("_paso1" /*RemoteObject*/ ,BA.NumberToString(1));
 BA.debugLineNum = 465;BA.debugLine="IMEI_BASE = \"\"";
Debug.ShouldStop(65536);
_imei_base = BA.ObjectToString("");Debug.locals.put("IMEI_BASE", _imei_base);
 BA.debugLineNum = 466;BA.debugLine="IMEI = \"\"";
Debug.ShouldStop(131072);
__ref.setField ("_imei" /*RemoteObject*/ ,BA.ObjectToString(""));
 };
 };
 BA.debugLineNum = 469;BA.debugLine="Job.Release";
Debug.ShouldStop(1048576);
_job.runClassMethod (keymon.lat.medicomed.httpjob.class, "_release" /*RemoteObject*/ );
 };
 BA.debugLineNum = 471;BA.debugLine="Log($\"Paso1 = ${paso1} - Name: ${name} - IMEI: ${";
Debug.ShouldStop(4194304);
b4xmainpage.__c.runVoidMethod ("LogImpl","3917580",(RemoteObject.concat(RemoteObject.createImmutable("Paso1 = "),b4xmainpage.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_paso1" /*RemoteObject*/ )))),RemoteObject.createImmutable(" - Name: "),b4xmainpage.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_name))),RemoteObject.createImmutable(" - IMEI: "),b4xmainpage.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((__ref.getField(true,"_imei" /*RemoteObject*/ )))),RemoteObject.createImmutable(" - IMEI_BASE: "),b4xmainpage.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_imei_base))),RemoteObject.createImmutable(""))),0);
 BA.debugLineNum = 472;BA.debugLine="If paso1 = 1 Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_paso1" /*RemoteObject*/ ),BA.NumberToString(1))) { 
 BA.debugLineNum = 473;BA.debugLine="If IMEI = \"\" Then";
Debug.ShouldStop(16777216);
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_imei" /*RemoteObject*/ ),BA.ObjectToString(""))) { 
 BA.debugLineNum = 474;BA.debugLine="If user.Text = \"KMTS1\" Then name = \"OKActivo\"";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"),BA.ObjectToString("KMTS1"))) { 
_name = BA.ObjectToString("OKActivo");Debug.locals.put("name", _name);};
 BA.debugLineNum = 475;BA.debugLine="If name = \"OKActivo\"  Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_name,BA.ObjectToString("OKActivo"))) { 
 BA.debugLineNum = 476;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
Debug.ShouldStop(134217728);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from usuarioa")));
 BA.debugLineNum = 477;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUE";
Debug.ShouldStop(268435456);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO USUARIOA VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim"))})))));
 BA.debugLineNum = 478;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
Debug.ShouldStop(536870912);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from cat_almacen")));
 BA.debugLineNum = 479;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_id_almacen)})))));
 BA.debugLineNum = 480;BA.debugLine="usuario = user.Text";
Debug.ShouldStop(-2147483648);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"));
 BA.debugLineNum = 481;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(1);
b4xmainpage._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Principal")));
 }else 
{ BA.debugLineNum = 482;BA.debugLine="Else If name  = \"OKExpirado\" Then";
Debug.ShouldStop(2);
if (RemoteObject.solveBoolean("=",_name,BA.ObjectToString("OKExpirado"))) { 
 BA.debugLineNum = 483;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administrad";
Debug.ShouldStop(4);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }else 
{ BA.debugLineNum = 484;BA.debugLine="Else If name = \"OKCancelado\" Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_name,BA.ObjectToString("OKCancelado"))) { 
 BA.debugLineNum = 485;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administra";
Debug.ShouldStop(16);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 487;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'Ig";
Debug.ShouldStop(64);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario o password No validos")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }}}
;
 BA.debugLineNum = 489;BA.debugLine="paso1 = 0";
Debug.ShouldStop(256);
__ref.setField ("_paso1" /*RemoteObject*/ ,BA.NumberToString(0));
 }else {
 BA.debugLineNum = 491;BA.debugLine="If name = \"OKActivo\" & IMEI And  IMEI = IMEI_BA";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",_name,RemoteObject.concat(RemoteObject.createImmutable("OKActivo"),__ref.getField(true,"_imei" /*RemoteObject*/ ))) && RemoteObject.solveBoolean("=",__ref.getField(true,"_imei" /*RemoteObject*/ ),_imei_base)) { 
 BA.debugLineNum = 492;BA.debugLine="If name = \"OKActivo\" & IMEI Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",_name,RemoteObject.concat(RemoteObject.createImmutable("OKActivo"),__ref.getField(true,"_imei" /*RemoteObject*/ )))) { 
 BA.debugLineNum = 493;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
Debug.ShouldStop(4096);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from usuarioa")));
 BA.debugLineNum = 494;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALU";
Debug.ShouldStop(8192);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO USUARIOA VALUES (?,?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim")),(__ref.getField(false,"_pass" /*RemoteObject*/ ).runMethod(true,"getText").runMethod(true,"trim"))})))));
 BA.debugLineNum = 495;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
Debug.ShouldStop(16384);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from cat_almacen")));
 BA.debugLineNum = 496;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(I";
Debug.ShouldStop(32768);
__ref.getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)")),(Object)(b4xmainpage.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_id_almacen)})))));
 BA.debugLineNum = 497;BA.debugLine="usuario = user.Text";
Debug.ShouldStop(65536);
__ref.setField ("_usuario" /*RemoteObject*/ ,__ref.getField(false,"_user" /*RemoteObject*/ ).runMethod(true,"getText"));
 BA.debugLineNum = 498;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
Debug.ShouldStop(131072);
b4xmainpage._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Clientes")));
 }else 
{ BA.debugLineNum = 499;BA.debugLine="Else If name  = \"OKExpirado\"& IMEI Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("=",_name,RemoteObject.concat(RemoteObject.createImmutable("OKExpirado"),__ref.getField(true,"_imei" /*RemoteObject*/ )))) { 
 BA.debugLineNum = 500;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administra";
Debug.ShouldStop(524288);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }else 
{ BA.debugLineNum = 501;BA.debugLine="Else If name = \"OKCancelado\"& IMEI Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("=",_name,RemoteObject.concat(RemoteObject.createImmutable("OKCancelado"),__ref.getField(true,"_imei" /*RemoteObject*/ )))) { 
 BA.debugLineNum = 502;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administr";
Debug.ShouldStop(2097152);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 504;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'i";
Debug.ShouldStop(8388608);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario o password No validos")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }}}
;
 BA.debugLineNum = 506;BA.debugLine="paso1 = 0";
Debug.ShouldStop(33554432);
__ref.setField ("_paso1" /*RemoteObject*/ ,BA.NumberToString(0));
 }else 
{ BA.debugLineNum = 507;BA.debugLine="Else IF  name = \"OKActivo\" Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_name,BA.ObjectToString("OKActivo"))) { 
 BA.debugLineNum = 508;BA.debugLine="Msgbox(\"Telefono no VALIDO!\",\"\") 'ignore";
Debug.ShouldStop(134217728);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Telefono no VALIDO!")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }else {
 BA.debugLineNum = 510;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'ig";
Debug.ShouldStop(536870912);
b4xmainpage.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence("Usuario o password No validos")),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable(""))),__ref.getField(false, "ba"));
 }}
;
 };
 };
 BA.debugLineNum = 514;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _lv_server_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("lv_server_ItemClick (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,669);
if (RapidSub.canDelegate("lv_server_itemclick")) { return __ref.runUserSub(false, "b4xmainpage","lv_server_itemclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 669;BA.debugLine="Private Sub lv_server_ItemClick (Position As Int,";
Debug.ShouldStop(268435456);
 BA.debugLineNum = 670;BA.debugLine="Starter.server = Value";
Debug.ShouldStop(536870912);
b4xmainpage._starter._server /*RemoteObject*/  = BA.ObjectToString(_value);
 BA.debugLineNum = 672;BA.debugLine="et_server.Text = Value";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_et_server" /*RemoteObject*/ ).runMethodAndSync(true,"setText",BA.ObjectToCharSequence(_value));
 BA.debugLineNum = 673;BA.debugLine="Starter.reqManager.Initialize(Me, Value)";
Debug.ShouldStop(1);
b4xmainpage._starter._reqmanager /*RemoteObject*/ .runClassMethod (keymon.lat.medicomed.dbrequestmanager.class, "_initialize" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref),(Object)(BA.ObjectToString(_value)));
 BA.debugLineNum = 674;BA.debugLine="ToastMessageShow(\"Servidor modificado\", False)";
Debug.ShouldStop(2);
b4xmainpage.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Servidor modificado")),(Object)(b4xmainpage.__c.getField(true,"False")));
 BA.debugLineNum = 675;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _muestraprogreso(RemoteObject __ref,RemoteObject _mensaje) throws Exception{
try {
		Debug.PushSubsStack("muestraProgreso (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,626);
if (RapidSub.canDelegate("muestraprogreso")) { return __ref.runUserSub(false, "b4xmainpage","muestraprogreso", __ref, _mensaje);}
Debug.locals.put("mensaje", _mensaje);
 BA.debugLineNum = 626;BA.debugLine="Sub muestraProgreso(mensaje As String)";
Debug.ShouldStop(131072);
 BA.debugLineNum = 627;BA.debugLine="ProgressDialogShow(mensaje)";
Debug.ShouldStop(262144);
b4xmainpage.__c.runVoidMethod ("ProgressDialogShow",__ref.getField(false, "ba"),(Object)(BA.ObjectToCharSequence(_mensaje)));
 BA.debugLineNum = 628;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _ocultaprogreso(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("ocultaProgreso (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,631);
if (RapidSub.canDelegate("ocultaprogreso")) { return __ref.runUserSub(false, "b4xmainpage","ocultaprogreso", __ref);}
 BA.debugLineNum = 631;BA.debugLine="Sub ocultaProgreso";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 632;BA.debugLine="ProgressDialogHide";
Debug.ShouldStop(8388608);
b4xmainpage.__c.runVoidMethod ("ProgressDialogHide");
 BA.debugLineNum = 633;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _pdf_click(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("PDF_Click (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,551);
if (RapidSub.canDelegate("pdf_click")) { return __ref.runUserSub(false, "b4xmainpage","pdf_click", __ref);}
 BA.debugLineNum = 551;BA.debugLine="Sub PDF_Click";
Debug.ShouldStop(64);
 BA.debugLineNum = 553;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _popupmenu_dismiss(RemoteObject __ref) throws Exception{
try {
		Debug.PushSubsStack("PopupMenu_Dismiss (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,538);
if (RapidSub.canDelegate("popupmenu_dismiss")) { return __ref.runUserSub(false, "b4xmainpage","popupmenu_dismiss", __ref);}
 BA.debugLineNum = 538;BA.debugLine="Sub PopupMenu_Dismiss";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 539;BA.debugLine="ToastMessageShow(\"PopupMenu dismissed\", False)";
Debug.ShouldStop(67108864);
b4xmainpage.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("PopupMenu dismissed")),(Object)(b4xmainpage.__c.getField(true,"False")));
 BA.debugLineNum = 540;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _popupmenu_menuitemclick(RemoteObject __ref,RemoteObject _itemid) throws Exception{
try {
		Debug.PushSubsStack("PopupMenu_MenuItemClick (b4xmainpage) ","b4xmainpage",1,__ref.getField(false, "ba"),__ref,542);
if (RapidSub.canDelegate("popupmenu_menuitemclick")) { return __ref.runUserSub(false, "b4xmainpage","popupmenu_menuitemclick", __ref, _itemid);}
Debug.locals.put("ItemId", _itemid);
 BA.debugLineNum = 542;BA.debugLine="Sub PopupMenu_MenuItemClick (ItemId As Int) As Boo";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 543;BA.debugLine="ToastMessageShow(\"Item \" & ItemId & \" clicked.\",";
Debug.ShouldStop(1073741824);
b4xmainpage.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Item "),_itemid,RemoteObject.createImmutable(" clicked.")))),(Object)(b4xmainpage.__c.getField(true,"False")));
 BA.debugLineNum = 544;BA.debugLine="Return False";
Debug.ShouldStop(-2147483648);
if (true) return b4xmainpage.__c.getField(true,"False");
 BA.debugLineNum = 545;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}