package keymon.lat.medicomed;


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

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

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public keymon.lat.medicomed.b4xmainpage _login = null;
public keymon.lat.medicomed.dbrequestmanager _reqmanager = null;
public keymon.lat.medicomed.c_principal _principal = null;
public keymon.lat.medicomed.c_clientes _clientes = null;
public keymon.lat.medicomed.c_cliente _cliente = null;
public keymon.lat.medicomed.c_productos _productos = null;
public keymon.lat.medicomed.c_updateavailable _updateavailable = null;
public keymon.lat.medicomed.c_mapas _mapas = null;
public keymon.lat.medicomed.c_nuevocliente _nuevocliente = null;
public keymon.lat.medicomed.c_ticketsdia _ticketsdia = null;
public keymon.lat.medicomed.c_noventa _noventa = null;
public keymon.lat.medicomed.c_nota _nota = null;
public keymon.lat.medicomed.c_pedidos _pedidos = null;
public keymon.lat.medicomed.c_promos _promos = null;
public keymon.lat.medicomed.c_historico _historico = null;
public String _v = "";
public String _ruta = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public String _lat_gps = "";
public String _lon_gps = "";
public String _usuario = "";
public int _batt = 0;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public String _montoactual = "";
public String _clientestotal = "";
public String _clientesventa = "";
public String _clientesvisitados = "";
public String _almacen = "";
public String _rutapreventa = "";
public String _server = "";
public String _fecharuta = "";
public boolean _logger = false;
public String _mac_impresora = "";
public anywheresoftware.b4a.phone.Phone.PhoneId _phn = null;
public anywheresoftware.b4a.objects.EditTextWrapper _user = null;
public anywheresoftware.b4a.objects.EditTextWrapper _pass = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _existe = "";
public String _paso1 = "";
public anywheresoftware.b4a.objects.LabelWrapper _imen = null;
public String _imei = "";
public String _alterno = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_menu = null;
public com.rootsoft.rspopupmenu.RSPopupMenu _popupmenu = null;
public keymon.lat.medicomed.dbrequestmanager._dbcommand _cmd = null;
public anywheresoftware.b4a.objects.ButtonWrapper _pdf = null;
public batteryprogressviewwrapper.batteryprogressviewWrapper _bpv1 = null;
public int[] _batterystatus = null;
public keymon.lat.medicomed.batteryutilities _bu = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_apk = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _i_engrane = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_main = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_appupdate = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regesar = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_version = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _entrar = null;
public String _tipo_venta = "";
public boolean _bterminarclicked = false;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_server = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_server = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_server = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_server = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_enviobd = null;
public keymon.lat.medicomed.fileprovider _provider = null;
public String _rutabdbackup = "";
public b4a.example.dateutils _dateutils = null;
public keymon.lat.medicomed.main _main = null;
public keymon.lat.medicomed.starter _starter = null;
public keymon.lat.medicomed.subs _subs = null;
public keymon.lat.medicomed.appupdater _appupdater = null;
public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null;
public keymon.lat.medicomed.tracker _tracker = null;
public keymon.lat.medicomed.newinst2 _newinst2 = null;
public keymon.lat.medicomed.b4xpages _b4xpages = null;
public keymon.lat.medicomed.b4xcollections _b4xcollections = null;
public keymon.lat.medicomed.httputils2service _httputils2service = null;
public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null;
public String  _b_apk_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b_apk_click", false))
	 {return ((String) Debug.delegate(ba, "b_apk_click", null));}
RDebugUtils.currentLine=1507328;
 //BA.debugLineNum = 1507328;BA.debugLine="Sub b_apk_Click";
RDebugUtils.currentLine=1507329;
 //BA.debugLineNum = 1507329;BA.debugLine="StartService(appUpdater)";
__c.StartService(ba,(Object)(_appupdater.getObject()));
RDebugUtils.currentLine=1507330;
 //BA.debugLineNum = 1507330;BA.debugLine="End Sub";
return "";
}
public void  _b_enviobd_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b_enviobd_click", false))
	 {Debug.delegate(ba, "b_enviobd_click", null); return;}
ResumableSub_b_envioBD_Click rsub = new ResumableSub_b_envioBD_Click(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_b_envioBD_Click extends BA.ResumableSub {
public ResumableSub_b_envioBD_Click(keymon.lat.medicomed.b4xmainpage parent,keymon.lat.medicomed.b4xmainpage __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.b4xmainpage __ref;
keymon.lat.medicomed.b4xmainpage parent;
String _filename = "";
anywheresoftware.b4a.phone.Phone.Email _email = null;
anywheresoftware.b4a.objects.IntentWrapper _in = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="b4xmainpage";

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

case 0:
//C
this.state = -1;
RDebugUtils.currentLine=2097155;
 //BA.debugLineNum = 2097155;BA.debugLine="Dim FileName As String = \"kmt.db\"";
_filename = "kmt.db";
RDebugUtils.currentLine=2097157;
 //BA.debugLineNum = 2097157;BA.debugLine="Log(\"xxxxxx:\"&Provider.SharedFolder)";
parent.__c.LogImpl("32097157","xxxxxx:"+__ref._provider /*keymon.lat.medicomed.fileprovider*/ ._sharedfolder /*String*/ ,0);
RDebugUtils.currentLine=2097158;
 //BA.debugLineNum = 2097158;BA.debugLine="Sleep(1000)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "b4xmainpage", "b_enviobd_click"),(int) (1000));
this.state = 1;
return;
case 1:
//C
this.state = -1;
;
RDebugUtils.currentLine=2097159;
 //BA.debugLineNum = 2097159;BA.debugLine="File.Copy(File.DirInternal, FileName, Provider.Sh";
parent.__c.File.Copy(parent.__c.File.getDirInternal(),_filename,__ref._provider /*keymon.lat.medicomed.fileprovider*/ ._sharedfolder /*String*/ ,_filename);
RDebugUtils.currentLine=2097160;
 //BA.debugLineNum = 2097160;BA.debugLine="Dim email As Email";
_email = new anywheresoftware.b4a.phone.Phone.Email();
RDebugUtils.currentLine=2097161;
 //BA.debugLineNum = 2097161;BA.debugLine="email.To.Add(\"cheveguerra@gmail.com\")";
_email.To.Add((Object)("cheveguerra@gmail.com"));
RDebugUtils.currentLine=2097162;
 //BA.debugLineNum = 2097162;BA.debugLine="email.Subject = \"subject\"";
_email.Subject = "subject";
RDebugUtils.currentLine=2097163;
 //BA.debugLineNum = 2097163;BA.debugLine="email.Attachments.Add(Provider.GetFileUri(FileNam";
_email.Attachments.Add(__ref._provider /*keymon.lat.medicomed.fileprovider*/ ._getfileuri /*Object*/ (null,_filename));
RDebugUtils.currentLine=2097165;
 //BA.debugLineNum = 2097165;BA.debugLine="Dim in As Intent = email.GetIntent";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
_in = (anywheresoftware.b4a.objects.IntentWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.IntentWrapper(), (android.content.Intent)(_email.GetIntent()));
RDebugUtils.currentLine=2097166;
 //BA.debugLineNum = 2097166;BA.debugLine="in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION";
_in.setFlags((int) (1));
RDebugUtils.currentLine=2097167;
 //BA.debugLineNum = 2097167;BA.debugLine="StartActivity(in)";
parent.__c.StartActivity(ba,(Object)(_in.getObject()));
RDebugUtils.currentLine=2097168;
 //BA.debugLineNum = 2097168;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b_menu_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b_menu_click", false))
	 {return ((String) Debug.delegate(ba, "b_menu_click", null));}
RDebugUtils.currentLine=1245184;
 //BA.debugLineNum = 1245184;BA.debugLine="Sub b_menu_Click";
RDebugUtils.currentLine=1245185;
 //BA.debugLineNum = 1245185;BA.debugLine="PopupMenu.Show";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .Show();
RDebugUtils.currentLine=1245186;
 //BA.debugLineNum = 1245186;BA.debugLine="End Sub";
return "";
}
public String  _b_regesar_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b_regesar_click", false))
	 {return ((String) Debug.delegate(ba, "b_regesar_click", null));}
RDebugUtils.currentLine=1769472;
 //BA.debugLineNum = 1769472;BA.debugLine="Sub b_regesar_Click";
RDebugUtils.currentLine=1769473;
 //BA.debugLineNum = 1769473;BA.debugLine="p_appUpdate.Visible = False";
__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=1769474;
 //BA.debugLineNum = 1769474;BA.debugLine="Subs.panelVisible(p_Main,0,0)";
_subs._panelvisible /*String*/ (ba,__ref._p_main /*anywheresoftware.b4a.objects.PanelWrapper*/ ,(int) (0),(int) (0));
RDebugUtils.currentLine=1769475;
 //BA.debugLineNum = 1769475;BA.debugLine="End Sub";
return "";
}
public String  _b_server_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b_server_click", false))
	 {return ((String) Debug.delegate(ba, "b_server_click", null));}
RDebugUtils.currentLine=1900544;
 //BA.debugLineNum = 1900544;BA.debugLine="Sub B_SERVER_Click";
RDebugUtils.currentLine=1900545;
 //BA.debugLineNum = 1900545;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES whe";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("SERVER")}));
RDebugUtils.currentLine=1900546;
 //BA.debugLineNum = 1900546;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES(CAT";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("SERVER"),(Object)(__ref._et_server /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())}));
RDebugUtils.currentLine=1900547;
 //BA.debugLineNum = 1900547;BA.debugLine="Starter.server = et_server.text";
_starter._server /*String*/  = __ref._et_server /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText();
RDebugUtils.currentLine=1900548;
 //BA.debugLineNum = 1900548;BA.debugLine="If Logger Then Log(\"Inicializamos reqManager con";
if (__ref._logger /*boolean*/ ) { 
__c.LogImpl("31900548","Inicializamos reqManager con "+_starter._server /*String*/ ,0);};
RDebugUtils.currentLine=1900549;
 //BA.debugLineNum = 1900549;BA.debugLine="reqManager.Initialize(Me, Starter.server)";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_starter._server /*String*/ );
RDebugUtils.currentLine=1900550;
 //BA.debugLineNum = 1900550;BA.debugLine="CallSubDelayed(Starter, \"reinicializaReqManager\")";
__c.CallSubDelayed(ba,(Object)(_starter.getObject()),"reinicializaReqManager");
RDebugUtils.currentLine=1900551;
 //BA.debugLineNum = 1900551;BA.debugLine="Subs.panelVisible(p_Main,0,0)";
_subs._panelvisible /*String*/ (ba,__ref._p_main /*anywheresoftware.b4a.objects.PanelWrapper*/ ,(int) (0),(int) (0));
RDebugUtils.currentLine=1900552;
 //BA.debugLineNum = 1900552;BA.debugLine="p_appUpdate.Visible = False";
__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=1900554;
 //BA.debugLineNum = 1900554;BA.debugLine="End Sub";
return "";
}
public void  _b4xpage_appear(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {Debug.delegate(ba, "b4xpage_appear", null); return;}
ResumableSub_B4XPage_Appear rsub = new ResumableSub_B4XPage_Appear(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XPage_Appear extends BA.ResumableSub {
public ResumableSub_B4XPage_Appear(keymon.lat.medicomed.b4xmainpage parent,keymon.lat.medicomed.b4xmainpage __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.b4xmainpage __ref;
keymon.lat.medicomed.b4xmainpage parent;
anywheresoftware.b4a.phone.Phone _ph = null;
String _deviceid = "";
String _sdate = "";
String _stime = "";

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="b4xmainpage";

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

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=786433;
 //BA.debugLineNum = 786433;BA.debugLine="If Starter.muestraProgreso = 1 Then";
if (true) break;

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

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=786434;
 //BA.debugLineNum = 786434;BA.debugLine="muestraProgreso(\"Descargando actualización\")";
__ref._muestraprogreso /*String*/ (null,"Descargando actualización");
RDebugUtils.currentLine=786435;
 //BA.debugLineNum = 786435;BA.debugLine="Starter.muestraProgreso = 0";
parent._starter._muestraprogreso /*String*/  = BA.NumberToString(0);
 if (true) break;

case 4:
//C
this.state = 5;
;
RDebugUtils.currentLine=786437;
 //BA.debugLineNum = 786437;BA.debugLine="Dim ph As Phone 'Get Id Device";
_ph = new anywheresoftware.b4a.phone.Phone();
RDebugUtils.currentLine=786438;
 //BA.debugLineNum = 786438;BA.debugLine="Dim DeviceID As String = ph.GetSettings(\"android_";
_deviceid = _ph.GetSettings("android_id").toUpperCase();
RDebugUtils.currentLine=786439;
 //BA.debugLineNum = 786439;BA.debugLine="LogColor($\"//////////////////   DeviceID: ${Devic";
parent.__c.LogImpl("3786439",("//////////////////   DeviceID: "+parent.__c.SmartStringFormatter("",(Object)(_deviceid))+" ////////////////// "),parent.__c.Colors.Blue);
RDebugUtils.currentLine=786440;
 //BA.debugLineNum = 786440;BA.debugLine="server = Starter.server";
__ref._server /*String*/  = parent._starter._server /*String*/ ;
RDebugUtils.currentLine=786441;
 //BA.debugLineNum = 786441;BA.debugLine="reqManager.Initialize(Me, Starter.server)";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._initialize /*String*/ (null,ba,parent,parent._starter._server /*String*/ );
RDebugUtils.currentLine=786442;
 //BA.debugLineNum = 786442;BA.debugLine="tgl.Initialize()";
__ref._tgl /*com.rootsoft.togglelibrary.ToggleLibrary*/ .Initialize(ba);
RDebugUtils.currentLine=786443;
 //BA.debugLineNum = 786443;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (true) break;

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

case 7:
//C
this.state = 8;
RDebugUtils.currentLine=786444;
 //BA.debugLineNum = 786444;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),parent.__c.True);
RDebugUtils.currentLine=786445;
 //BA.debugLineNum = 786445;BA.debugLine="Sleep(500)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "b4xmainpage", "b4xpage_appear"),(int) (500));
this.state = 19;
return;
case 19:
//C
this.state = 8;
;
RDebugUtils.currentLine=786446;
 //BA.debugLineNum = 786446;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
parent.__c.StartActivity(ba,(Object)(parent._starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 if (true) break;

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

case 9:
//if
this.state = 18;
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
this.state = 11;
}else {
this.state = 13;
}if (true) break;

case 11:
//C
this.state = 18;
RDebugUtils.currentLine=786451;
 //BA.debugLineNum = 786451;BA.debugLine="LogColor($\"No hay fecha: ${c.GetString(\"CUANTOS\"";
parent.__c.LogImpl("3786451",("No hay fecha: "+parent.__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")))+""),parent.__c.Colors.Red);
RDebugUtils.currentLine=786452;
 //BA.debugLineNum = 786452;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=786453;
 //BA.debugLineNum = 786453;BA.debugLine="cmd.Name = \"select_fecha\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "select_fecha";
RDebugUtils.currentLine=786454;
 //BA.debugLineNum = 786454;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fecha\")";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executequery /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(int) (0),(Object)("fecha"));
RDebugUtils.currentLine=786455;
 //BA.debugLineNum = 786455;BA.debugLine="Msgbox(\"AJUSTAR FECHA\",\"AVISO\") 'Ignore";
parent.__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR FECHA"),BA.ObjectToCharSequence("AVISO"),ba);
RDebugUtils.currentLine=786456;
 //BA.debugLineNum = 786456;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 if (true) break;

case 13:
//C
this.state = 14;
RDebugUtils.currentLine=786459;
 //BA.debugLineNum = 786459;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_VA_VALOR from CAT_";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"FECHA"})));
RDebugUtils.currentLine=786460;
 //BA.debugLineNum = 786460;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=786461;
 //BA.debugLineNum = 786461;BA.debugLine="Dim sDate, sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=786462;
 //BA.debugLineNum = 786462;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
parent.__c.DateTime.setDateFormat("yyyyMMdd");
RDebugUtils.currentLine=786463;
 //BA.debugLineNum = 786463;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=786468;
 //BA.debugLineNum = 786468;BA.debugLine="If c.GetString(\"CAT_VA_VALOR\") > sDate Then";
if (true) break;

case 14:
//if
this.state = 17;
if ((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_VA_VALOR")))>(double)(Double.parseDouble(_sdate))) { 
this.state = 16;
}if (true) break;

case 16:
//C
this.state = 17;
RDebugUtils.currentLine=786469;
 //BA.debugLineNum = 786469;BA.debugLine="Msgbox(\"AJUSTAR LA FECHA YA QUE ES MENOR AL SIS";
parent.__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA"),BA.ObjectToCharSequence("AVISO"),ba);
RDebugUtils.currentLine=786470;
 //BA.debugLineNum = 786470;BA.debugLine="B4XPage_Appear";
__ref._b4xpage_appear /*void*/ (null);
 if (true) break;

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

case 18:
//C
this.state = -1;
;
RDebugUtils.currentLine=786473;
 //BA.debugLineNum = 786473;BA.debugLine="bu.Initialize";
__ref._bu /*keymon.lat.medicomed.batteryutilities*/ ._initialize /*String*/ (null,ba);
RDebugUtils.currentLine=786474;
 //BA.debugLineNum = 786474;BA.debugLine="batterystatus = bu.BatteryInformation";
__ref._batterystatus /*int[]*/  = __ref._bu /*keymon.lat.medicomed.batteryutilities*/ ._getbatteryinformation /*int[]*/ (null);
RDebugUtils.currentLine=786477;
 //BA.debugLineNum = 786477;BA.debugLine="dameUsuario";
__ref._dameusuario /*String*/ (null);
RDebugUtils.currentLine=786478;
 //BA.debugLineNum = 786478;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _muestraprogreso(keymon.lat.medicomed.b4xmainpage __ref,String _mensaje) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "muestraprogreso", false))
	 {return ((String) Debug.delegate(ba, "muestraprogreso", new Object[] {_mensaje}));}
RDebugUtils.currentLine=1572864;
 //BA.debugLineNum = 1572864;BA.debugLine="Sub muestraProgreso(mensaje As String)";
RDebugUtils.currentLine=1572865;
 //BA.debugLineNum = 1572865;BA.debugLine="ProgressDialogShow(mensaje)";
__c.ProgressDialogShow(ba,BA.ObjectToCharSequence(_mensaje));
RDebugUtils.currentLine=1572866;
 //BA.debugLineNum = 1572866;BA.debugLine="End Sub";
return "";
}
public String  _dameusuario(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "dameusuario", false))
	 {return ((String) Debug.delegate(ba, "dameusuario", null));}
RDebugUtils.currentLine=1376256;
 //BA.debugLineNum = 1376256;BA.debugLine="Sub dameUsuario";
RDebugUtils.currentLine=1376257;
 //BA.debugLineNum = 1376257;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as EXISTE1 from usuarioa where usuario = ?",new String[]{__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()})));
RDebugUtils.currentLine=1376258;
 //BA.debugLineNum = 1376258;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=1376259;
 //BA.debugLineNum = 1376259;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE1");
RDebugUtils.currentLine=1376260;
 //BA.debugLineNum = 1376260;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=1376261;
 //BA.debugLineNum = 1376261;BA.debugLine="If existe > 0 Then";
if ((double)(Double.parseDouble(__ref._existe /*String*/ ))>0) { 
RDebugUtils.currentLine=1376262;
 //BA.debugLineNum = 1376262;BA.debugLine="c=skmt.ExecQuery(\"select USUARIO from usuarioa\")";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select USUARIO from usuarioa")));
RDebugUtils.currentLine=1376263;
 //BA.debugLineNum = 1376263;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=1376264;
 //BA.debugLineNum = 1376264;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
 }else {
RDebugUtils.currentLine=1376266;
 //BA.debugLineNum = 1376266;BA.debugLine="usuario = \"SINUSUARIO\"";
__ref._usuario /*String*/  = "SINUSUARIO";
 };
RDebugUtils.currentLine=1376268;
 //BA.debugLineNum = 1376268;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b4xpage_closerequest", false))
	 {return ((anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) Debug.delegate(ba, "b4xpage_closerequest", null));}
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this,__ref);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(keymon.lat.medicomed.b4xmainpage parent,keymon.lat.medicomed.b4xmainpage __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.b4xmainpage __ref;
keymon.lat.medicomed.b4xmainpage parent;

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="b4xmainpage";

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
RDebugUtils.currentLine=983041;
 //BA.debugLineNum = 983041;BA.debugLine="Log(\"closreq\")";
parent.__c.LogImpl("3983041","closreq",0);
RDebugUtils.currentLine=983042;
 //BA.debugLineNum = 983042;BA.debugLine="Sleep(0)";
parent.__c.Sleep(ba,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "b4xmainpage", "b4xpage_closerequest"),(int) (0));
this.state = 8;
return;
case 8:
//C
this.state = 1;
;
RDebugUtils.currentLine=983043;
 //BA.debugLineNum = 983043;BA.debugLine="If p_appUpdate.Visible Then";
if (true) break;

case 1:
//if
this.state = 4;
if (__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .getVisible()) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
RDebugUtils.currentLine=983044;
 //BA.debugLineNum = 983044;BA.debugLine="Log(\"update visible\")";
parent.__c.LogImpl("3983044","update visible",0);
RDebugUtils.currentLine=983045;
 //BA.debugLineNum = 983045;BA.debugLine="p_appUpdate.Visible = False";
__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(parent.__c.False);
RDebugUtils.currentLine=983046;
 //BA.debugLineNum = 983046;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;
;
RDebugUtils.currentLine=983048;
 //BA.debugLineNum = 983048;BA.debugLine="If Not(p_appUpdate.Visible) Then";

case 4:
//if
this.state = 7;
if (parent.__c.Not(__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .getVisible())) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
RDebugUtils.currentLine=983049;
 //BA.debugLineNum = 983049;BA.debugLine="Log(\"ExitApplication\")";
parent.__c.LogImpl("3983049","ExitApplication",0);
RDebugUtils.currentLine=983050;
 //BA.debugLineNum = 983050;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
 if (true) break;

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

            }
        }
    }
}
public String  _b4xpage_created(keymon.lat.medicomed.b4xmainpage __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=720896;
 //BA.debugLineNum = 720896;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=720897;
 //BA.debugLineNum = 720897;BA.debugLine="B4XPages.GetManager.LogEvents = True";
_b4xpages._getmanager /*keymon.lat.medicomed.b4xpagesmanager*/ (ba)._logevents /*boolean*/  = __c.True;
RDebugUtils.currentLine=720898;
 //BA.debugLineNum = 720898;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=720899;
 //BA.debugLineNum = 720899;BA.debugLine="Root.LoadLayout(\"login\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("login",ba);
RDebugUtils.currentLine=720900;
 //BA.debugLineNum = 720900;BA.debugLine="B4XPages.SetTitle(Me, \"Medicomed Preventa\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Medicomed Preventa"));
RDebugUtils.currentLine=720901;
 //BA.debugLineNum = 720901;BA.debugLine="login.Initialize";
__ref._login /*keymon.lat.medicomed.b4xmainpage*/ ._initialize /*String*/ (null,ba);
RDebugUtils.currentLine=720902;
 //BA.debugLineNum = 720902;BA.debugLine="B4XPages.AddPage(\"Login\", login)";
_b4xpages._addpage /*String*/ (ba,"Login",(Object)(__ref._login /*keymon.lat.medicomed.b4xmainpage*/ ));
RDebugUtils.currentLine=720903;
 //BA.debugLineNum = 720903;BA.debugLine="principal.Initialize";
__ref._principal /*keymon.lat.medicomed.c_principal*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720904;
 //BA.debugLineNum = 720904;BA.debugLine="B4XPages.AddPage(\"Principal\", principal)";
_b4xpages._addpage /*String*/ (ba,"Principal",(Object)(__ref._principal /*keymon.lat.medicomed.c_principal*/ ));
RDebugUtils.currentLine=720905;
 //BA.debugLineNum = 720905;BA.debugLine="clientes.Initialize";
__ref._clientes /*keymon.lat.medicomed.c_clientes*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720906;
 //BA.debugLineNum = 720906;BA.debugLine="B4XPages.AddPage(\"Clientes\", clientes)";
_b4xpages._addpage /*String*/ (ba,"Clientes",(Object)(__ref._clientes /*keymon.lat.medicomed.c_clientes*/ ));
RDebugUtils.currentLine=720907;
 //BA.debugLineNum = 720907;BA.debugLine="cliente.Initialize";
__ref._cliente /*keymon.lat.medicomed.c_cliente*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720908;
 //BA.debugLineNum = 720908;BA.debugLine="B4XPages.AddPage(\"Cliente\", cliente)";
_b4xpages._addpage /*String*/ (ba,"Cliente",(Object)(__ref._cliente /*keymon.lat.medicomed.c_cliente*/ ));
RDebugUtils.currentLine=720909;
 //BA.debugLineNum = 720909;BA.debugLine="productos.Initialize";
__ref._productos /*keymon.lat.medicomed.c_productos*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720910;
 //BA.debugLineNum = 720910;BA.debugLine="B4XPages.AddPage(\"Productos\", productos)";
_b4xpages._addpage /*String*/ (ba,"Productos",(Object)(__ref._productos /*keymon.lat.medicomed.c_productos*/ ));
RDebugUtils.currentLine=720911;
 //BA.debugLineNum = 720911;BA.debugLine="updateAvailable.Initialize";
__ref._updateavailable /*keymon.lat.medicomed.c_updateavailable*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720912;
 //BA.debugLineNum = 720912;BA.debugLine="B4XPages.AddPage(\"updateAvailable\", updateAvailab";
_b4xpages._addpage /*String*/ (ba,"updateAvailable",(Object)(__ref._updateavailable /*keymon.lat.medicomed.c_updateavailable*/ ));
RDebugUtils.currentLine=720913;
 //BA.debugLineNum = 720913;BA.debugLine="mapas.Initialize";
__ref._mapas /*keymon.lat.medicomed.c_mapas*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720914;
 //BA.debugLineNum = 720914;BA.debugLine="B4XPages.AddPage(\"Mapas\", mapas)";
_b4xpages._addpage /*String*/ (ba,"Mapas",(Object)(__ref._mapas /*keymon.lat.medicomed.c_mapas*/ ));
RDebugUtils.currentLine=720915;
 //BA.debugLineNum = 720915;BA.debugLine="nuevoCliente.Initialize";
__ref._nuevocliente /*keymon.lat.medicomed.c_nuevocliente*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720916;
 //BA.debugLineNum = 720916;BA.debugLine="B4XPages.AddPage(\"NuevoCliente\", nuevoCliente)";
_b4xpages._addpage /*String*/ (ba,"NuevoCliente",(Object)(__ref._nuevocliente /*keymon.lat.medicomed.c_nuevocliente*/ ));
RDebugUtils.currentLine=720917;
 //BA.debugLineNum = 720917;BA.debugLine="ticketsDia.Initialize";
__ref._ticketsdia /*keymon.lat.medicomed.c_ticketsdia*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720918;
 //BA.debugLineNum = 720918;BA.debugLine="B4XPages.AddPage(\"TicketsDia\", ticketsDia)";
_b4xpages._addpage /*String*/ (ba,"TicketsDia",(Object)(__ref._ticketsdia /*keymon.lat.medicomed.c_ticketsdia*/ ));
RDebugUtils.currentLine=720919;
 //BA.debugLineNum = 720919;BA.debugLine="noVenta.Initialize";
__ref._noventa /*keymon.lat.medicomed.c_noventa*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720920;
 //BA.debugLineNum = 720920;BA.debugLine="B4XPages.AddPage(\"NoVenta\", noVenta)";
_b4xpages._addpage /*String*/ (ba,"NoVenta",(Object)(__ref._noventa /*keymon.lat.medicomed.c_noventa*/ ));
RDebugUtils.currentLine=720921;
 //BA.debugLineNum = 720921;BA.debugLine="nota.Initialize";
__ref._nota /*keymon.lat.medicomed.c_nota*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720922;
 //BA.debugLineNum = 720922;BA.debugLine="B4XPages.AddPage(\"Nota\", nota)";
_b4xpages._addpage /*String*/ (ba,"Nota",(Object)(__ref._nota /*keymon.lat.medicomed.c_nota*/ ));
RDebugUtils.currentLine=720923;
 //BA.debugLineNum = 720923;BA.debugLine="pedidos.Initialize";
__ref._pedidos /*keymon.lat.medicomed.c_pedidos*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720924;
 //BA.debugLineNum = 720924;BA.debugLine="B4XPages.AddPage(\"Pedidos\", pedidos)";
_b4xpages._addpage /*String*/ (ba,"Pedidos",(Object)(__ref._pedidos /*keymon.lat.medicomed.c_pedidos*/ ));
RDebugUtils.currentLine=720925;
 //BA.debugLineNum = 720925;BA.debugLine="promos.Initialize";
__ref._promos /*keymon.lat.medicomed.c_promos*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720926;
 //BA.debugLineNum = 720926;BA.debugLine="B4XPages.AddPage(\"Promos\", promos)";
_b4xpages._addpage /*String*/ (ba,"Promos",(Object)(__ref._promos /*keymon.lat.medicomed.c_promos*/ ));
RDebugUtils.currentLine=720927;
 //BA.debugLineNum = 720927;BA.debugLine="historico.Initialize";
__ref._historico /*keymon.lat.medicomed.c_historico*/ ._initialize /*Object*/ (null,ba);
RDebugUtils.currentLine=720928;
 //BA.debugLineNum = 720928;BA.debugLine="B4XPages.AddPage(\"Historico\", historico)";
_b4xpages._addpage /*String*/ (ba,"Historico",(Object)(__ref._historico /*keymon.lat.medicomed.c_historico*/ ));
RDebugUtils.currentLine=720929;
 //BA.debugLineNum = 720929;BA.debugLine="ruta = Starter.ruta";
__ref._ruta /*String*/  = _starter._ruta /*String*/ ;
RDebugUtils.currentLine=720931;
 //BA.debugLineNum = 720931;BA.debugLine="Provider.Initialize";
__ref._provider /*keymon.lat.medicomed.fileprovider*/ ._initialize /*String*/ (null,ba);
RDebugUtils.currentLine=720934;
 //BA.debugLineNum = 720934;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=720935;
 //BA.debugLineNum = 720935;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
RDebugUtils.currentLine=720936;
 //BA.debugLineNum = 720936;BA.debugLine="Log(File.DirAssets)";
__c.LogImpl("3720936",__c.File.getDirAssets(),0);
RDebugUtils.currentLine=720937;
 //BA.debugLineNum = 720937;BA.debugLine="LogColor(\"copiamos kmt.db de \"&File.DirAssets &";
__c.LogImpl("3720937","copiamos kmt.db de "+__c.File.getDirAssets()+" a "+__ref._ruta /*String*/ ,__c.Colors.Green);
 };
RDebugUtils.currentLine=720939;
 //BA.debugLineNum = 720939;BA.debugLine="Log(ruta)";
__c.LogImpl("3720939",__ref._ruta /*String*/ ,0);
RDebugUtils.currentLine=720940;
 //BA.debugLineNum = 720940;BA.debugLine="skmt.Initialize(ruta,\"kmt.db\", True)";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(__ref._ruta /*String*/ ,"kmt.db",__c.True);
RDebugUtils.currentLine=720941;
 //BA.debugLineNum = 720941;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_CUOTAS (HC_META6 TEXT, HC_META5 TEXT, HC_META4 TEXT, HC_META3 TEXT, HC_META2 TEXT, HC_META1 TEXT, HC_RUTA TEXT, HC_CUOTA1 TEXT, HC_CUOTA2 TEXT, HC_CUOTA3 TEXT, HC_CUOTA4 TEXT, HC_CUOTA5 TEXT, HC_CUOTA6 TEXT)");
RDebugUtils.currentLine=720942;
 //BA.debugLineNum = 720942;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_GPS (HGDATE TEXT, HGLAT TEXT, HGLON TEXT)");
RDebugUtils.currentLine=720943;
 //BA.debugLineNum = 720943;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_STAY_STORE (HSS_CODIGO TEXT, HSS_IN TEXT, HSS_OUT TEXT, HSS_TOT TEXT)");
RDebugUtils.currentLine=720944;
 //BA.debugLineNum = 720944;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_STAY_OUT (HSO_INI TEXT, HSO_FIN TEXT)");
RDebugUtils.currentLine=720945;
 //BA.debugLineNum = 720945;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS INV";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS INVENT_X_ENVIAR (ALMACEN TEXT, PROID TEXT, CANTIDAD TEXT)");
RDebugUtils.currentLine=720946;
 //BA.debugLineNum = 720946;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_RESUM_APK (HIST_RA_OBJMES TEXT, HIST_RA_VENTA TEXT, HIST_RA_TENDENCIA TEXT, HIST_RA_ALCANCE TEXT, HISR_RA_DRAOBJ TEXT, HIST_RA_DRAVTA TEXT, HIST_RA_DSOBJ TEXT, HIST_RA_DSVTA TEXT, HIST_RA_VPOOBJ TEXT, HIST_RA_VPOVTA TEXT, HIST_RA_COBCCC TEXT, HIST_RA_CTES TEXT, HIST_RA_ECO TEXT, HIST_RA_VISITPLAN TEXT, HIST_RA_VISIREAL TEXT, HIST_RA_COBVISIT TEXT, HIST_RA_FRECCOMPOBJ TEXT, HIST_RA_FRECCOMREAL TEXT, HIST_RA_VENTAMES1 TEXT, HIST_RA_VENTAMES2 TEXT, HIST_RA_VENTAMES3 TEXT, HIST_RA_VENTAMES4 TEXT, HIST_RA_RECHAZO TEXT, HIST_RA_RECHAZOPORCEN TEXT, HIST_RA_SEMANA1 TEXT, HIST_RA_SEMANA1_DIAS TEXT, HIST_RA_SEMANA1_DRA TEXT, HIST_RA_SEMANA2 TEXT, HIST_RA_SEMANA2_DIAS TEXT, HIST_RA_SEMANA2_DRA TEXT, HIST_RA_SEMANA3 TEXT, HIST_RA_SEMANA3_DIAS TEXT, HIST_RA_SEMANA4 TEXT, HIST_RA_SEMANA3_DRA TEXT, HIST_RA_SEMANA4_DIAS TEXT, HIST_RA_SEMANA4_DRA TEXT, HIST_RA_SEMANA5 TEXT, HIST_RA_SEMANA5_DIAS TEXT, HIST_RA_SEMANA5_DRA TEXT, HIST_RA_SEMANA1_LPT TEXT, HIST_RA_SEMANA2_LPT TEXT, HIST_RA_SEMANA3_LPT TEXT, HIST_RA_SEMANA4_LPT TEXT, HIST_RA_SEMANA5_LPT TEXT, HIST_RA_RUTA TEXT, HIST_RA_IDALMACEN TEXT)");
RDebugUtils.currentLine=720947;
 //BA.debugLineNum = 720947;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_COMISIONES_MOVIL (HCM_IDALMACEN TEXT, HCM_RUTA TEXT, HCM_TOTAL_V TEXT, HCM_TOTAL_VIVE TEXT, HCM_TOTAL_GUNA TEXT,	HCM_TOTAL_BEB TEXT)");
RDebugUtils.currentLine=720948;
 //BA.debugLineNum = 720948;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_GEOCERCA (HGCLIENTE TEXT, HGDATE TEXT, HGLAT TEXT, HGLON TEXT)");
RDebugUtils.currentLine=720949;
 //BA.debugLineNum = 720949;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_FACE (HFCLIENTE TEXT, HFALIAS TEXT, HFRUTA TEXT, HFALMACEN TEXT)");
RDebugUtils.currentLine=720950;
 //BA.debugLineNum = 720950;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS RUT";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS RUTA_GPS(FECHA INTEGER, LAT TEXT, LON TEXT)");
RDebugUtils.currentLine=720951;
 //BA.debugLineNum = 720951;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS CATA";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE VIEW IF NOT EXISTS CATALOGO AS Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD UNION Select CAT_GP_CLASIF, CAT_GP_ID FROM CAT_GUNAPROD GROUP BY CAT_GP_CLASIF, CAT_GP_ID");
RDebugUtils.currentLine=720952;
 //BA.debugLineNum = 720952;BA.debugLine="skmt.ExecNonQuery(\"CREATE VIEW IF NOT EXISTS tota";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE VIEW IF NOT EXISTS total_marcas AS Select cat_gp_clasif, sum(pe_costo_tot) As total from CATALOGO, pedido where pe_proid = cat_gp_id 	And pe_cliente <> 0 	group by cat_gp_clasif");
RDebugUtils.currentLine=720953;
 //BA.debugLineNum = 720953;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_MARCAS_CUOTAS (HMC_MARCA TEXT, HMC_TOTAL TEXT)");
RDebugUtils.currentLine=720954;
 //BA.debugLineNum = 720954;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS HIS";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_CODIGO_BARRAS(CODIGOKMTS TEXT, CODIGOB TEXT, LAT TEXT, LON TEXT)");
RDebugUtils.currentLine=720955;
 //BA.debugLineNum = 720955;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS ABO";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS ABONOS (a_usuario TEXT, a_ruta TEXT, a_cliente TEXT, a_abono TEXT, a_fecha TEXT, a_enviado TEXT)");
RDebugUtils.currentLine=720956;
 //BA.debugLineNum = 720956;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS BIT";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("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)");
RDebugUtils.currentLine=720957;
 //BA.debugLineNum = 720957;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS VEN";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("CREATE TABLE IF NOT EXISTS VENTA_No_VENTA(usuariov TEXT, almacenv TEXT, rutav TEXT, eventov TEXT, clientev TEXT, iniciov TEXT, latitudv TEXT, longitudv TEXT)");
RDebugUtils.currentLine=720959;
 //BA.debugLineNum = 720959;BA.debugLine="skmt.ExecNonQuery(\"CREATE TABLE IF NOT EXISTS kmt";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("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)");
RDebugUtils.currentLine=720961;
 //BA.debugLineNum = 720961;BA.debugLine="Subs.agregaColumna(\"VENTA_No_VENTA\", \"montoVentav";
_subs._agregacolumna /*String*/ (ba,"VENTA_No_VENTA","montoVentav","TEXT");
RDebugUtils.currentLine=720963;
 //BA.debugLineNum = 720963;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
try {RDebugUtils.currentLine=720964;
 //BA.debugLineNum = 720964;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('kmt_info') WHERE name='CAT_CL_DIASEMANA'")));
RDebugUtils.currentLine=720965;
 //BA.debugLineNum = 720965;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=720966;
 //BA.debugLineNum = 720966;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("fCol")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=720967;
 //BA.debugLineNum = 720967;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE kmt_info ADD COLUMN CAT_CL_DIASEMANA TEXT");
 };
 } 
       catch (Exception e68) {
			ba.setLastException(e68);RDebugUtils.currentLine=720970;
 //BA.debugLineNum = 720970;BA.debugLine="Try";
try {RDebugUtils.currentLine=720971;
 //BA.debugLineNum = 720971;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE kmt_info ADD COLUMN CAT_CL_DIASEMANA TEXT");
 } 
       catch (Exception e71) {
			ba.setLastException(e71);RDebugUtils.currentLine=720973;
 //BA.debugLineNum = 720973;BA.debugLine="Log(LastException)";
__c.LogImpl("3720973",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
RDebugUtils.currentLine=720976;
 //BA.debugLineNum = 720976;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
try {RDebugUtils.currentLine=720977;
 //BA.debugLineNum = 720977;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('CAT_GUNAPROD') WHERE name='CAT_GP_TIPOPROD2'")));
RDebugUtils.currentLine=720978;
 //BA.debugLineNum = 720978;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=720979;
 //BA.debugLineNum = 720979;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("fCol")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=720980;
 //BA.debugLineNum = 720980;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE CAT_GUNAPROD ADD";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE CAT_GUNAPROD ADD COLUMN CAT_GP_TIPOPROD2 TEXT");
 };
 } 
       catch (Exception e81) {
			ba.setLastException(e81);RDebugUtils.currentLine=720983;
 //BA.debugLineNum = 720983;BA.debugLine="Try";
try {RDebugUtils.currentLine=720984;
 //BA.debugLineNum = 720984;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE CAT_GUNAPROD ADD";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE CAT_GUNAPROD ADD COLUMN CAT_GP_TIPOPROD2 TEXT");
 } 
       catch (Exception e84) {
			ba.setLastException(e84);RDebugUtils.currentLine=720986;
 //BA.debugLineNum = 720986;BA.debugLine="Log(LastException)";
__c.LogImpl("3720986",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
RDebugUtils.currentLine=720989;
 //BA.debugLineNum = 720989;BA.debugLine="Try 'Intentamos usar \"pragma_table_info\" para rev";
try {RDebugUtils.currentLine=720990;
 //BA.debugLineNum = 720990;BA.debugLine="c=skmt.ExecQuery(\"SELECT COUNT(*) AS fCol FROM p";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('kmt_info') WHERE name='CAT_CL_SECUENCIA'")));
RDebugUtils.currentLine=720991;
 //BA.debugLineNum = 720991;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=720992;
 //BA.debugLineNum = 720992;BA.debugLine="If c.GetString(\"fCol\") = 0 Then 'Si no esta la c";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("fCol")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=720993;
 //BA.debugLineNum = 720993;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE kmt_info ADD COLUMN CAT_CL_SECUENCIA INT");
 };
 } 
       catch (Exception e94) {
			ba.setLastException(e94);RDebugUtils.currentLine=720996;
 //BA.debugLineNum = 720996;BA.debugLine="Try";
try {RDebugUtils.currentLine=720997;
 //BA.debugLineNum = 720997;BA.debugLine="skmt.ExecNonQuery(\"ALTER TABLE kmt_info ADD COL";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("ALTER TABLE kmt_info ADD COLUMN CAT_CL_SECUENCIA INT");
 } 
       catch (Exception e97) {
			ba.setLastException(e97);RDebugUtils.currentLine=720999;
 //BA.debugLineNum = 720999;BA.debugLine="Log(LastException)";
__c.LogImpl("3720999",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
RDebugUtils.currentLine=721002;
 //BA.debugLineNum = 721002;BA.debugLine="c=skmt.ExecQuery(\"select COUNT(*) AS CUANTOS from";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select COUNT(*) AS CUANTOS from HIST_STAY_OUT ")));
RDebugUtils.currentLine=721003;
 //BA.debugLineNum = 721003;BA.debugLine="C.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=721004;
 //BA.debugLineNum = 721004;BA.debugLine="If c.GetString(\"CUANTOS\")  = 0 Then";
if ((__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=721005;
 //BA.debugLineNum = 721005;BA.debugLine="skmt.ExecNonQuery(\"INSERT INTO HIST_STAY_OUT(HSO";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("INSERT INTO HIST_STAY_OUT(HSO_INI, HSO_FIN) VALUES (0,0)");
 };
RDebugUtils.currentLine=721007;
 //BA.debugLineNum = 721007;BA.debugLine="C.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=721011;
 //BA.debugLineNum = 721011;BA.debugLine="l_version.Text = Application.VersionName";
__ref._l_version /*anywheresoftware.b4a.objects.LabelWrapper*/ .setText(BA.ObjectToCharSequence(__c.Application.getVersionName()));
RDebugUtils.currentLine=721013;
 //BA.debugLineNum = 721013;BA.debugLine="PopupMenu.Initialize(\"PopupMenu\", b_menu)";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .Initialize(ba,"PopupMenu",(anywheresoftware.b4a.objects.ConcreteViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ConcreteViewWrapper(), (android.view.View)(__ref._b_menu /*anywheresoftware.b4a.objects.ButtonWrapper*/ .getObject())));
RDebugUtils.currentLine=721014;
 //BA.debugLineNum = 721014;BA.debugLine="PopupMenu.AddMenuItem(0, 0, \"View\")";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .AddMenuItem((int) (0),(int) (0),"View");
RDebugUtils.currentLine=721015;
 //BA.debugLineNum = 721015;BA.debugLine="PopupMenu.AddMenuItem(1, 1, \"Edit\")";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .AddMenuItem((int) (1),(int) (1),"Edit");
RDebugUtils.currentLine=721016;
 //BA.debugLineNum = 721016;BA.debugLine="PopupMenu.AddMenuItem(2, 2, \"Details\")";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .AddMenuItem((int) (2),(int) (2),"Details");
RDebugUtils.currentLine=721017;
 //BA.debugLineNum = 721017;BA.debugLine="PopupMenu.AddMenuItem(3, 3, \"Remove\")";
__ref._popupmenu /*com.rootsoft.rspopupmenu.RSPopupMenu*/ .AddMenuItem((int) (3),(int) (3),"Remove");
RDebugUtils.currentLine=721019;
 //BA.debugLineNum = 721019;BA.debugLine="montoActual  = 0";
__ref._montoactual /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721020;
 //BA.debugLineNum = 721020;BA.debugLine="clientesTotal = 0";
__ref._clientestotal /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721021;
 //BA.debugLineNum = 721021;BA.debugLine="clientesVenta =  0";
__ref._clientesventa /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721022;
 //BA.debugLineNum = 721022;BA.debugLine="clientesVisitados = 0";
__ref._clientesvisitados /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721023;
 //BA.debugLineNum = 721023;BA.debugLine="almacen = 0";
__ref._almacen /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721024;
 //BA.debugLineNum = 721024;BA.debugLine="rutaPreventa =  0";
__ref._rutapreventa /*String*/  = BA.NumberToString(0);
RDebugUtils.currentLine=721025;
 //BA.debugLineNum = 721025;BA.debugLine="p_appUpdate.Visible = False";
__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=721036;
 //BA.debugLineNum = 721036;BA.debugLine="p_appUpdate.Visible = False";
__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ .setVisible(__c.False);
RDebugUtils.currentLine=721037;
 //BA.debugLineNum = 721037;BA.debugLine="End Sub";
return "";
}
public String  _initialize(keymon.lat.medicomed.b4xmainpage __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=655360;
 //BA.debugLineNum = 655360;BA.debugLine="Public Sub Initialize";
RDebugUtils.currentLine=655362;
 //BA.debugLineNum = 655362;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
RDebugUtils.currentLine=589824;
 //BA.debugLineNum = 589824;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=589825;
 //BA.debugLineNum = 589825;BA.debugLine="Private Root As B4XView";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=589826;
 //BA.debugLineNum = 589826;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=589827;
 //BA.debugLineNum = 589827;BA.debugLine="Public login As B4XMainPage";
_login = new keymon.lat.medicomed.b4xmainpage();
RDebugUtils.currentLine=589828;
 //BA.debugLineNum = 589828;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new keymon.lat.medicomed.dbrequestmanager();
RDebugUtils.currentLine=589829;
 //BA.debugLineNum = 589829;BA.debugLine="Public principal As C_Principal";
_principal = new keymon.lat.medicomed.c_principal();
RDebugUtils.currentLine=589830;
 //BA.debugLineNum = 589830;BA.debugLine="Public clientes As C_Clientes";
_clientes = new keymon.lat.medicomed.c_clientes();
RDebugUtils.currentLine=589831;
 //BA.debugLineNum = 589831;BA.debugLine="Public cliente As C_Cliente";
_cliente = new keymon.lat.medicomed.c_cliente();
RDebugUtils.currentLine=589832;
 //BA.debugLineNum = 589832;BA.debugLine="Public productos As C_Productos";
_productos = new keymon.lat.medicomed.c_productos();
RDebugUtils.currentLine=589833;
 //BA.debugLineNum = 589833;BA.debugLine="Public updateAvailable As C_UpdateAvailable";
_updateavailable = new keymon.lat.medicomed.c_updateavailable();
RDebugUtils.currentLine=589834;
 //BA.debugLineNum = 589834;BA.debugLine="Public mapas As C_Mapas";
_mapas = new keymon.lat.medicomed.c_mapas();
RDebugUtils.currentLine=589835;
 //BA.debugLineNum = 589835;BA.debugLine="Public nuevoCliente As C_NuevoCliente";
_nuevocliente = new keymon.lat.medicomed.c_nuevocliente();
RDebugUtils.currentLine=589836;
 //BA.debugLineNum = 589836;BA.debugLine="Public ticketsDia As C_TicketsDia";
_ticketsdia = new keymon.lat.medicomed.c_ticketsdia();
RDebugUtils.currentLine=589837;
 //BA.debugLineNum = 589837;BA.debugLine="Public noVenta As C_NoVenta";
_noventa = new keymon.lat.medicomed.c_noventa();
RDebugUtils.currentLine=589838;
 //BA.debugLineNum = 589838;BA.debugLine="Public nota As C_Nota";
_nota = new keymon.lat.medicomed.c_nota();
RDebugUtils.currentLine=589839;
 //BA.debugLineNum = 589839;BA.debugLine="Public pedidos As C_Pedidos";
_pedidos = new keymon.lat.medicomed.c_pedidos();
RDebugUtils.currentLine=589840;
 //BA.debugLineNum = 589840;BA.debugLine="Public promos As C_Promos";
_promos = new keymon.lat.medicomed.c_promos();
RDebugUtils.currentLine=589841;
 //BA.debugLineNum = 589841;BA.debugLine="Public historico As C_Historico";
_historico = new keymon.lat.medicomed.c_historico();
RDebugUtils.currentLine=589853;
 //BA.debugLineNum = 589853;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new keymon.lat.medicomed.dbrequestmanager();
RDebugUtils.currentLine=589854;
 //BA.debugLineNum = 589854;BA.debugLine="Dim v As String = Application.VersionName";
_v = __c.Application.getVersionName();
RDebugUtils.currentLine=589855;
 //BA.debugLineNum = 589855;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=589856;
 //BA.debugLineNum = 589856;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=589857;
 //BA.debugLineNum = 589857;BA.debugLine="Dim lat_gps, lon_gps As String";
_lat_gps = "";
_lon_gps = "";
RDebugUtils.currentLine=589858;
 //BA.debugLineNum = 589858;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=589859;
 //BA.debugLineNum = 589859;BA.debugLine="Dim batt As Int";
_batt = 0;
RDebugUtils.currentLine=589860;
 //BA.debugLineNum = 589860;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=589861;
 //BA.debugLineNum = 589861;BA.debugLine="Dim montoActual, clientesTotal, clientesVenta, cl";
_montoactual = "";
_clientestotal = "";
_clientesventa = "";
_clientesvisitados = "";
_almacen = "";
_rutapreventa = "";
RDebugUtils.currentLine=589862;
 //BA.debugLineNum = 589862;BA.debugLine="Dim server, fechaRuta As String";
_server = "";
_fecharuta = "";
RDebugUtils.currentLine=589863;
 //BA.debugLineNum = 589863;BA.debugLine="Dim Logger As Boolean";
_logger = false;
RDebugUtils.currentLine=589864;
 //BA.debugLineNum = 589864;BA.debugLine="Dim mac_impresora As String";
_mac_impresora = "";
RDebugUtils.currentLine=589865;
 //BA.debugLineNum = 589865;BA.debugLine="Dim Phn As PhoneId";
_phn = new anywheresoftware.b4a.phone.Phone.PhoneId();
RDebugUtils.currentLine=589867;
 //BA.debugLineNum = 589867;BA.debugLine="Dim user As EditText";
_user = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=589868;
 //BA.debugLineNum = 589868;BA.debugLine="Dim pass As EditText";
_pass = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=589869;
 //BA.debugLineNum = 589869;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=589870;
 //BA.debugLineNum = 589870;BA.debugLine="Dim existe As String";
_existe = "";
RDebugUtils.currentLine=589871;
 //BA.debugLineNum = 589871;BA.debugLine="Dim paso1 As String";
_paso1 = "";
RDebugUtils.currentLine=589872;
 //BA.debugLineNum = 589872;BA.debugLine="Private IMEN As Label";
_imen = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=589873;
 //BA.debugLineNum = 589873;BA.debugLine="Dim IMEI As String = \"\"";
_imei = "";
RDebugUtils.currentLine=589874;
 //BA.debugLineNum = 589874;BA.debugLine="Dim alterno As String";
_alterno = "";
RDebugUtils.currentLine=589875;
 //BA.debugLineNum = 589875;BA.debugLine="Private b_menu As Button";
_b_menu = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589876;
 //BA.debugLineNum = 589876;BA.debugLine="Dim PopupMenu As RSPopupMenu";
_popupmenu = new com.rootsoft.rspopupmenu.RSPopupMenu();
RDebugUtils.currentLine=589877;
 //BA.debugLineNum = 589877;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=589878;
 //BA.debugLineNum = 589878;BA.debugLine="Private PDF As Button";
_pdf = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589879;
 //BA.debugLineNum = 589879;BA.debugLine="Private bpv1 As BatteryProgressView";
_bpv1 = new batteryprogressviewwrapper.batteryprogressviewWrapper();
RDebugUtils.currentLine=589880;
 //BA.debugLineNum = 589880;BA.debugLine="Dim batterystatus(11) As Int";
_batterystatus = new int[(int) (11)];
;
RDebugUtils.currentLine=589881;
 //BA.debugLineNum = 589881;BA.debugLine="Private bu As BatteryUtilities";
_bu = new keymon.lat.medicomed.batteryutilities();
RDebugUtils.currentLine=589882;
 //BA.debugLineNum = 589882;BA.debugLine="Private b_apk As Button";
_b_apk = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589883;
 //BA.debugLineNum = 589883;BA.debugLine="Private i_engrane As ImageView";
_i_engrane = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=589884;
 //BA.debugLineNum = 589884;BA.debugLine="Private p_Main As Panel";
_p_main = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=589885;
 //BA.debugLineNum = 589885;BA.debugLine="Private p_appUpdate As Panel";
_p_appupdate = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=589886;
 //BA.debugLineNum = 589886;BA.debugLine="Private b_regesar As Button";
_b_regesar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589887;
 //BA.debugLineNum = 589887;BA.debugLine="Private l_version As Label";
_l_version = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=589888;
 //BA.debugLineNum = 589888;BA.debugLine="Private ImageView1 As ImageView";
_imageview1 = new anywheresoftware.b4a.objects.ImageViewWrapper();
RDebugUtils.currentLine=589889;
 //BA.debugLineNum = 589889;BA.debugLine="Private Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=589890;
 //BA.debugLineNum = 589890;BA.debugLine="Private Entrar As Button";
_entrar = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589891;
 //BA.debugLineNum = 589891;BA.debugLine="Dim tipo_venta As String";
_tipo_venta = "";
RDebugUtils.currentLine=589892;
 //BA.debugLineNum = 589892;BA.debugLine="Dim bTerminarClicked As Boolean = False";
_bterminarclicked = __c.False;
RDebugUtils.currentLine=589893;
 //BA.debugLineNum = 589893;BA.debugLine="Private lv_server As ListView";
_lv_server = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=589894;
 //BA.debugLineNum = 589894;BA.debugLine="Private l_server As Label";
_l_server = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=589895;
 //BA.debugLineNum = 589895;BA.debugLine="Private et_server As EditText";
_et_server = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=589896;
 //BA.debugLineNum = 589896;BA.debugLine="Private b_server As Button";
_b_server = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589897;
 //BA.debugLineNum = 589897;BA.debugLine="Private b_envioBD As Button";
_b_enviobd = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=589898;
 //BA.debugLineNum = 589898;BA.debugLine="Public Provider As FileProvider";
_provider = new keymon.lat.medicomed.fileprovider();
RDebugUtils.currentLine=589899;
 //BA.debugLineNum = 589899;BA.debugLine="Public rutaBDBackup As String = \"\"";
_rutabdbackup = "";
RDebugUtils.currentLine=589900;
 //BA.debugLineNum = 589900;BA.debugLine="End Sub";
return "";
}
public void  _copiadb(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "copiadb", false))
	 {Debug.delegate(ba, "copiadb", null); return;}
ResumableSub_copiaDB rsub = new ResumableSub_copiaDB(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_copiaDB extends BA.ResumableSub {
public ResumableSub_copiaDB(keymon.lat.medicomed.b4xmainpage parent,keymon.lat.medicomed.b4xmainpage __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
keymon.lat.medicomed.b4xmainpage __ref;
keymon.lat.medicomed.b4xmainpage parent;
String _permission = "";
boolean _result = false;
String _thedir = "";

@Override
public void resume(BA ba, Object[] result) throws Exception{
RDebugUtils.currentModule="b4xmainpage";

    while (true) {
try {

        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=1441793;
 //BA.debugLineNum = 1441793;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_WRITE_EXTERNAL_STORAGE);
RDebugUtils.currentLine=1441794;
 //BA.debugLineNum = 1441794;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "b4xmainpage", "copiadb"), null);
this.state = 18;
return;
case 18:
//C
this.state = 1;
_permission = (String) result[1];
_result = (Boolean) result[2];
;
RDebugUtils.currentLine=1441795;
 //BA.debugLineNum = 1441795;BA.debugLine="Dim theDir As String = \"\"";
_thedir = "";
RDebugUtils.currentLine=1441796;
 //BA.debugLineNum = 1441796;BA.debugLine="If Result Then";
if (true) break;

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

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

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

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

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

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;
RDebugUtils.currentLine=1441811;
 //BA.debugLineNum = 1441811;BA.debugLine="File.Copy(File.DirInternal,\"kmt.db\",File.DirRoo";
parent.__c.File.Copy(parent.__c.File.getDirInternal(),"kmt.db",parent.__c.File.getDirRootExternal()+_thedir,"medicomed_kmt.db");
RDebugUtils.currentLine=1441812;
 //BA.debugLineNum = 1441812;BA.debugLine="ToastMessageShow(\"Listo, copiado a \" & File.Dir";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Listo, copiado a "+parent.__c.File.getDirRootExternal()+_thedir+"/medicomed_kmt_kmt.db"),parent.__c.False);
 if (true) break;

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

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

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

case 17:
//C
this.state = -1;
;
RDebugUtils.currentLine=1441819;
 //BA.debugLineNum = 1441819;BA.debugLine="End Sub";
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
ba.setLastException(e0);}
            }
        }
    }
}
public String  _entrar_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "entrar_click", false))
	 {return ((String) Debug.delegate(ba, "entrar_click", null));}
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
int _api = 0;
anywheresoftware.b4a.phone.Phone _pp = null;
int _id = 0;
RDebugUtils.currentLine=851968;
 //BA.debugLineNum = 851968;BA.debugLine="Sub Entrar_Click";
RDebugUtils.currentLine=851969;
 //BA.debugLineNum = 851969;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
RDebugUtils.currentLine=851970;
 //BA.debugLineNum = 851970;BA.debugLine="Dim Api As Int";
_api = 0;
RDebugUtils.currentLine=851971;
 //BA.debugLineNum = 851971;BA.debugLine="Dim PP As Phone";
_pp = new anywheresoftware.b4a.phone.Phone();
RDebugUtils.currentLine=851972;
 //BA.debugLineNum = 851972;BA.debugLine="Api = r.GetStaticField(\"android.os.Build$VERSION\"";
_api = (int)(BA.ObjectToNumber(_r.GetStaticField("android.os.Build$VERSION","SDK_INT")));
RDebugUtils.currentLine=851973;
 //BA.debugLineNum = 851973;BA.debugLine="If Api < 9 Then";
if (_api<9) { 
RDebugUtils.currentLine=851975;
 //BA.debugLineNum = 851975;BA.debugLine="If File.Exists(File.DirInternal, \"__id\") Then";
if (__c.File.Exists(__c.File.getDirInternal(),"__id")) { 
RDebugUtils.currentLine=851976;
 //BA.debugLineNum = 851976;BA.debugLine="IMEI =  File.ReadString(File.DirInternal, \"__id";
__ref._imei /*String*/  = __c.File.ReadString(__c.File.getDirInternal(),"__id");
RDebugUtils.currentLine=851977;
 //BA.debugLineNum = 851977;BA.debugLine="Log(1&\"-\"&IMEI)";
__c.LogImpl("3851977",BA.NumberToString(1)+"-"+__ref._imei /*String*/ ,0);
 }else {
RDebugUtils.currentLine=851979;
 //BA.debugLineNum = 851979;BA.debugLine="Dim id As Int";
_id = 0;
RDebugUtils.currentLine=851980;
 //BA.debugLineNum = 851980;BA.debugLine="id = Rnd(0x10000000, 0x7FFFFFFF)";
_id = __c.Rnd(((int)0x10000000),((int)0x7fffffff));
RDebugUtils.currentLine=851981;
 //BA.debugLineNum = 851981;BA.debugLine="File.WriteString(File.DirInternal, \"__id\", id)";
__c.File.WriteString(__c.File.getDirInternal(),"__id",BA.NumberToString(_id));
RDebugUtils.currentLine=851982;
 //BA.debugLineNum = 851982;BA.debugLine="IMEI =  id";
__ref._imei /*String*/  = BA.NumberToString(_id);
RDebugUtils.currentLine=851983;
 //BA.debugLineNum = 851983;BA.debugLine="Log(2&\"-\"&IMEI)";
__c.LogImpl("3851983",BA.NumberToString(2)+"-"+__ref._imei /*String*/ ,0);
 };
 }else {
RDebugUtils.currentLine=851987;
 //BA.debugLineNum = 851987;BA.debugLine="IMEI =  r.GetStaticField(\"android.os.Build\", \"SE";
__ref._imei /*String*/  = BA.ObjectToString(_r.GetStaticField("android.os.Build","SERIAL"));
 };
RDebugUtils.currentLine=851990;
 //BA.debugLineNum = 851990;BA.debugLine="If IMEI.ToLowerCase = \"unknown\" Then";
if ((__ref._imei /*String*/ .toLowerCase()).equals("unknown")) { 
RDebugUtils.currentLine=851991;
 //BA.debugLineNum = 851991;BA.debugLine="IMEI = PP.GetSettings(\"android_id\")";
__ref._imei /*String*/  = _pp.GetSettings("android_id");
 };
RDebugUtils.currentLine=851995;
 //BA.debugLineNum = 851995;BA.debugLine="If user.Text = \"ALTERNO\" Then";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("ALTERNO")) { 
RDebugUtils.currentLine=851996;
 //BA.debugLineNum = 851996;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?",new String[]{"SERVER"})));
RDebugUtils.currentLine=851997;
 //BA.debugLineNum = 851997;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=851998;
 //BA.debugLineNum = 851998;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
__ref._server /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CO_CONFIGURACION");
RDebugUtils.currentLine=851999;
 //BA.debugLineNum = 851999;BA.debugLine="alterno = c.GetString(\"CAT_CO_RESULTADO\")";
__ref._alterno /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CO_RESULTADO");
RDebugUtils.currentLine=852000;
 //BA.debugLineNum = 852000;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=852001;
 //BA.debugLineNum = 852001;BA.debugLine="If alterno = 1 Then";
if ((__ref._alterno /*String*/ ).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=852002;
 //BA.debugLineNum = 852002;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
RDebugUtils.currentLine=852003;
 //BA.debugLineNum = 852003;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 }else 
{RDebugUtils.currentLine=852004;
 //BA.debugLineNum = 852004;BA.debugLine="Else if alterno = 2 Then";
if ((__ref._alterno /*String*/ ).equals(BA.NumberToString(2))) { 
RDebugUtils.currentLine=852005;
 //BA.debugLineNum = 852005;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 1 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
RDebugUtils.currentLine=852006;
 //BA.debugLineNum = 852006;BA.debugLine="skmt.ExecNonQuery2(\"UPDATE CAT_CODIGOS SET CAT_";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE CAT_CODIGOS SET CAT_CO_PONDERACION = 0 WHERE CAT_CO_ACCION = ? AND CAT_CO_RESULTADO = 2",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"SERVER"}));
 }}
;
RDebugUtils.currentLine=852008;
 //BA.debugLineNum = 852008;BA.debugLine="c=skmt.ExecQuery2(\"select CAT_CO_CONFIGURACION,";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_CO_CONFIGURACION, CAT_CO_RESULTADO from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?",new String[]{"SERVER"})));
RDebugUtils.currentLine=852009;
 //BA.debugLineNum = 852009;BA.debugLine="c.Position =0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=852010;
 //BA.debugLineNum = 852010;BA.debugLine="server = c.GetString(\"CAT_CO_CONFIGURACION\")";
__ref._server /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CO_CONFIGURACION");
RDebugUtils.currentLine=852011;
 //BA.debugLineNum = 852011;BA.debugLine="user.Text = server";
__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(__ref._server /*String*/ ));
RDebugUtils.currentLine=852012;
 //BA.debugLineNum = 852012;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 }else 
{RDebugUtils.currentLine=852014;
 //BA.debugLineNum = 852014;BA.debugLine="else if user.Text = \"KMTS1\" Then";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("KMTS1")) { 
RDebugUtils.currentLine=852015;
 //BA.debugLineNum = 852015;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from usuarioa");
RDebugUtils.currentLine=852016;
 //BA.debugLineNum = 852016;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())}));
RDebugUtils.currentLine=852017;
 //BA.debugLineNum = 852017;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_almacen");
RDebugUtils.currentLine=852018;
 //BA.debugLineNum = 852018;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText())}));
RDebugUtils.currentLine=852019;
 //BA.debugLineNum = 852019;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
RDebugUtils.currentLine=852020;
 //BA.debugLineNum = 852020;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("2.1")}));
RDebugUtils.currentLine=852021;
 //BA.debugLineNum = 852021;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 }else 
{RDebugUtils.currentLine=852022;
 //BA.debugLineNum = 852022;BA.debugLine="else if user.Text = \"BERNA1\" Then";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("BERNA1")) { 
RDebugUtils.currentLine=852023;
 //BA.debugLineNum = 852023;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from usuarioa");
RDebugUtils.currentLine=852024;
 //BA.debugLineNum = 852024;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUES";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)("1")}));
RDebugUtils.currentLine=852025;
 //BA.debugLineNum = 852025;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_almacen");
RDebugUtils.currentLine=852026;
 //BA.debugLineNum = 852026;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID_A";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("1")}));
RDebugUtils.currentLine=852027;
 //BA.debugLineNum = 852027;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
RDebugUtils.currentLine=852028;
 //BA.debugLineNum = 852028;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVERSIO";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("2.1")}));
RDebugUtils.currentLine=852029;
 //BA.debugLineNum = 852029;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 }else 
{RDebugUtils.currentLine=852030;
 //BA.debugLineNum = 852030;BA.debugLine="else if user.Text = \"IMEI\" Then";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("IMEI")) { 
RDebugUtils.currentLine=852031;
 //BA.debugLineNum = 852031;BA.debugLine="user.Text = IMEI";
__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(__ref._imei /*String*/ ));
 }}}}
;
RDebugUtils.currentLine=852034;
 //BA.debugLineNum = 852034;BA.debugLine="c=skmt.ExecQuery2(\"select count(*) as EXISTE1 fro";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as EXISTE1 from usuarioa where usuario = ?",new String[]{__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()})));
RDebugUtils.currentLine=852035;
 //BA.debugLineNum = 852035;BA.debugLine="c.Position=0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=852036;
 //BA.debugLineNum = 852036;BA.debugLine="existe = c.GetString(\"EXISTE1\")";
__ref._existe /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("EXISTE1");
RDebugUtils.currentLine=852037;
 //BA.debugLineNum = 852037;BA.debugLine="If existe = 0 Then";
if ((__ref._existe /*String*/ ).equals(BA.NumberToString(0))) { 
RDebugUtils.currentLine=852038;
 //BA.debugLineNum = 852038;BA.debugLine="If IMEI = \"\" Then";
if ((__ref._imei /*String*/ ).equals("")) { 
RDebugUtils.currentLine=852039;
 //BA.debugLineNum = 852039;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=852040;
 //BA.debugLineNum = 852040;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=852041;
 //BA.debugLineNum = 852041;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\" 'Antes sele";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "select_usuario_MEDI_10";
RDebugUtils.currentLine=852042;
 //BA.debugLineNum = 852042;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Trim";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim())};
RDebugUtils.currentLine=852043;
 //BA.debugLineNum = 852043;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executequery /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(int) (0),(Object)("usuario_10"));
 }else {
RDebugUtils.currentLine=852045;
 //BA.debugLineNum = 852045;BA.debugLine="If IMEI = \"\" Then";
if ((__ref._imei /*String*/ ).equals("")) { 
RDebugUtils.currentLine=852046;
 //BA.debugLineNum = 852046;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=852047;
 //BA.debugLineNum = 852047;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=852048;
 //BA.debugLineNum = 852048;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "select_usuario_MEDI_10";
RDebugUtils.currentLine=852049;
 //BA.debugLineNum = 852049;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Tri";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim())};
RDebugUtils.currentLine=852050;
 //BA.debugLineNum = 852050;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executequery /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(int) (0),(Object)("usuario_10"));
 }else {
RDebugUtils.currentLine=852052;
 //BA.debugLineNum = 852052;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=852053;
 //BA.debugLineNum = 852053;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=852054;
 //BA.debugLineNum = 852054;BA.debugLine="cmd.Name = \"select_usuario_MEDI_10\" 'Antes sel";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "select_usuario_MEDI_10";
RDebugUtils.currentLine=852055;
 //BA.debugLineNum = 852055;BA.debugLine="cmd.Parameters = Array As Object(user.Text.Tri";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Parameters /*Object[]*/  = new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim())};
RDebugUtils.currentLine=852056;
 //BA.debugLineNum = 852056;BA.debugLine="Log(\"Mandamos: \"&user.Text&\"|\"& pass.Text)";
__c.LogImpl("3852056","Mandamos: "+__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()+"|"+__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText(),0);
RDebugUtils.currentLine=852057;
 //BA.debugLineNum = 852057;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"usuario_10\")";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executequery /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(int) (0),(Object)("usuario_10"));
 };
 };
RDebugUtils.currentLine=852060;
 //BA.debugLineNum = 852060;BA.debugLine="Dim cmd As DBCommand";
_cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=852061;
 //BA.debugLineNum = 852061;BA.debugLine="cmd.Initialize";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Initialize();
RDebugUtils.currentLine=852062;
 //BA.debugLineNum = 852062;BA.debugLine="cmd.Name = \"select_version_MEDI\"";
__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ .Name /*String*/  = "select_version_MEDI";
RDebugUtils.currentLine=852063;
 //BA.debugLineNum = 852063;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"version\")";
__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._executequery /*String*/ (null,__ref._cmd /*keymon.lat.medicomed.dbrequestmanager._dbcommand*/ ,(int) (0),(Object)("version"));
 }else {
RDebugUtils.currentLine=852065;
 //BA.debugLineNum = 852065;BA.debugLine="usuario = user.Text";
__ref._usuario /*String*/  = __ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText();
RDebugUtils.currentLine=852066;
 //BA.debugLineNum = 852066;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 };
RDebugUtils.currentLine=852068;
 //BA.debugLineNum = 852068;BA.debugLine="End Sub";
return "";
}
public String  _entrar_longclick(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "entrar_longclick", false))
	 {return ((String) Debug.delegate(ba, "entrar_longclick", null));}
RDebugUtils.currentLine=1966080;
 //BA.debugLineNum = 1966080;BA.debugLine="Sub Entrar_LongClick";
RDebugUtils.currentLine=1966082;
 //BA.debugLineNum = 1966082;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(keymon.lat.medicomed.b4xmainpage __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=1048576;
 //BA.debugLineNum = 1048576;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=1048577;
 //BA.debugLineNum = 1048577;BA.debugLine="If user.text = \"GPS\" Then";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("GPS")) { 
RDebugUtils.currentLine=1048578;
 //BA.debugLineNum = 1048578;BA.debugLine="user.Text=Location1.Latitude";
__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(_location1.getLatitude()));
RDebugUtils.currentLine=1048579;
 //BA.debugLineNum = 1048579;BA.debugLine="pass.text=Location1.Longitude";
__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(_location1.getLongitude()));
 };
RDebugUtils.currentLine=1048581;
 //BA.debugLineNum = 1048581;BA.debugLine="End Sub";
return "";
}
public String  _i_engrane_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "i_engrane_click", false))
	 {return ((String) Debug.delegate(ba, "i_engrane_click", null));}
RDebugUtils.currentLine=1703936;
 //BA.debugLineNum = 1703936;BA.debugLine="Sub i_engrane_Click";
RDebugUtils.currentLine=1703937;
 //BA.debugLineNum = 1703937;BA.debugLine="lv_server.Clear";
__ref._lv_server /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=1703938;
 //BA.debugLineNum = 1703938;BA.debugLine="lv_server.AddSingleLine(\"http://keymon.lat:1781\")";
__ref._lv_server /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("http://keymon.lat:1781"));
RDebugUtils.currentLine=1703939;
 //BA.debugLineNum = 1703939;BA.debugLine="If user.Text = \"KMTS1\" Then lv_server.AddSingleLi";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("KMTS1")) { 
__ref._lv_server /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddSingleLine(BA.ObjectToCharSequence("http://10.0.0.205:1781"));};
RDebugUtils.currentLine=1703941;
 //BA.debugLineNum = 1703941;BA.debugLine="et_server.Text = Starter.server";
__ref._et_server /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(_starter._server /*String*/ ));
RDebugUtils.currentLine=1703942;
 //BA.debugLineNum = 1703942;BA.debugLine="Subs.panelVisible(p_appUpdate,0,0)";
_subs._panelvisible /*String*/ (ba,__ref._p_appupdate /*anywheresoftware.b4a.objects.PanelWrapper*/ ,(int) (0),(int) (0));
RDebugUtils.currentLine=1703943;
 //BA.debugLineNum = 1703943;BA.debugLine="End Sub";
return "";
}
public String  _i_engrane_longclick(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "i_engrane_longclick", false))
	 {return ((String) Debug.delegate(ba, "i_engrane_longclick", null));}
RDebugUtils.currentLine=1835008;
 //BA.debugLineNum = 1835008;BA.debugLine="Sub i_engrane_LongClick";
RDebugUtils.currentLine=1835009;
 //BA.debugLineNum = 1835009;BA.debugLine="copiaDB";
__ref._copiadb /*void*/ (null);
RDebugUtils.currentLine=1835010;
 //BA.debugLineNum = 1835010;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(keymon.lat.medicomed.b4xmainpage __ref,keymon.lat.medicomed.httpjob _job) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "jobdone", false))
	 {return ((String) Debug.delegate(ba, "jobdone", new Object[] {_job}));}
keymon.lat.medicomed.dbrequestmanager._dbresult _result = null;
Object[] _records = null;
String _cat_ve_version = "";
String _k = "";
String _id_almacen = "";
String _fecha_hoy = "";
String _name = "";
String _imei_base = "";
RDebugUtils.currentLine=917504;
 //BA.debugLineNum = 917504;BA.debugLine="Sub JobDone(Job As HttpJob)";
RDebugUtils.currentLine=917505;
 //BA.debugLineNum = 917505;BA.debugLine="Log(Job.Success)";
__c.LogImpl("3917505",BA.ObjectToString(_job._success /*boolean*/ ),0);
RDebugUtils.currentLine=917506;
 //BA.debugLineNum = 917506;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
RDebugUtils.currentLine=917507;
 //BA.debugLineNum = 917507;BA.debugLine="ToastMessageShow(\"Error - MainPage: \" & Job.Erro";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error - MainPage: "+_job._errormessage /*String*/ ),__c.True);
 }else {
RDebugUtils.currentLine=917509;
 //BA.debugLineNum = 917509;BA.debugLine="LogColor(\"JobDone - MainPage: '\" & reqManager.Ha";
__c.LogImpl("3917509","JobDone - MainPage: '"+BA.ObjectToString(__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(__ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
RDebugUtils.currentLine=917510;
 //BA.debugLineNum = 917510;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=917511;
 //BA.debugLineNum = 917511;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=917512;
 //BA.debugLineNum = 917512;BA.debugLine="If result.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
RDebugUtils.currentLine=917513;
 //BA.debugLineNum = 917513;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group9 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen9 = group9.getSize()
;int index9 = 0;
;
for (; index9 < groupLen9;index9++){
_records = (Object[])(group9.Get(index9));
RDebugUtils.currentLine=917514;
 //BA.debugLineNum = 917514;BA.debugLine="skmt.ExecNonQuery(\"delete from VERSION\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
RDebugUtils.currentLine=917515;
 //BA.debugLineNum = 917515;BA.debugLine="Dim CAT_VE_VERSION As String = records(result";
_cat_ve_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_VERSION"))))]);
RDebugUtils.currentLine=917516;
 //BA.debugLineNum = 917516;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO VERSION(NOVER";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ve_version)}));
 }
};
 };
RDebugUtils.currentLine=917520;
 //BA.debugLineNum = 917520;BA.debugLine="If result.Tag = \"select_fechat\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("select_fechat"))) { 
RDebugUtils.currentLine=917521;
 //BA.debugLineNum = 917521;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group16 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen16 = group16.getSize()
;int index16 = 0;
;
for (; index16 < groupLen16;index16++){
_records = (Object[])(group16.Get(index16));
RDebugUtils.currentLine=917522;
 //BA.debugLineNum = 917522;BA.debugLine="For Each k As String In result.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group17 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen17 = group17.getSize()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_k = BA.ObjectToString(group17.Get(index17));
RDebugUtils.currentLine=917523;
 //BA.debugLineNum = 917523;BA.debugLine="Log(\"select_fechat: \" & k & \": \" & records(r";
__c.LogImpl("3917523","select_fechat: "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=917529;
 //BA.debugLineNum = 917529;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=917530;
 //BA.debugLineNum = 917530;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=917531;
 //BA.debugLineNum = 917531;BA.debugLine="If result.Tag = \"agencia\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("agencia"))) { 
RDebugUtils.currentLine=917532;
 //BA.debugLineNum = 917532;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group26 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen26 = group26.getSize()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_records = (Object[])(group26.Get(index26));
RDebugUtils.currentLine=917533;
 //BA.debugLineNum = 917533;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("ID_ALMACEN"))))]);
 }
};
 };
 };
RDebugUtils.currentLine=917538;
 //BA.debugLineNum = 917538;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=917539;
 //BA.debugLineNum = 917539;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=917540;
 //BA.debugLineNum = 917540;BA.debugLine="If result.Tag = \"fecha\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("fecha"))) { 
RDebugUtils.currentLine=917541;
 //BA.debugLineNum = 917541;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group34 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen34 = group34.getSize()
;int index34 = 0;
;
for (; index34 < groupLen34;index34++){
_records = (Object[])(group34.Get(index34));
RDebugUtils.currentLine=917542;
 //BA.debugLineNum = 917542;BA.debugLine="Dim FECHA_HOY As String = records(result.Colu";
_fecha_hoy = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("FECHA"))))]);
RDebugUtils.currentLine=917543;
 //BA.debugLineNum = 917543;BA.debugLine="skmt.ExecNonQuery2(\"delete from CAT_VARIABLES";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA")}));
RDebugUtils.currentLine=917544;
 //BA.debugLineNum = 917544;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_VARIABLES";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA"),(Object)(_fecha_hoy)}));
 }
};
 };
 };
RDebugUtils.currentLine=917549;
 //BA.debugLineNum = 917549;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=917550;
 //BA.debugLineNum = 917550;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=917551;
 //BA.debugLineNum = 917551;BA.debugLine="If result.Tag = \"usuario\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuario"))) { 
RDebugUtils.currentLine=917552;
 //BA.debugLineNum = 917552;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group44 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen44 = group44.getSize()
;int index44 = 0;
;
for (; index44 < groupLen44;index44++){
_records = (Object[])(group44.Get(index44));
RDebugUtils.currentLine=917553;
 //BA.debugLineNum = 917553;BA.debugLine="Dim name As String = records(result.Columns.G";
_name = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("USUARIO"))))]);
RDebugUtils.currentLine=917554;
 //BA.debugLineNum = 917554;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_AGENCIA"))))]);
RDebugUtils.currentLine=917555;
 //BA.debugLineNum = 917555;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
_imei_base = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]);
RDebugUtils.currentLine=917556;
 //BA.debugLineNum = 917556;BA.debugLine="Log(records(result.Columns.Get(\"CAT_LO_IDTELE";
__c.LogImpl("3917556",BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]),0);
 }
};
RDebugUtils.currentLine=917558;
 //BA.debugLineNum = 917558;BA.debugLine="paso1 = 1";
__ref._paso1 /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=917559;
 //BA.debugLineNum = 917559;BA.debugLine="ToastMessageShow(name, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_name),__c.False);
RDebugUtils.currentLine=917560;
 //BA.debugLineNum = 917560;BA.debugLine="Log(\"//////////////////////////  \"&name)";
__c.LogImpl("3917560","//////////////////////////  "+_name,0);
 };
 };
RDebugUtils.currentLine=917564;
 //BA.debugLineNum = 917564;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=917565;
 //BA.debugLineNum = 917565;BA.debugLine="Dim result As DBResult = reqManager.HandleJob(J";
_result = __ref._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=917566;
 //BA.debugLineNum = 917566;BA.debugLine="If result.Tag = \"usuario_10\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuario_10"))) { 
RDebugUtils.currentLine=917567;
 //BA.debugLineNum = 917567;BA.debugLine="For Each records() As Object In result.Rows";
{
final anywheresoftware.b4a.BA.IterableList group58 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen58 = group58.getSize()
;int index58 = 0;
;
for (; index58 < groupLen58;index58++){
_records = (Object[])(group58.Get(index58));
RDebugUtils.currentLine=917568;
 //BA.debugLineNum = 917568;BA.debugLine="Dim name As String = records(result.Columns.G";
_name = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("USUARIO"))))]);
RDebugUtils.currentLine=917569;
 //BA.debugLineNum = 917569;BA.debugLine="Dim ID_ALMACEN As String = records(result.Col";
_id_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_AGENCIA"))))]);
RDebugUtils.currentLine=917570;
 //BA.debugLineNum = 917570;BA.debugLine="Dim IMEI_BASE As String = records(result.Colu";
_imei_base = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_LO_IDTELEFONO"))))]);
 }
};
RDebugUtils.currentLine=917572;
 //BA.debugLineNum = 917572;BA.debugLine="Log(\"|\"&name&\"|\")";
__c.LogImpl("3917572","|"+_name+"|",0);
RDebugUtils.currentLine=917573;
 //BA.debugLineNum = 917573;BA.debugLine="paso1 = 1";
__ref._paso1 /*String*/  = BA.NumberToString(1);
RDebugUtils.currentLine=917574;
 //BA.debugLineNum = 917574;BA.debugLine="IMEI_BASE = \"\"";
_imei_base = "";
RDebugUtils.currentLine=917575;
 //BA.debugLineNum = 917575;BA.debugLine="IMEI = \"\"";
__ref._imei /*String*/  = "";
 };
 };
RDebugUtils.currentLine=917578;
 //BA.debugLineNum = 917578;BA.debugLine="Job.Release";
_job._release /*String*/ (null);
 };
RDebugUtils.currentLine=917580;
 //BA.debugLineNum = 917580;BA.debugLine="Log($\"Paso1 = ${paso1} - Name: ${name} - IMEI: ${";
__c.LogImpl("3917580",("Paso1 = "+__c.SmartStringFormatter("",(Object)(__ref._paso1 /*String*/ ))+" - Name: "+__c.SmartStringFormatter("",(Object)(_name))+" - IMEI: "+__c.SmartStringFormatter("",(Object)(__ref._imei /*String*/ ))+" - IMEI_BASE: "+__c.SmartStringFormatter("",(Object)(_imei_base))+""),0);
RDebugUtils.currentLine=917581;
 //BA.debugLineNum = 917581;BA.debugLine="If paso1 = 1 Then";
if ((__ref._paso1 /*String*/ ).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=917582;
 //BA.debugLineNum = 917582;BA.debugLine="If IMEI = \"\" Then";
if ((__ref._imei /*String*/ ).equals("")) { 
RDebugUtils.currentLine=917583;
 //BA.debugLineNum = 917583;BA.debugLine="If user.Text = \"KMTS1\" Then name = \"OKActivo\"";
if ((__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()).equals("KMTS1")) { 
_name = "OKActivo";};
RDebugUtils.currentLine=917584;
 //BA.debugLineNum = 917584;BA.debugLine="If name = \"OKActivo\"  Then";
if ((_name).equals("OKActivo")) { 
RDebugUtils.currentLine=917585;
 //BA.debugLineNum = 917585;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from usuarioa");
RDebugUtils.currentLine=917586;
 //BA.debugLineNum = 917586;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALUE";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim())}));
RDebugUtils.currentLine=917587;
 //BA.debugLineNum = 917587;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_almacen");
RDebugUtils.currentLine=917588;
 //BA.debugLineNum = 917588;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(ID";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_id_almacen)}));
RDebugUtils.currentLine=917589;
 //BA.debugLineNum = 917589;BA.debugLine="usuario = user.Text";
__ref._usuario /*String*/  = __ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText();
RDebugUtils.currentLine=917590;
 //BA.debugLineNum = 917590;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 }else 
{RDebugUtils.currentLine=917591;
 //BA.debugLineNum = 917591;BA.debugLine="Else If name  = \"OKExpirado\" Then";
if ((_name).equals("OKExpirado")) { 
RDebugUtils.currentLine=917592;
 //BA.debugLineNum = 917592;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administrad";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else 
{RDebugUtils.currentLine=917593;
 //BA.debugLineNum = 917593;BA.debugLine="Else If name = \"OKCancelado\" Then";
if ((_name).equals("OKCancelado")) { 
RDebugUtils.currentLine=917594;
 //BA.debugLineNum = 917594;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administra";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else {
RDebugUtils.currentLine=917596;
 //BA.debugLineNum = 917596;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'Ig";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 }}}
;
RDebugUtils.currentLine=917598;
 //BA.debugLineNum = 917598;BA.debugLine="paso1 = 0";
__ref._paso1 /*String*/  = BA.NumberToString(0);
 }else {
RDebugUtils.currentLine=917600;
 //BA.debugLineNum = 917600;BA.debugLine="If name = \"OKActivo\" & IMEI And  IMEI = IMEI_BA";
if ((_name).equals("OKActivo"+__ref._imei /*String*/ ) && (__ref._imei /*String*/ ).equals(_imei_base)) { 
RDebugUtils.currentLine=917601;
 //BA.debugLineNum = 917601;BA.debugLine="If name = \"OKActivo\" & IMEI Then";
if ((_name).equals("OKActivo"+__ref._imei /*String*/ )) { 
RDebugUtils.currentLine=917602;
 //BA.debugLineNum = 917602;BA.debugLine="skmt.ExecNonQuery(\"delete from usuarioa\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from usuarioa");
RDebugUtils.currentLine=917603;
 //BA.debugLineNum = 917603;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO USUARIOA VALU";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim()),(Object)(__ref._pass /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText().trim())}));
RDebugUtils.currentLine=917604;
 //BA.debugLineNum = 917604;BA.debugLine="skmt.ExecNonQuery(\"delete from cat_almacen\")";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_almacen");
RDebugUtils.currentLine=917605;
 //BA.debugLineNum = 917605;BA.debugLine="skmt.ExecNonQuery2(\"INSERT INTO CAT_ALMACEN(I";
__ref._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_id_almacen)}));
RDebugUtils.currentLine=917606;
 //BA.debugLineNum = 917606;BA.debugLine="usuario = user.Text";
__ref._usuario /*String*/  = __ref._user /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText();
RDebugUtils.currentLine=917607;
 //BA.debugLineNum = 917607;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 }else 
{RDebugUtils.currentLine=917608;
 //BA.debugLineNum = 917608;BA.debugLine="Else If name  = \"OKExpirado\"& IMEI Then";
if ((_name).equals("OKExpirado"+__ref._imei /*String*/ )) { 
RDebugUtils.currentLine=917609;
 //BA.debugLineNum = 917609;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administra";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else 
{RDebugUtils.currentLine=917610;
 //BA.debugLineNum = 917610;BA.debugLine="Else If name = \"OKCancelado\"& IMEI Then";
if ((_name).equals("OKCancelado"+__ref._imei /*String*/ )) { 
RDebugUtils.currentLine=917611;
 //BA.debugLineNum = 917611;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administr";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 }else {
RDebugUtils.currentLine=917613;
 //BA.debugLineNum = 917613;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'i";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 }}}
;
RDebugUtils.currentLine=917615;
 //BA.debugLineNum = 917615;BA.debugLine="paso1 = 0";
__ref._paso1 /*String*/  = BA.NumberToString(0);
 }else 
{RDebugUtils.currentLine=917616;
 //BA.debugLineNum = 917616;BA.debugLine="Else IF  name = \"OKActivo\" Then";
if ((_name).equals("OKActivo")) { 
RDebugUtils.currentLine=917617;
 //BA.debugLineNum = 917617;BA.debugLine="Msgbox(\"Telefono no VALIDO!\",\"\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("Telefono no VALIDO!"),BA.ObjectToCharSequence(""),ba);
 }else {
RDebugUtils.currentLine=917619;
 //BA.debugLineNum = 917619;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'ig";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 }}
;
 };
 };
RDebugUtils.currentLine=917623;
 //BA.debugLineNum = 917623;BA.debugLine="End Sub";
return "";
}
public String  _lv_server_itemclick(keymon.lat.medicomed.b4xmainpage __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "lv_server_itemclick", false))
	 {return ((String) Debug.delegate(ba, "lv_server_itemclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=2031616;
 //BA.debugLineNum = 2031616;BA.debugLine="Private Sub lv_server_ItemClick (Position As Int,";
RDebugUtils.currentLine=2031617;
 //BA.debugLineNum = 2031617;BA.debugLine="Starter.server = Value";
_starter._server /*String*/  = BA.ObjectToString(_value);
RDebugUtils.currentLine=2031619;
 //BA.debugLineNum = 2031619;BA.debugLine="et_server.Text = Value";
__ref._et_server /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(_value));
RDebugUtils.currentLine=2031620;
 //BA.debugLineNum = 2031620;BA.debugLine="Starter.reqManager.Initialize(Me, Value)";
_starter._reqmanager /*keymon.lat.medicomed.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,BA.ObjectToString(_value));
RDebugUtils.currentLine=2031621;
 //BA.debugLineNum = 2031621;BA.debugLine="ToastMessageShow(\"Servidor modificado\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Servidor modificado"),__c.False);
RDebugUtils.currentLine=2031622;
 //BA.debugLineNum = 2031622;BA.debugLine="End Sub";
return "";
}
public String  _ocultaprogreso(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "ocultaprogreso", false))
	 {return ((String) Debug.delegate(ba, "ocultaprogreso", null));}
RDebugUtils.currentLine=1638400;
 //BA.debugLineNum = 1638400;BA.debugLine="Sub ocultaProgreso";
RDebugUtils.currentLine=1638401;
 //BA.debugLineNum = 1638401;BA.debugLine="ProgressDialogHide";
__c.ProgressDialogHide();
RDebugUtils.currentLine=1638402;
 //BA.debugLineNum = 1638402;BA.debugLine="End Sub";
return "";
}
public String  _pdf_click(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "pdf_click", false))
	 {return ((String) Debug.delegate(ba, "pdf_click", null));}
RDebugUtils.currentLine=1310720;
 //BA.debugLineNum = 1310720;BA.debugLine="Sub PDF_Click";
RDebugUtils.currentLine=1310722;
 //BA.debugLineNum = 1310722;BA.debugLine="End Sub";
return "";
}
public String  _popupmenu_dismiss(keymon.lat.medicomed.b4xmainpage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "popupmenu_dismiss", false))
	 {return ((String) Debug.delegate(ba, "popupmenu_dismiss", null));}
RDebugUtils.currentLine=1114112;
 //BA.debugLineNum = 1114112;BA.debugLine="Sub PopupMenu_Dismiss";
RDebugUtils.currentLine=1114113;
 //BA.debugLineNum = 1114113;BA.debugLine="ToastMessageShow(\"PopupMenu dismissed\", False)";
__c.ToastMessageShow(BA.ObjectToCharSequence("PopupMenu dismissed"),__c.False);
RDebugUtils.currentLine=1114114;
 //BA.debugLineNum = 1114114;BA.debugLine="End Sub";
return "";
}
public boolean  _popupmenu_menuitemclick(keymon.lat.medicomed.b4xmainpage __ref,int _itemid) throws Exception{
__ref = this;
RDebugUtils.currentModule="b4xmainpage";
if (Debug.shouldDelegate(ba, "popupmenu_menuitemclick", false))
	 {return ((Boolean) Debug.delegate(ba, "popupmenu_menuitemclick", new Object[] {_itemid}));}
RDebugUtils.currentLine=1179648;
 //BA.debugLineNum = 1179648;BA.debugLine="Sub PopupMenu_MenuItemClick (ItemId As Int) As Boo";
RDebugUtils.currentLine=1179649;
 //BA.debugLineNum = 1179649;BA.debugLine="ToastMessageShow(\"Item \" & ItemId & \" clicked.\",";
__c.ToastMessageShow(BA.ObjectToCharSequence("Item "+BA.NumberToString(_itemid)+" clicked."),__c.False);
RDebugUtils.currentLine=1179650;
 //BA.debugLineNum = 1179650;BA.debugLine="Return False";
if (true) return __c.False;
RDebugUtils.currentLine=1179651;
 //BA.debugLineNum = 1179651;BA.debugLine="End Sub";
return false;
}
}