package dbcheck.keymon.lat;


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

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

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_enviar = null;
public anywheresoftware.b4a.sql.SQL _skmt = null;
public dbcheck.keymon.lat.dbrequestmanager _reqmanager = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pedidos2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_diasventa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_totalventa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cantsencero = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_clientenonumerico = null;
public String _cuantos_pedido = "";
public String _cuantos_pedidosc = "";
public String _cuantos_noventa = "";
public anywheresoftware.b4a.objects.collections.List _reqspendientes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ruta2 = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_usuario2 = null;
public String _usuario = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_almacen2 = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_progressdialog = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_progressdialog = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_editaruta = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_editaalmacen = null;
public dbcheck.keymon.lat.main _main = null;
public dbcheck.keymon.lat.starter _starter = null;
public dbcheck.keymon.lat.subs _subs = null;
public dbcheck.keymon.lat.b4xpages _b4xpages = null;
public dbcheck.keymon.lat.b4xcollections _b4xcollections = null;
public dbcheck.keymon.lat.httputils2service _httputils2service = null;
public String  _b_enviar_click() throws Exception{
String _resultado = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
int _i = 0;
dbcheck.keymon.lat.dbrequestmanager._dbcommand _cmd = null;
 //BA.debugLineNum = 114;BA.debugLine="Private Sub b_enviar_Click";
 //BA.debugLineNum = 115;BA.debugLine="Dim resultado = Msgbox2(\"Se va a enviar la venta";
_resultado = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Se va a enviar la venta de la BD"),BA.ObjectToCharSequence("AVISO"),"Continuar","Cancelar","",(android.graphics.Bitmap)(__c.Null),ba));
 //BA.debugLineNum = 116;BA.debugLine="If resultado = DialogResponse.POSITIVE Then";
if ((_resultado).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 117;BA.debugLine="reqsPendientes.Initialize";
_reqspendientes.Initialize();
 //BA.debugLineNum = 118;BA.debugLine="l_progressDialog.Text = \" Enviando información .";
_l_progressdialog.setText(BA.ObjectToCharSequence(" Enviando información ..."));
 //BA.debugLineNum = 119;BA.debugLine="p_progressDialog.Visible = True";
_p_progressdialog.setVisible(__c.True);
 //BA.debugLineNum = 120;BA.debugLine="p_progressDialog.BringToFront";
_p_progressdialog.BringToFront();
 //BA.debugLineNum = 121;BA.debugLine="skmt.ExecNonQuery2(\"delete from PEDIDO WHERE PE_";
_skmt.ExecNonQuery2("delete from PEDIDO WHERE PE_PRONOMBRE = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("N/A")}));
 //BA.debugLineNum = 122;BA.debugLine="skmt.ExecNonQuery(\"delete from pedido_cliente wh";
_skmt.ExecNonQuery("delete from pedido_cliente where PC_CLIENTE not In (select PE_CLIENTE from pedido)");
 //BA.debugLineNum = 124;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"SELECT PC_CLIE";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT PC_CLIENTE, PC_FECHA, PC_USER, PC_NOART, PC_MONTO,PC_LON, PC_LAT, PC_COSTO_SIN, PC_RUTA, PC_ALMACEN, PC_FACTURA FROM PEDIDO_CLIENTE ")));
 //BA.debugLineNum = 125;BA.debugLine="Dim d As Cursor = skmt.ExecQuery(\"SELECT COUNT(*";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")));
 //BA.debugLineNum = 126;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 127;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step12 = 1;
final int limit12 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit12 ;_i = _i + step12 ) {
 //BA.debugLineNum = 128;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 129;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 130;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 131;BA.debugLine="cmd.Name = \"insert_pedidos_MARDS\"";
_cmd.Name /*String*/  = "insert_pedidos_MARDS";
 //BA.debugLineNum = 132;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PC_CLIENTE")),(Object)(_c.GetString("PC_FECHA")),(Object)(_c.GetString("PC_USER")),(Object)(_c.GetString("PC_NOART")),(Object)(_c.GetString("PC_MONTO")),(Object)(_c.GetString("PC_LON")),(Object)(_c.GetString("PC_LAT")),(Object)(_almacen),(Object)(_ruta),(Object)(_c.GetString("PC_COSTO_SIN")),(Object)(_c.GetString("PC_FACTURA"))};
 //BA.debugLineNum = 133;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedidos_1";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedidos_1"));
 //BA.debugLineNum = 134;BA.debugLine="reqsPendientes.Add(\"ins_pedidos_1\")";
_reqspendientes.Add((Object)("ins_pedidos_1"));
 }
};
 };
 //BA.debugLineNum = 137;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 138;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 140;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 143;BA.debugLine="c = skmt.ExecQuery(\"SELECT CODIGOKMTS, CODIGOB,";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT CODIGOKMTS, CODIGOB, LAT, LON FROM HIST_CODIGO_BARRAS")));
 //BA.debugLineNum = 144;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 145;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step27 = 1;
final int limit27 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit27 ;_i = _i + step27 ) {
 //BA.debugLineNum = 146;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 147;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 148;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 149;BA.debugLine="cmd.Name = \"insert_QR_2_MARDS\"";
_cmd.Name /*String*/  = "insert_QR_2_MARDS";
 //BA.debugLineNum = 150;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("CODIGOKMTS")),(Object)(_c.GetString("CODIGOB")),(Object)(_c.GetString("LON")),(Object)(_c.GetString("LAT")),(Object)(_almacen),(Object)(_ruta)};
 //BA.debugLineNum = 151;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_QR\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_QR"));
 //BA.debugLineNum = 152;BA.debugLine="reqsPendientes.Add(\"ins_QR\")";
_reqspendientes.Add((Object)("ins_QR"));
 }
};
 };
 //BA.debugLineNum = 155;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 157;BA.debugLine="c = skmt.ExecQuery(\"SELECT HE_CLIE, HE_RES, HE_F";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT HE_CLIE, HE_RES, HE_FECHA, HE_TIPO FROM HIST_ENCUESTA")));
 //BA.debugLineNum = 158;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 159;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step40 = 1;
final int limit40 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit40 ;_i = _i + step40 ) {
 //BA.debugLineNum = 160;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 161;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 162;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 163;BA.debugLine="cmd.Name = \"insert_encuesta_MARDS\"";
_cmd.Name /*String*/  = "insert_encuesta_MARDS";
 //BA.debugLineNum = 164;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("HE_CLIE")),(Object)(_c.GetString("HE_RES")),(Object)(_c.GetString("HE_FECHA")),(Object)(_c.GetString("HE_TIPO"))};
 //BA.debugLineNum = 165;BA.debugLine="reqManager.ExecuteCommand(cmd , \"hist_encuesta";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("hist_encuesta"));
 //BA.debugLineNum = 166;BA.debugLine="reqsPendientes.Add(\"hist_encuesta\")";
_reqspendientes.Add((Object)("hist_encuesta"));
 }
};
 };
 //BA.debugLineNum = 169;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 171;BA.debugLine="c = skmt.ExecQuery(\"SELECT PE_CEDIS,PE_COSTO_TOT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO FROM PEDIDO")));
 //BA.debugLineNum = 172;BA.debugLine="d = skmt.ExecQuery(\"SELECT COUNT(*) as CUANTOS_P";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")));
 //BA.debugLineNum = 173;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 174;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step54 = 1;
final int limit54 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit54 ;_i = _i + step54 ) {
 //BA.debugLineNum = 175;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 176;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 177;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 178;BA.debugLine="cmd.Name = \"insert_pedido_MARDS\"";
_cmd.Name /*String*/  = "insert_pedido_MARDS";
 //BA.debugLineNum = 179;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PE_CEDIS")),(Object)(_almacen),(Object)(_c.GetString("PE_COSTO_TOT")),(Object)(_c.GetString("PE_COSTOU")),(Object)(_c.GetString("PE_CANT")),(Object)(_c.GetString("PE_PRONOMBRE")),(Object)(_c.GetString("PE_PROID")),(Object)(_c.GetString("PE_CLIENTE")),(Object)(_c.GetString("PE_FECHA")),(Object)(_c.GetString("PE_USUARIO")),(Object)(_c.GetString("PE_RUTA")),(Object)(_c.GetString("PE_COSTO_SIN")),(Object)(_c.GetString("PE_DESC")),(Object)(_c.GetString("PE_FOLIO"))};
 //BA.debugLineNum = 180;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedido_1\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedido_1"));
 //BA.debugLineNum = 181;BA.debugLine="reqsPendientes.Add(\"ins_pedido_1\")";
_reqspendientes.Add((Object)("ins_pedido_1"));
 }
};
 };
 //BA.debugLineNum = 184;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 185;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 186;BA.debugLine="cuantos_pedido = D.GetString(\"CUANTOS_PEDIDO\")";
_cuantos_pedido = _d.GetString("CUANTOS_PEDIDO");
 //BA.debugLineNum = 187;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 190;BA.debugLine="c = skmt.ExecQuery(\"SELECT NV_CLIENTE,NV_FECHA,N";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_NOMBRE, NV_DIRECCION FROM NOVENTA")));
 //BA.debugLineNum = 191;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 192;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step70 = 1;
final int limit70 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit70 ;_i = _i + step70 ) {
 //BA.debugLineNum = 193;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 194;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 195;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 196;BA.debugLine="cmd.Name = \"insert_noventa_MARDS\"";
_cmd.Name /*String*/  = "insert_noventa_MARDS";
 //BA.debugLineNum = 197;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("NV_CLIENTE")),(Object)(_c.GetString("NV_FECHA")),(Object)(_c.GetString("NV_USER")),(Object)(_c.GetString("NV_MOTIVO")),(Object)(_c.GetString("NV_COMM")),(Object)(_c.GetString("NV_LAT")),(Object)(_c.GetString("NV_LON")),(Object)(_almacen),(Object)(_ruta),(Object)(_c.GetString("NV_NOMBRE")),(Object)(_c.GetString("NV_DIRECCION"))};
 //BA.debugLineNum = 198;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 //BA.debugLineNum = 199;BA.debugLine="reqsPendientes.Add(\"inst_noventa\")";
_reqspendientes.Add((Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 202;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 210;BA.debugLine="c=skmt.ExecQuery(\"Select HGCLIENTE, HGDATE, HGLA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("Select HGCLIENTE, HGDATE, HGLAT, HGLON from HIST_GEOCERCA")));
 //BA.debugLineNum = 211;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 212;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step83 = 1;
final int limit83 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit83 ;_i = _i + step83 ) {
 //BA.debugLineNum = 213;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 214;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 215;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 216;BA.debugLine="cmd.Name = \"insert_geocerca_MARDS\"";
_cmd.Name /*String*/  = "insert_geocerca_MARDS";
 //BA.debugLineNum = 217;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("HGCLIENTE")),(Object)(_c.GetString("HGDATE")),(Object)(_c.GetString("HGLAT")),(Object)(_c.GetString("HGLON"))};
 //BA.debugLineNum = 218;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 221;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 224;BA.debugLine="c=skmt.ExecQuery(\"Select HFCLIENTE, HFALIAS,HFRU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("Select HFCLIENTE, HFALIAS,HFRUTA,HFALMACEN from HIST_FACE")));
 //BA.debugLineNum = 225;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 226;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step95 = 1;
final int limit95 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit95 ;_i = _i + step95 ) {
 //BA.debugLineNum = 227;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 228;BA.debugLine="Dim cmd As DBCommand";
_cmd = new dbcheck.keymon.lat.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 229;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 230;BA.debugLine="cmd.Name = \"insert_face_like_MARDS\"";
_cmd.Name /*String*/  = "insert_face_like_MARDS";
 //BA.debugLineNum = 231;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("HFCLIENTE")),(Object)(_c.GetString("HFALIAS")),(Object)(_c.GetString("HFRUTA")),(Object)(_c.GetString("HFALMACEN"))};
 //BA.debugLineNum = 232;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 235;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 247;BA.debugLine="ToastMessageShow(\"Se Actualizaran los datos, Est";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias "+_ruta),__c.True);
 };
 //BA.debugLineNum = 250;BA.debugLine="End Sub";
return "";
}
public String  _b_guardaalmacen_click() throws Exception{
 //BA.debugLineNum = 396;BA.debugLine="Private Sub b_guardaAlmacen_Click";
 //BA.debugLineNum = 397;BA.debugLine="p_editaAlmacen.Visible = False";
_p_editaalmacen.setVisible(__c.False);
 //BA.debugLineNum = 398;BA.debugLine="End Sub";
return "";
}
public String  _b_guardaruta_click() throws Exception{
 //BA.debugLineNum = 391;BA.debugLine="Private Sub b_guardaRuta_Click";
 //BA.debugLineNum = 392;BA.debugLine="p_editaRuta.Visible = False";
_p_editaruta.setVisible(__c.False);
 //BA.debugLineNum = 393;BA.debugLine="skmt.ExecNonQuery($\"update \"$)";
_skmt.ExecNonQuery(("update "));
 //BA.debugLineNum = 394;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.IntentWrapper _in = null;
String _xmldata = "";
anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper _outstr = null;
anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _instr = null;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
 //BA.debugLineNum = 55;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 56;BA.debugLine="Log(\"INICIO\")";
__c.LogImpl("110616833","INICIO",0);
 //BA.debugLineNum = 58;BA.debugLine="Dim in As Intent = B4XPages.GetNativeParent(Me).G";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
_in = _b4xpages._getnativeparent /*anywheresoftware.b4a.objects.ActivityWrapper*/ (ba,this).GetStartingIntent();
 //BA.debugLineNum = 59;BA.debugLine="If in <> Null Then";
if (_in!= null) { 
 //BA.debugLineNum = 60;BA.debugLine="Log(in.GetData)";
__c.LogImpl("110616837",_in.GetData(),0);
 //BA.debugLineNum = 61;BA.debugLine="If in.GetData <> Null Then";
if (_in.GetData()!= null) { 
 //BA.debugLineNum = 62;BA.debugLine="Dim XmlData As String";
_xmldata = "";
 //BA.debugLineNum = 63;BA.debugLine="XmlData = in.GetData";
_xmldata = _in.GetData();
 //BA.debugLineNum = 64;BA.debugLine="ToastMessageShow(XmlData, False)";
__c.ToastMessageShow(BA.ObjectToCharSequence(_xmldata),__c.False);
 //BA.debugLineNum = 67;BA.debugLine="Try";
try { //BA.debugLineNum = 68;BA.debugLine="Dim OutStr As OutputStream = File.OpenOutput(F";
_outstr = new anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper();
_outstr = __c.File.OpenOutput(__c.File.getDirInternal(),"kmt.db",__c.False);
 //BA.debugLineNum = 69;BA.debugLine="Dim InStr As InputStream = File.OpenInput(\"Con";
_instr = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
_instr = __c.File.OpenInput("ContentDir",_xmldata);
 //BA.debugLineNum = 70;BA.debugLine="File.Copy2(InStr,OutStr)";
__c.File.Copy2((java.io.InputStream)(_instr.getObject()),(java.io.OutputStream)(_outstr.getObject()));
 //BA.debugLineNum = 71;BA.debugLine="Log(\"BD copiada a interna.\")";
__c.LogImpl("110616848","BD copiada a interna.",0);
 //BA.debugLineNum = 72;BA.debugLine="OutStr.Close";
_outstr.Close();
 } 
       catch (Exception e16) {
			ba.setLastException(e16); //BA.debugLineNum = 74;BA.debugLine="Log(LastException)";
__c.LogImpl("110616851",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
 };
 //BA.debugLineNum = 79;BA.debugLine="Log($\"Existe BD: ${File.Exists(File.DirInternal,";
__c.LogImpl("110616856",("Existe BD: "+__c.SmartStringFormatter("",(Object)(__c.File.Exists(__c.File.getDirInternal(),"kmt.db")))+""),0);
 //BA.debugLineNum = 80;BA.debugLine="If File.Exists(File.DirInternal, \"kmt.db\") Then";
if (__c.File.Exists(__c.File.getDirInternal(),"kmt.db")) { 
 //BA.debugLineNum = 81;BA.debugLine="If Not(skmt.IsInitialized) Then skmt.Initialize(";
if (__c.Not(_skmt.IsInitialized())) { 
_skmt.Initialize(__c.File.getDirInternal(),"kmt.db",__c.True);};
 //BA.debugLineNum = 82;BA.debugLine="Dim c As Cursor = skmt.ExecQuery($\"select count(";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery(("select count(distinct pe_cliente) as pedidos, group_concat(distinct substr(pe_fecha, 4,2)) as diasVenta, sum(pe_costo_tot) as total, (select PE_CANT from pedido where PE_CANT = 0) as cantsEnCero, (select count(PE_CLIENTE) from pedido where printf(\"%d\", PE_CLIENTE) <> PE_CLIENTE ) as clienteNoNumerico from pedido"))));
 //BA.debugLineNum = 83;BA.debugLine="Log(c.RowCount)";
__c.LogImpl("110616860",BA.NumberToString(_c.getRowCount()),0);
 //BA.debugLineNum = 84;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 85;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 86;BA.debugLine="l_pedidos2.Text = c.GetString(\"pedidos\")";
_l_pedidos2.setText(BA.ObjectToCharSequence(_c.GetString("pedidos")));
 //BA.debugLineNum = 87;BA.debugLine="l_diasVenta.Text = c.GetString(\"diasVenta\")";
_l_diasventa.setText(BA.ObjectToCharSequence(_c.GetString("diasVenta")));
 //BA.debugLineNum = 88;BA.debugLine="l_totalVenta.Text = \"$\" & NumberFormat2(c.GetSt";
_l_totalventa.setText(BA.ObjectToCharSequence("$"+__c.NumberFormat2((double)(Double.parseDouble(_c.GetString("total"))),(int) (1),(int) (2),(int) (2),__c.True)));
 //BA.debugLineNum = 89;BA.debugLine="l_cantsEnCero.Text = c.GetString(\"cantsEnCero\")";
_l_cantsencero.setText(BA.ObjectToCharSequence(_c.GetString("cantsEnCero")));
 //BA.debugLineNum = 90;BA.debugLine="l_clienteNoNumerico.Text = c.GetString(\"cliente";
_l_clientenonumerico.setText(BA.ObjectToCharSequence(_c.GetString("clienteNoNumerico")));
 };
 //BA.debugLineNum = 92;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select pe_ruta";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select pe_ruta from pedido")));
 //BA.debugLineNum = 93;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 94;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 95;BA.debugLine="ruta = c.GetString(\"PE_RUTA\")";
_ruta = _c.GetString("PE_RUTA");
 //BA.debugLineNum = 96;BA.debugLine="l_ruta2.Text = ruta";
_l_ruta2.setText(BA.ObjectToCharSequence(_ruta));
 };
 //BA.debugLineNum = 98;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select USUARIO";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select USUARIO from usuarioa")));
 //BA.debugLineNum = 99;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 100;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 101;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 102;BA.debugLine="l_usuario2.Text = usuario";
_l_usuario2.setText(BA.ObjectToCharSequence(_usuario));
 };
 //BA.debugLineNum = 104;BA.debugLine="Dim c As Cursor = skmt.ExecQuery(\"select ID_ALMA";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_skmt.ExecQuery("select ID_ALMACEN from cat_almacen")));
 //BA.debugLineNum = 105;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 106;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 107;BA.debugLine="almacen = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 108;BA.debugLine="l_almacen2.Text = almacen";
_l_almacen2.setText(BA.ObjectToCharSequence(_almacen));
 };
 //BA.debugLineNum = 110;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 112;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.keywords.Common.ResumableSubWrapper  _b4xpage_closerequest() throws Exception{
ResumableSub_B4XPage_CloseRequest rsub = new ResumableSub_B4XPage_CloseRequest(this);
rsub.resume(ba, null);
return (anywheresoftware.b4a.keywords.Common.ResumableSubWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.keywords.Common.ResumableSubWrapper(), rsub);
}
public static class ResumableSub_B4XPage_CloseRequest extends BA.ResumableSub {
public ResumableSub_B4XPage_CloseRequest(dbcheck.keymon.lat.b4xmainpage parent) {
this.parent = parent;
}
dbcheck.keymon.lat.b4xmainpage parent;

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

    while (true) {
        switch (state) {
            case -1:
{
parent.__c.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = -1;
 //BA.debugLineNum = 373;BA.debugLine="ExitApplication";
parent.__c.ExitApplication();
 //BA.debugLineNum = 374;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 //BA.debugLineNum = 375;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 42;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 43;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 44;BA.debugLine="Root.LoadLayout(\"MainPage\")";
_root.LoadLayout("MainPage",ba);
 //BA.debugLineNum = 45;BA.debugLine="reqManager.Initialize(Me, \"http://187.189.244.154";
_reqmanager._initialize /*String*/ (ba,this,"http://187.189.244.154:1782");
 //BA.debugLineNum = 46;BA.debugLine="B4XPages.SetTitle(Me, \"Mariana revisión de BD\")";
_b4xpages._settitle /*String*/ (ba,this,(Object)("Mariana revisión de BD"));
 //BA.debugLineNum = 47;BA.debugLine="Subs.centraPanel(p_progressDialog, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_progressdialog,_root.getWidth());
 //BA.debugLineNum = 48;BA.debugLine="Subs.centraPanel(p_editaRuta, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_editaruta,_root.getWidth());
 //BA.debugLineNum = 49;BA.debugLine="Subs.centraPanel(p_editaAlmacen, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_editaalmacen,_root.getWidth());
 //BA.debugLineNum = 51;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 8;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 9;BA.debugLine="Private Root As B4XView";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 10;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 12;BA.debugLine="Private b_enviar As Button";
_b_enviar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
 //BA.debugLineNum = 14;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new dbcheck.keymon.lat.dbrequestmanager();
 //BA.debugLineNum = 15;BA.debugLine="Private l_pedidos2 As Label";
_l_pedidos2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Private l_diasVenta As Label";
_l_diasventa = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Private l_totalVenta As Label";
_l_totalventa = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Private l_cantsEnCero As Label";
_l_cantsencero = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Private l_clienteNoNumerico As Label";
_l_clientenonumerico = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
 //BA.debugLineNum = 22;BA.debugLine="Dim cuantos_pedidosc As String";
_cuantos_pedidosc = "";
 //BA.debugLineNum = 23;BA.debugLine="Dim cuantos_noventa As String";
_cuantos_noventa = "";
 //BA.debugLineNum = 24;BA.debugLine="Dim reqsPendientes As List";
_reqspendientes = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 25;BA.debugLine="Private l_ruta2 As Label";
_l_ruta2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 26;BA.debugLine="Dim ruta As String = \"\"";
_ruta = "";
 //BA.debugLineNum = 27;BA.debugLine="Private l_usuario2 As Label";
_l_usuario2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim usuario As String = \"\"";
_usuario = "";
 //BA.debugLineNum = 29;BA.debugLine="Private l_almacen2 As Label";
_l_almacen2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim almacen As String = \"\"";
_almacen = "";
 //BA.debugLineNum = 31;BA.debugLine="Private p_progressDialog As Panel";
_p_progressdialog = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Private l_progressDialog As Label";
_l_progressdialog = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Private p_editaRuta As Panel";
_p_editaruta = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Private p_editaAlmacen As Panel";
_p_editaalmacen = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 35;BA.debugLine="End Sub";
return "";
}
public String  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 37;BA.debugLine="Public Sub Initialize";
 //BA.debugLineNum = 39;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(dbcheck.keymon.lat.httpjob _job) throws Exception{
dbcheck.keymon.lat.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
dbcheck.keymon.lat.dbrequestmanager._dbresult _result = null;
int _cuantosp = 0;
int _cuantosc = 0;
int _cuantosn = 0;
 //BA.debugLineNum = 252;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 253;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 }else {
 //BA.debugLineNum = 256;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("114417924","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
 //BA.debugLineNum = 257;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 258;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 259;BA.debugLine="reqsPendientes.RemoveAt(reqsPendientes.IndexOf(";
_reqspendientes.RemoveAt(_reqspendientes.IndexOf(_resultado.Tag /*Object*/ ));
 };
 //BA.debugLineNum = 262;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 263;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 264;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_pedido";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_pedido_")>-1) { 
 //BA.debugLineNum = 265;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
 //BA.debugLineNum = 266;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("114417934",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
 //BA.debugLineNum = 267;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_records = (Object[])(group13.Get(index13));
 //BA.debugLineNum = 268;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group14 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen14 = group14.getSize()
;int index14 = 0;
;
for (; index14 < groupLen14;index14++){
_k = BA.ObjectToString(group14.Get(index14));
 //BA.debugLineNum = 269;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("114417937",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 275;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 276;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 277;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"hist_encue";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("hist_encuesta")>-1) { 
 //BA.debugLineNum = 278;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
 //BA.debugLineNum = 279;BA.debugLine="reqsPendientes.RemoveAt(reqsPendientes.IndexOf";
_reqspendientes.RemoveAt(_reqspendientes.IndexOf(_resultado.Tag /*Object*/ ));
 //BA.debugLineNum = 280;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("114417948",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
 //BA.debugLineNum = 281;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group26 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen26 = group26.getSize()
;int index26 = 0;
;
for (; index26 < groupLen26;index26++){
_records = (Object[])(group26.Get(index26));
 //BA.debugLineNum = 282;BA.debugLine="For Each k As String In resultado.Columns.Key";
{
final anywheresoftware.b4a.BA.IterableList group27 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen27 = group27.getSize()
;int index27 = 0;
;
for (; index27 < groupLen27;index27++){
_k = BA.ObjectToString(group27.Get(index27));
 //BA.debugLineNum = 283;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record";
__c.LogImpl("114417951",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
 //BA.debugLineNum = 289;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 290;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 291;BA.debugLine="If RESULT.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) { 
 //BA.debugLineNum = 292;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group36 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen36 = group36.getSize()
;int index36 = 0;
;
for (; index36 < groupLen36;index36++){
_records = (Object[])(group36.Get(index36));
 //BA.debugLineNum = 293;BA.debugLine="Dim CUANTOSP As Int = records(RESULT.Columns.";
_cuantosp = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSP"))))]));
 //BA.debugLineNum = 294;BA.debugLine="If cuantos_pedido < = CUANTOSP Then";
if ((double)(Double.parseDouble(_cuantos_pedido))<=_cuantosp) { 
 //BA.debugLineNum = 298;BA.debugLine="ToastMessageShow(\"INFO OK\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("INFO OK"),__c.True);
 }else {
 //BA.debugLineNum = 300;BA.debugLine="ToastMessageShow(\"No se cargo bien la info P";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido),__c.True);
 //BA.debugLineNum = 302;BA.debugLine="ToastMessageShow(\"ENVIAR DATOS (K-2)\", True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("ENVIAR DATOS (K-2)"),__c.True);
 //BA.debugLineNum = 303;BA.debugLine="Log(\"No se cargo bien la info P. Sync Nuevam";
__c.LogImpl("114417971","No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido,0);
 };
 }
};
 };
 };
 //BA.debugLineNum = 309;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 310;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 311;BA.debugLine="If RESULT.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) { 
 //BA.debugLineNum = 312;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group51 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen51 = group51.getSize()
;int index51 = 0;
;
for (; index51 < groupLen51;index51++){
_records = (Object[])(group51.Get(index51));
 //BA.debugLineNum = 313;BA.debugLine="Dim CUANTOSC As Int = records(RESULT.Columns.";
_cuantosc = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSC"))))]));
 //BA.debugLineNum = 314;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) { 
 }else {
 //BA.debugLineNum = 318;BA.debugLine="ToastMessageShow(\"No se cargo bien la info C";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info C. Sync Nuevamente"+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc),__c.True);
 //BA.debugLineNum = 319;BA.debugLine="Log(\"No se cargo bien la info C. Sync Nuevam";
__c.LogImpl("114417987","No se cargo bien la info C. Sync Nuevamente "+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc,0);
 };
 }
};
 };
 };
 //BA.debugLineNum = 325;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 326;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 327;BA.debugLine="If RESULT.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) { 
 //BA.debugLineNum = 328;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group64 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen64 = group64.getSize()
;int index64 = 0;
;
for (; index64 < groupLen64;index64++){
_records = (Object[])(group64.Get(index64));
 //BA.debugLineNum = 329;BA.debugLine="Dim CUANTOSN As Int = records(RESULT.Columns.";
_cuantosn = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CUANTOSN"))))]));
 //BA.debugLineNum = 330;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) { 
 }else {
 //BA.debugLineNum = 334;BA.debugLine="ToastMessageShow(\"No se cargo bien la info N";
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info N. Sync Nuevamente"+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa),__c.True);
 //BA.debugLineNum = 335;BA.debugLine="Log(\"No se cargo bien la info N. Sync Nuevam";
__c.LogImpl("114418003","No se cargo bien la info N. Sync Nuevamente "+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa,0);
 };
 }
};
 };
 };
 //BA.debugLineNum = 341;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 342;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 343;BA.debugLine="If RESULT.Tag = \"ins_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedido"))) { 
 //BA.debugLineNum = 344;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group77 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen77 = group77.getSize()
;int index77 = 0;
;
for (; index77 < groupLen77;index77++){
_records = (Object[])(group77.Get(index77));
 }
};
 //BA.debugLineNum = 350;BA.debugLine="Log(\"5\")";
__c.LogImpl("114418018","5",0);
 };
 };
 //BA.debugLineNum = 354;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 355;BA.debugLine="Dim RESULT As DBResult = B4XPages.MainPage.reqM";
_result = _b4xpages._mainpage /*dbcheck.keymon.lat.b4xmainpage*/ (ba)._reqmanager /*dbcheck.keymon.lat.dbrequestmanager*/ ._handlejob /*dbcheck.keymon.lat.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 356;BA.debugLine="If RESULT.Tag = \"ins_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedido"))) { 
 //BA.debugLineNum = 357;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group85 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen85 = group85.getSize()
;int index85 = 0;
;
for (; index85 < groupLen85;index85++){
_records = (Object[])(group85.Get(index85));
 }
};
 //BA.debugLineNum = 364;BA.debugLine="Log(\"5\")";
__c.LogImpl("114418032","5",0);
 };
 };
 };
 //BA.debugLineNum = 368;BA.debugLine="If reqsPendientes.Size = 0 Then p_progressDialog.";
if (_reqspendientes.getSize()==0) { 
_p_progressdialog.setVisible(__c.False);};
 //BA.debugLineNum = 369;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 //BA.debugLineNum = 370;BA.debugLine="End Sub";
return "";
}
public String  _l_almacen2_longclick() throws Exception{
 //BA.debugLineNum = 382;BA.debugLine="Private Sub l_almacen2_LongClick";
 //BA.debugLineNum = 383;BA.debugLine="p_editaAlmacen.Top = l_almacen2.top";
_p_editaalmacen.setTop(_l_almacen2.getTop());
 //BA.debugLineNum = 384;BA.debugLine="p_editaAlmacen.Visible = True";
_p_editaalmacen.setVisible(__c.True);
 //BA.debugLineNum = 385;BA.debugLine="End Sub";
return "";
}
public String  _l_ruta2_longclick() throws Exception{
 //BA.debugLineNum = 377;BA.debugLine="Private Sub l_ruta2_LongClick";
 //BA.debugLineNum = 378;BA.debugLine="p_editaRuta.Top = l_ruta2.top";
_p_editaruta.setTop(_l_ruta2.getTop());
 //BA.debugLineNum = 379;BA.debugLine="p_editaRuta.Visible = True";
_p_editaruta.setVisible(__c.True);
 //BA.debugLineNum = 380;BA.debugLine="End Sub";
return "";
}
public String  _l_usuario2_longclick() throws Exception{
 //BA.debugLineNum = 387;BA.debugLine="Private Sub l_usuario2_LongClick";
 //BA.debugLineNum = 389;BA.debugLine="End Sub";
return "";
}
public String  _p_principal_click() throws Exception{
 //BA.debugLineNum = 400;BA.debugLine="Private Sub p_principal_Click";
 //BA.debugLineNum = 401;BA.debugLine="p_editaAlmacen.Visible = False";
_p_editaalmacen.setVisible(__c.False);
 //BA.debugLineNum = 402;BA.debugLine="p_editaRuta.Visible = False";
_p_editaruta.setVisible(__c.False);
 //BA.debugLineNum = 403;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "B4XPAGE_CREATED"))
	return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
	return _jobdone((dbcheck.keymon.lat.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
