package reparto_mazapa.keymon.lat;


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

public class c_noventa 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, "reparto_mazapa.keymon.lat.c_noventa");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_mazapa.keymon.lat.c_noventa.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 anywheresoftware.b4a.gps.GPS _g = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public String _comentario = "";
public anywheresoftware.b4a.objects.ButtonWrapper _cancela = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guarda = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_1 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_2 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_3 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_comm = null;
public String _motivo = "";
public String _cuenta = "";
public String _usuario = "";
public String _sdate = "";
public String _stime = "";
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_4 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public reparto_mazapa.keymon.lat.dbrequestmanager _reqmanager = null;
public b4a.example.dateutils _dateutils = null;
public reparto_mazapa.keymon.lat.main _main = null;
public reparto_mazapa.keymon.lat.appupdater _appupdater = null;
public reparto_mazapa.keymon.lat.tracker _tracker = null;
public reparto_mazapa.keymon.lat.starter _starter = null;
public reparto_mazapa.keymon.lat.subs _subs = null;
public reparto_mazapa.keymon.lat.firebasemessaging _firebasemessaging = null;
public reparto_mazapa.keymon.lat.foto _foto = null;
public reparto_mazapa.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_mazapa.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_mazapa.keymon.lat.newinst2 _newinst2 = null;
public reparto_mazapa.keymon.lat.b4xpages _b4xpages = null;
public reparto_mazapa.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_mazapa.keymon.lat.httputils2service _httputils2service = null;
public reparto_mazapa.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(reparto_mazapa.keymon.lat.c_noventa __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=16121856;
 //BA.debugLineNum = 16121856;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=16121857;
 //BA.debugLineNum = 16121857;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=16121858;
 //BA.debugLineNum = 16121858;BA.debugLine="End Sub";
return null;
}
public String  _gps_locationchanged(reparto_mazapa.keymon.lat.c_noventa __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=16318464;
 //BA.debugLineNum = 16318464;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=16318467;
 //BA.debugLineNum = 16318467;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(reparto_mazapa.keymon.lat.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
RDebugUtils.currentLine=16252928;
 //BA.debugLineNum = 16252928;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=16252929;
 //BA.debugLineNum = 16252929;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
RDebugUtils.currentLine=16252930;
 //BA.debugLineNum = 16252930;BA.debugLine="e_comm.Text=\"\"";
__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=16252931;
 //BA.debugLineNum = 16252931;BA.debugLine="r_1.Checked = False";
__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=16252932;
 //BA.debugLineNum = 16252932;BA.debugLine="r_2.Checked = False";
__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=16252933;
 //BA.debugLineNum = 16252933;BA.debugLine="r_3.Checked = False";
__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=16252934;
 //BA.debugLineNum = 16252934;BA.debugLine="r_4.Checked = False";
__ref._r_4 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=16252935;
 //BA.debugLineNum = 16252935;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(reparto_mazapa.keymon.lat.c_noventa __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=16187392;
 //BA.debugLineNum = 16187392;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=16187393;
 //BA.debugLineNum = 16187393;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=16187395;
 //BA.debugLineNum = 16187395;BA.debugLine="Root.LoadLayout(\"no_venta\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("no_venta",ba);
RDebugUtils.currentLine=16187396;
 //BA.debugLineNum = 16187396;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._server /*String*/ );
RDebugUtils.currentLine=16187397;
 //BA.debugLineNum = 16187397;BA.debugLine="End Sub";
return "";
}
public String  _cancela_click(reparto_mazapa.keymon.lat.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "cancela_click", false))
	 {return ((String) Debug.delegate(ba, "cancela_click", null));}
RDebugUtils.currentLine=16384000;
 //BA.debugLineNum = 16384000;BA.debugLine="Sub CANCELA_Click";
RDebugUtils.currentLine=16384001;
 //BA.debugLineNum = 16384001;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=16384002;
 //BA.debugLineNum = 16384002;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_mazapa.keymon.lat.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
RDebugUtils.currentLine=16056320;
 //BA.debugLineNum = 16056320;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=16056321;
 //BA.debugLineNum = 16056321;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=16056322;
 //BA.debugLineNum = 16056322;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=16056323;
 //BA.debugLineNum = 16056323;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=16056324;
 //BA.debugLineNum = 16056324;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=16056325;
 //BA.debugLineNum = 16056325;BA.debugLine="Dim COMENTARIO As String";
_comentario = "";
RDebugUtils.currentLine=16056326;
 //BA.debugLineNum = 16056326;BA.debugLine="Dim CANCELA As Button";
_cancela = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=16056327;
 //BA.debugLineNum = 16056327;BA.debugLine="Dim GUARDA As Button";
_guarda = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=16056328;
 //BA.debugLineNum = 16056328;BA.debugLine="Dim r_1 As RadioButton";
_r_1 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=16056329;
 //BA.debugLineNum = 16056329;BA.debugLine="Dim r_2 As RadioButton";
_r_2 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=16056330;
 //BA.debugLineNum = 16056330;BA.debugLine="Dim r_3 As RadioButton";
_r_3 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=16056331;
 //BA.debugLineNum = 16056331;BA.debugLine="Dim e_comm As EditText";
_e_comm = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=16056332;
 //BA.debugLineNum = 16056332;BA.debugLine="Dim motivo As String";
_motivo = "";
RDebugUtils.currentLine=16056333;
 //BA.debugLineNum = 16056333;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=16056334;
 //BA.debugLineNum = 16056334;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=16056335;
 //BA.debugLineNum = 16056335;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=16056336;
 //BA.debugLineNum = 16056336;BA.debugLine="Dim r_4 As RadioButton";
_r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=16056337;
 //BA.debugLineNum = 16056337;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=16056338;
 //BA.debugLineNum = 16056338;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=16056339;
 //BA.debugLineNum = 16056339;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new reparto_mazapa.keymon.lat.dbrequestmanager();
RDebugUtils.currentLine=16056340;
 //BA.debugLineNum = 16056340;BA.debugLine="End Sub";
return "";
}
public void  _guarda_click(reparto_mazapa.keymon.lat.c_noventa __ref) throws Exception{
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "guarda_click", false))
	 {Debug.delegate(ba, "guarda_click", null); return;}
ResumableSub_GUARDA_Click rsub = new ResumableSub_GUARDA_Click(this,__ref);
rsub.resume(ba, null);
}
public static class ResumableSub_GUARDA_Click extends BA.ResumableSub {
public ResumableSub_GUARDA_Click(reparto_mazapa.keymon.lat.c_noventa parent,reparto_mazapa.keymon.lat.c_noventa __ref) {
this.parent = parent;
this.__ref = __ref;
this.__ref = parent;
}
reparto_mazapa.keymon.lat.c_noventa __ref;
reparto_mazapa.keymon.lat.c_noventa parent;
String _rutaactualizar = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rut = null;
String _estecliente = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _rv = null;
int _i2 = 0;
int _i = 0;
String _ruta = "";
String _rutapre = "";
String _fechaprev = "";
int _resultado = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _mandamapa = null;
int step36;
int limit36;
int step43;
int limit43;

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

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

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=16449537;
 //BA.debugLineNum = 16449537;BA.debugLine="If r_1.Checked = False And r_2.Checked = False An";
if (true) break;

case 1:
//if
this.state = 51;
if (__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==parent.__c.False && __ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==parent.__c.False && __ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==parent.__c.False && __ref._r_4 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()==parent.__c.False) { 
this.state = 3;
}else {
this.state = 5;
}if (true) break;

case 3:
//C
this.state = 51;
RDebugUtils.currentLine=16449538;
 //BA.debugLineNum = 16449538;BA.debugLine="MsgboxAsync(\"Selecciona un motivo de rechazo\",\"A";
parent.__c.MsgboxAsync(BA.ObjectToCharSequence("Selecciona un motivo de rechazo"),BA.ObjectToCharSequence("Atención"),ba);
 if (true) break;

case 5:
//C
this.state = 6;
RDebugUtils.currentLine=16449541;
 //BA.debugLineNum = 16449541;BA.debugLine="If r_1.Checked Then";
if (true) break;

case 6:
//if
this.state = 15;
if (__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
this.state = 8;
}else 
{RDebugUtils.currentLine=16449543;
 //BA.debugLineNum = 16449543;BA.debugLine="Else If r_2.Checked Then";
if (__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
this.state = 10;
}else 
{RDebugUtils.currentLine=16449545;
 //BA.debugLineNum = 16449545;BA.debugLine="Else If r_3.Checked Then";
if (__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
this.state = 12;
}else {
this.state = 14;
}}}
if (true) break;

case 8:
//C
this.state = 15;
RDebugUtils.currentLine=16449542;
 //BA.debugLineNum = 16449542;BA.debugLine="motivo = \"CERRADO\"";
__ref._motivo /*String*/  = "CERRADO";
 if (true) break;

case 10:
//C
this.state = 15;
RDebugUtils.currentLine=16449544;
 //BA.debugLineNum = 16449544;BA.debugLine="motivo = \"NO PIDIO\"";
__ref._motivo /*String*/  = "NO PIDIO";
 if (true) break;

case 12:
//C
this.state = 15;
RDebugUtils.currentLine=16449546;
 //BA.debugLineNum = 16449546;BA.debugLine="motivo = \"CANCELA\"";
__ref._motivo /*String*/  = "CANCELA";
 if (true) break;

case 14:
//C
this.state = 15;
RDebugUtils.currentLine=16449548;
 //BA.debugLineNum = 16449548;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
__ref._motivo /*String*/  = "NO ESTA EL ENCARGADO";
 if (true) break;
;
RDebugUtils.currentLine=16449551;
 //BA.debugLineNum = 16449551;BA.debugLine="If motivo <> \"CERRADO\"  Or motivo = \"CERRADO\" Th";

case 15:
//if
this.state = 50;
if ((__ref._motivo /*String*/ ).equals("CERRADO") == false || (__ref._motivo /*String*/ ).equals("CERRADO")) { 
this.state = 17;
}else {
this.state = 49;
}if (true) break;

case 17:
//C
this.state = 18;
RDebugUtils.currentLine=16449552;
 //BA.debugLineNum = 16449552;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
parent.__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=16449553;
 //BA.debugLineNum = 16449553;BA.debugLine="DateTime.TimeFormat=\"HHmmss\"";
parent.__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=16449554;
 //BA.debugLineNum = 16449554;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = parent.__c.DateTime.Date(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=16449555;
 //BA.debugLineNum = 16449555;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = parent.__c.DateTime.Time(parent.__c.DateTime.getNow());
RDebugUtils.currentLine=16449556;
 //BA.debugLineNum = 16449556;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cu";
__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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=16449557;
 //BA.debugLineNum = 16449557;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449558;
 //BA.debugLineNum = 16449558;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=16449559;
 //BA.debugLineNum = 16449559;BA.debugLine="c=Starter.skmt.ExecQuery(\"select usuario from u";
__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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
RDebugUtils.currentLine=16449560;
 //BA.debugLineNum = 16449560;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449561;
 //BA.debugLineNum = 16449561;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=16449562;
 //BA.debugLineNum = 16449562;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=16449563;
 //BA.debugLineNum = 16449563;BA.debugLine="Dim rutaactualizar As String";
_rutaactualizar = "";
RDebugUtils.currentLine=16449564;
 //BA.debugLineNum = 16449564;BA.debugLine="Dim rut As Cursor = Starter.skmt.ExecQuery(\"SEL";
_rut = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rut = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=16449565;
 //BA.debugLineNum = 16449565;BA.debugLine="If rut.RowCount > 0 Then";
if (true) break;

case 18:
//if
this.state = 21;
if (_rut.getRowCount()>0) { 
this.state = 20;
}if (true) break;

case 20:
//C
this.state = 21;
RDebugUtils.currentLine=16449566;
 //BA.debugLineNum = 16449566;BA.debugLine="rut.Position = 0";
_rut.setPosition((int) (0));
RDebugUtils.currentLine=16449567;
 //BA.debugLineNum = 16449567;BA.debugLine="rutaactualizar = rut.GetString(\"CAT_CL_RUTA\")";
_rutaactualizar = _rut.GetString("CAT_CL_RUTA");
 if (true) break;

case 21:
//C
this.state = 22;
;
RDebugUtils.currentLine=16449571;
 //BA.debugLineNum = 16449571;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_NUM_REGIST";
__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)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HVD_NUM_REGISTRO, HVD_CLIENTE, HVD_PRONOMBRE, HVD_CANT, HVD_COSTO_TOT, HVD_FECHA, HVD_PROID, CAT_GP_PRECIO from HIST_VENTAS2 join CAT_GUNAPROD on CAT_GP_ID = HVD_PROID WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_PRONOMBRE asc")));
RDebugUtils.currentLine=16449572;
 //BA.debugLineNum = 16449572;BA.debugLine="If c.RowCount > 0 Then 'Si  hay pedido en HIST_";
if (true) break;

case 22:
//if
this.state = 37;
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
this.state = 24;
}if (true) break;

case 24:
//C
this.state = 25;
RDebugUtils.currentLine=16449575;
 //BA.debugLineNum = 16449575;BA.debugLine="Private esteCliente As String = Subs.traeClien";
_estecliente = parent._subs._traecliente /*String*/ (ba);
RDebugUtils.currentLine=16449576;
 //BA.debugLineNum = 16449576;BA.debugLine="Private rv As Cursor = Starter.skmt.ExecQuery(";
_rv = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_rv = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select * from REPARTO where REP_CLIENTE = '"+parent.__c.SmartStringFormatter("",(Object)(_estecliente))+"' and REP_CLI_ORIG <> '"+parent.__c.SmartStringFormatter("",(Object)(_estecliente))+"' and REP_RECHAZO = 0"))));
RDebugUtils.currentLine=16449577;
 //BA.debugLineNum = 16449577;BA.debugLine="If rv.RowCount > 0 Then 'Si tenemos venta en e";
if (true) break;

case 25:
//if
this.state = 32;
if (_rv.getRowCount()>0) { 
this.state = 27;
}if (true) break;

case 27:
//C
this.state = 28;
RDebugUtils.currentLine=16449578;
 //BA.debugLineNum = 16449578;BA.debugLine="For i2=0 To rv.RowCount - 1";
if (true) break;

case 28:
//for
this.state = 31;
step36 = 1;
limit36 = (int) (_rv.getRowCount()-1);
_i2 = (int) (0) ;
this.state = 52;
if (true) break;

case 52:
//C
this.state = 31;
if ((step36 > 0 && _i2 <= limit36) || (step36 < 0 && _i2 >= limit36)) this.state = 30;
if (true) break;

case 53:
//C
this.state = 52;
_i2 = ((int)(0 + _i2 + step36)) ;
if (true) break;

case 30:
//C
this.state = 53;
RDebugUtils.currentLine=16449579;
 //BA.debugLineNum = 16449579;BA.debugLine="rv.Position = i2";
_rv.setPosition(_i2);
RDebugUtils.currentLine=16449580;
 //BA.debugLineNum = 16449580;BA.debugLine="Log($\"Actualizamos REPARTO - cliente=${rv.Ge";
parent.__c.LogImpl("316449580",("Actualizamos REPARTO - cliente="+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CLIENTE")))+", cliente orignal="+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CLI_ORIG")))+", le agregamos "+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CANT")))+""),0);
RDebugUtils.currentLine=16449581;
 //BA.debugLineNum = 16449581;BA.debugLine="Starter.skmt.ExecNonQuery($\"update REPARTO s";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update REPARTO set REP_CANT = REP_CANT + "+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CANT")))+" where REP_RECHAZO = '1' and REP_CLIENTE = '"+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CLI_ORIG")))+"' and REP_CLI_ORIG = '"+parent.__c.SmartStringFormatter("",(Object)(_rv.GetString("REP_CLI_ORIG")))+"'"));
 if (true) break;
if (true) break;

case 31:
//C
this.state = 32;
;
 if (true) break;

case 32:
//C
this.state = 33;
;
RDebugUtils.currentLine=16449585;
 //BA.debugLineNum = 16449585;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from reparto";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from reparto where REP_CLIENTE IN (Select CUENTA from cuentaa)");
RDebugUtils.currentLine=16449586;
 //BA.debugLineNum = 16449586;BA.debugLine="For i=0 To c.RowCount - 1 'Insertamos los prod";
if (true) break;

case 33:
//for
this.state = 36;
step43 = 1;
limit43 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
this.state = 54;
if (true) break;

case 54:
//C
this.state = 36;
if ((step43 > 0 && _i <= limit43) || (step43 < 0 && _i >= limit43)) this.state = 35;
if (true) break;

case 55:
//C
this.state = 54;
_i = ((int)(0 + _i + step43)) ;
if (true) break;

case 35:
//C
this.state = 55;
RDebugUtils.currentLine=16449587;
 //BA.debugLineNum = 16449587;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=16449588;
 //BA.debugLineNum = 16449588;BA.debugLine="Log($\"REGISTRO= ${c.GetString(\"HVD_NUM_REGIST";
parent.__c.LogImpl("316449588",("REGISTRO= "+parent.__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO")))+""),0);
RDebugUtils.currentLine=16449589;
 //BA.debugLineNum = 16449589;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repar";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_PRODREGISTRO, REP_CLI_ORIG) VALUES (?,?,?,?,?,1,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_COSTO_TOT"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_FECHA"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_PRECIO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")}));
RDebugUtils.currentLine=16449590;
 //BA.debugLineNum = 16449590;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into repar";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT, REP_FECHA, REP_RECHAZO, REP_PRODID, REP_PRECIO, REP_PRODREGISTRO, REP_CLI_ORIG) VALUES (?,?,?,?,?,0,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"),BA.NumberToString(0),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_COSTO_TOT"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_FECHA"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PROID"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_GP_PRECIO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_NUM_REGISTRO"),__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CLIENTE")}));
RDebugUtils.currentLine=16449591;
 //BA.debugLineNum = 16449591;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunapr";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_nombre = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HVD_PRONOMBRE"))}));
 if (true) break;
if (true) break;

case 36:
//C
this.state = 37;
;
 if (true) break;

case 37:
//C
this.state = 38;
;
RDebugUtils.currentLine=16449596;
 //BA.debugLineNum = 16449596;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO NOVENTA";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON,NV_FOTO) VALUES(?,?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._motivo /*String*/ ),(Object)(__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_rutaactualizar)}));
RDebugUtils.currentLine=16449597;
 //BA.debugLineNum = 16449597;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE kmt_info set gestion = 3, HORAENT = '"+parent.__c.SmartStringFormatter("",(Object)(__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ))+"' where CAT_CL_CODIGO In (select cuenta from cuentaa) and CAT_CL_RUTA = '"+parent.__c.SmartStringFormatter("",(Object)(_rutaactualizar))+"'"));
RDebugUtils.currentLine=16449598;
 //BA.debugLineNum = 16449598;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS S";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("update HIST_VENTAS SET HVD_RECHAZO = 1, HVD_RECHAZOCANT = HVD_CANT, HVD_RECHAZOCANTC = CANTC, BCAJAS = 0 , CANTC = 0 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=16449599;
 //BA.debugLineNum = 16449599;BA.debugLine="Starter.skmt.ExecNonQuery($\"update HIST_VENTAS";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update HIST_VENTAS set HVD_RECHAZO = 2,  HVD_RECHAZOCANT = HVD_RECHAZOCANT  WHERE HVD_PROID = HVD_CODPROMO and HVD_CLIENTE in (Select CUENTA from cuentaa)"));
RDebugUtils.currentLine=16449600;
 //BA.debugLineNum = 16449600;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM PEDIDO W";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM PEDIDO WHERE PE_CLIENTE IN (SELECT CUENTA FROM CUENTAA)");
RDebugUtils.currentLine=16449601;
 //BA.debugLineNum = 16449601;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT RUTAA FROM R";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT RUTAA FROM RUTAA")));
RDebugUtils.currentLine=16449602;
 //BA.debugLineNum = 16449602;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449603;
 //BA.debugLineNum = 16449603;BA.debugLine="Dim ruta As String = d.GetString(\"RUTAA\")";
_ruta = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTAA");
RDebugUtils.currentLine=16449604;
 //BA.debugLineNum = 16449604;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=16449605;
 //BA.debugLineNum = 16449605;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CAT_CL_RUTA";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_CL_RUTA FROM kmt_info WHERE CAT_CL_CODIGO IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=16449606;
 //BA.debugLineNum = 16449606;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449607;
 //BA.debugLineNum = 16449607;BA.debugLine="Dim rutapre As String = d.GetString(\"CAT_CL_RUT";
_rutapre = __ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CAT_CL_RUTA");
RDebugUtils.currentLine=16449608;
 //BA.debugLineNum = 16449608;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=16449609;
 //BA.debugLineNum = 16449609;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT HVD_FECHA FR";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT HVD_FECHA FROM HIST_VENTAS WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
RDebugUtils.currentLine=16449610;
 //BA.debugLineNum = 16449610;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449611;
 //BA.debugLineNum = 16449611;BA.debugLine="Dim fechaprev As String = Subs.traefECHAPREV";
_fechaprev = parent._subs._traefechaprev /*String*/ (ba);
RDebugUtils.currentLine=16449612;
 //BA.debugLineNum = 16449612;BA.debugLine="d.Close";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=16449613;
 //BA.debugLineNum = 16449613;BA.debugLine="d = Starter.skmt.ExecQuery(\"SELECT CUENTA FROM";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CUENTA FROM CUENTAA")));
RDebugUtils.currentLine=16449614;
 //BA.debugLineNum = 16449614;BA.debugLine="d.Position = 0";
__ref._d /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=16449615;
 //BA.debugLineNum = 16449615;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO REPARTO";
parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO REPARTO_GEO (CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO,ENVIO) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__ref._cuenta /*String*/ ,__ref._usuario /*String*/ ,__ref._sdate /*String*/ +" "+__ref._stime /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lat_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._lon_gps /*String*/ ,parent._b4xpages._mainpage /*reparto_mazapa.keymon.lat.b4xmainpage*/ (ba)._almacen /*String*/ ,_ruta,_rutapre,_fechaprev,__ref._motivo /*String*/ ,__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText(),"NO ENTREGADO"}));
RDebugUtils.currentLine=16449617;
 //BA.debugLineNum = 16449617;BA.debugLine="Msgbox2Async(\"Pedido rechazado\",\"Atención\",\"Ok\"";
parent.__c.Msgbox2Async(BA.ObjectToCharSequence("Pedido rechazado"),BA.ObjectToCharSequence("Atención"),"Ok","","",parent.__c.LoadBitmap(parent.__c.File.getDirAssets(),"alert2.png"),ba,parent.__c.False);
RDebugUtils.currentLine=16449618;
 //BA.debugLineNum = 16449618;BA.debugLine="Wait For Msgbox_Result (resultado As Int)";
parent.__c.WaitFor("msgbox_result", ba, new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "c_noventa", "guarda_click"), null);
this.state = 56;
return;
case 56:
//C
this.state = 38;
_resultado = (Integer) result[1];
;
RDebugUtils.currentLine=16449619;
 //BA.debugLineNum = 16449619;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if (true) break;

case 38:
//if
this.state = 47;
if (_resultado==parent.__c.DialogResponse.POSITIVE) { 
this.state = 40;
}if (true) break;

case 40:
//C
this.state = 41;
RDebugUtils.currentLine=16449620;
 //BA.debugLineNum = 16449620;BA.debugLine="Dim mandamapa As Cursor = Starter.skmt.ExecQue";
_mandamapa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_mandamapa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(parent._starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM kmt_info WHERE gestion = 0 and CAT_CL_CODIGO <> 63403")));
RDebugUtils.currentLine=16449621;
 //BA.debugLineNum = 16449621;BA.debugLine="If mandamapa.RowCount > 0 Then";
if (true) break;

case 41:
//if
this.state = 46;
if (_mandamapa.getRowCount()>0) { 
this.state = 43;
}else 
{RDebugUtils.currentLine=16449623;
 //BA.debugLineNum = 16449623;BA.debugLine="Else If mandamapa.RowCount = 0 Then";
if (_mandamapa.getRowCount()==0) { 
this.state = 45;
}}
if (true) break;

case 43:
//C
this.state = 46;
RDebugUtils.currentLine=16449622;
 //BA.debugLineNum = 16449622;BA.debugLine="StartActivity(MAPA_RUTAS)";
parent.__c.StartActivity(ba,(Object)(parent._mapa_rutas.getObject()));
 if (true) break;

case 45:
//C
this.state = 46;
RDebugUtils.currentLine=16449624;
 //BA.debugLineNum = 16449624;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
parent._b4xpages._showpage /*String*/ (ba,"Principal");
 if (true) break;

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

case 47:
//C
this.state = 50;
;
 if (true) break;

case 49:
//C
this.state = 50;
RDebugUtils.currentLine=16449628;
 //BA.debugLineNum = 16449628;BA.debugLine="COMENTARIO = e_comm.Text";
__ref._comentario /*String*/  = __ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText();
 if (true) break;

case 50:
//C
this.state = 51;
;
 if (true) break;

case 51:
//C
this.state = -1;
;
RDebugUtils.currentLine=16449633;
 //BA.debugLineNum = 16449633;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _jobdone(reparto_mazapa.keymon.lat.c_noventa __ref,reparto_mazapa.keymon.lat.httpjob _job) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "jobdone", false))
	 {return ((String) Debug.delegate(ba, "jobdone", new Object[] {_job}));}
reparto_mazapa.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
RDebugUtils.currentLine=16580608;
 //BA.debugLineNum = 16580608;BA.debugLine="Sub JobDone(Job As HttpJob)";
RDebugUtils.currentLine=16580609;
 //BA.debugLineNum = 16580609;BA.debugLine="Log(Job.Success)";
__c.LogImpl("316580609",BA.ObjectToString(_job._success /*boolean*/ ),0);
RDebugUtils.currentLine=16580610;
 //BA.debugLineNum = 16580610;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
RDebugUtils.currentLine=16580613;
 //BA.debugLineNum = 16580613;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("316580613","JobDone: '"+BA.ObjectToString(__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
RDebugUtils.currentLine=16580614;
 //BA.debugLineNum = 16580614;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=16580615;
 //BA.debugLineNum = 16580615;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = __ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._handlejob /*reparto_mazapa.keymon.lat.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=16580616;
 //BA.debugLineNum = 16580616;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_REPART";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_REPARTOPendientes_head_")>-1) { 
RDebugUtils.currentLine=16580617;
 //BA.debugLineNum = 16580617;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=16580618;
 //BA.debugLineNum = 16580618;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+24));
RDebugUtils.currentLine=16580619;
 //BA.debugLineNum = 16580619;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("316580619",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=16580620;
 //BA.debugLineNum = 16580620;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update REPARTO_GEO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update REPARTO_GEO SET ENVIO = ? WHERE CLIENTE = ? AND ENVIO <> ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente,"1"}));
RDebugUtils.currentLine=16580621;
 //BA.debugLineNum = 16580621;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen12 = group12.getSize()
;int index12 = 0;
;
for (; index12 < groupLen12;index12++){
_records = (Object[])(group12.Get(index12));
RDebugUtils.currentLine=16580622;
 //BA.debugLineNum = 16580622;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_k = BA.ObjectToString(group13.Get(index13));
RDebugUtils.currentLine=16580623;
 //BA.debugLineNum = 16580623;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("316580623",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=16580628;
 //BA.debugLineNum = 16580628;BA.debugLine="Job.Release";
_job._release /*String*/ (null);
 };
RDebugUtils.currentLine=16580631;
 //BA.debugLineNum = 16580631;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesreparto(reparto_mazapa.keymon.lat.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "mandapendientesreparto", false))
	 {return ((String) Debug.delegate(ba, "mandapendientesreparto", null));}
int _i = 0;
reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand _cmd = null;
RDebugUtils.currentLine=16515072;
 //BA.debugLineNum = 16515072;BA.debugLine="Sub mandaPendientesreparto";
RDebugUtils.currentLine=16515073;
 //BA.debugLineNum = 16515073;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT  CLIENTE, USUARI";
__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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT  CLIENTE, USUARIO, FECHA_PUNTEO, LATITUD, LONGITUD, ALMACEN, RUTA_REPARTO, RUTA_PREV, FECHA_PREVENTA, MOTIVO, COMENTARIO,TIPO FROM REPARTO_GEO where ENVIO <> 1")));
RDebugUtils.currentLine=16515074;
 //BA.debugLineNum = 16515074;BA.debugLine="Log($\"REPARTO_Cliente PENDIENTE: ${c.RowCount}\"$)";
__c.LogImpl("316515074",("REPARTO_Cliente PENDIENTE: "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()))+""),0);
RDebugUtils.currentLine=16515075;
 //BA.debugLineNum = 16515075;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=16515076;
 //BA.debugLineNum = 16515076;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step4 = 1;
final int limit4 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
RDebugUtils.currentLine=16515077;
 //BA.debugLineNum = 16515077;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=16515079;
 //BA.debugLineNum = 16515079;BA.debugLine="Dim cmd As DBCommand";
_cmd = new reparto_mazapa.keymon.lat.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=16515080;
 //BA.debugLineNum = 16515080;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
RDebugUtils.currentLine=16515081;
 //BA.debugLineNum = 16515081;BA.debugLine="cmd.Name = \"insert_REPARTO_MAZAPA\"";
_cmd.Name /*String*/  = "insert_REPARTO_MAZAPA";
RDebugUtils.currentLine=16515082;
 //BA.debugLineNum = 16515082;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CLIENTE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("FECHA_PUNTEO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("LATITUD")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("LONGITUD")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("ALMACEN")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTA_REPARTO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("RUTA_PREV")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("FECHA_PREVENTA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("MOTIVO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("COMENTARIO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("TIPO"))};
RDebugUtils.currentLine=16515083;
 //BA.debugLineNum = 16515083;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_REPARTOPe";
__ref._reqmanager /*reparto_mazapa.keymon.lat.dbrequestmanager*/ ._executecommand /*String*/ (null,_cmd,(Object)(("ins_REPARTOPendientes_head_"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CLIENTE")))+"")));
 }
};
 };
RDebugUtils.currentLine=16515087;
 //BA.debugLineNum = 16515087;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=16515088;
 //BA.debugLineNum = 16515088;BA.debugLine="End Sub";
return "";
}
}