package medicomed.keymon.com.mx;


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

public class c_principal 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, "medicomed.keymon.com.mx.c_principal");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", medicomed.keymon.com.mx.c_principal.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.RuntimePermissions _rp = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public medicomed.keymon.com.mx.c_respaldodiario _rd = null;
public medicomed.keymon.com.mx.dbrequestmanager _reqmanager = null;
public String _conectado = "";
public anywheresoftware.b4a.objects.IME _ime = null;
public anywheresoftware.b4a.objects.Timer _t1 = null;
public anywheresoftware.b4a.objects.Timer _t2 = null;
public anywheresoftware.b4a.keywords.StringBuilderWrapper _sb = null;
public anywheresoftware.b4a.phone.Phone _phone = null;
public anywheresoftware.b4a.gps.GPS _g = null;
public anywheresoftware.b4a.objects.ButtonWrapper _trabajar = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _b = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _e = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _f = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d2 = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cargar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _pendiente = null;
public byte[] _foto1 = null;
public String _usuario = "";
public anywheresoftware.b4a.objects.ButtonWrapper _connecta = null;
public String _conn = "";
public anywheresoftware.b4a.objects.ButtonWrapper _subir = null;
public medicomed.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
public int _tope = 0;
public int _count_clie = 0;
public String _fecha = "";
public double _drop = 0;
public double _efectiva = 0;
public anywheresoftware.b4a.objects.LabelWrapper _l_montod = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cuantosc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_drop = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efectiva = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ctast = null;
public anywheresoftware.b4a.objects.ButtonWrapper _busca = null;
public String _cuantos = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_cuantosn = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_ruta = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_porvisitar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_mapa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ruta = null;
public String _almacen = "";
public anywheresoftware.b4a.objects.ImageViewWrapper _img2 = null;
public String _listo1 = "";
public String _listo2 = "";
public String _listo3 = "";
public String _listo4 = "";
public String _listo5 = "";
public String _ejecutando = "";
public String _res = "";
public String _inve = "";
public String _cuantos_pedidosc = "";
public String _cuantos_pedido = "";
public String _cuantos_noventa = "";
public String _datos_iguales = "";
public anywheresoftware.b4a.phone.Phone.PhoneId _p = null;
public String _imei = "";
public anywheresoftware.b4a.objects.ButtonWrapper _inv = null;
public anywheresoftware.b4a.objects.PanelWrapper _p1 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _clave = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_ok_pas = null;
public String _paso = "";
public anywheresoftware.b4a.objects.EditTextWrapper _usuario1 = null;
public double _connecta1 = 0;
public String _armafolio = "";
public anywheresoftware.b4a.objects.ButtonWrapper _nuevo = null;
public anywheresoftware.b4a.objects.LabelWrapper _s_cc = null;
public anywheresoftware.b4a.objects.LabelWrapper _s_cp = null;
public anywheresoftware.b4a.objects.LabelWrapper _s_ch = null;
public anywheresoftware.b4a.objects.ProgressBarWrapper _pb2 = null;
public anywheresoftware.b4a.objects.ProgressBarWrapper _pb1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_p_1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_p_2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_p_3 = null;
public String _carga = "";
public String _porcentaje = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_resumen = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_ok_res = null;
public anywheresoftware.b4a.objects.ButtonWrapper _resumen = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cuantost = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _img3 = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview3 = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview5 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tickprom = null;
public anywheresoftware.b4a.objects.ListViewWrapper _l_marcas = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _imageview9 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_ruta2 = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _resdia = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _hacer_ped = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _nvo_cliente = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _tickets_dia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_ks = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_kp = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_k = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_c1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_c2 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_monto_c3 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_encuesta = null;
public batteryprogressviewwrapper.batteryprogressviewWrapper _bpv1 = null;
public int[] _batterystatus = null;
public medicomed.keymon.com.mx.batteryutilities _bu = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_nes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_real = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_alcance = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vplan = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vreal = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efec_vis = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_visitcc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efec_pv = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_efec_pura = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cte_promo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_reden_promo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_lin_tick = null;
public anywheresoftware.b4a.objects.ScrollViewWrapper _scroll_resdia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_acumulado = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_unilever = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rechazop = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rechazom = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vta_3mes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vta_2mes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vta_1mes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_mes_py = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_frec_de_creal = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_frec_de_cobj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cob_visit = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_visit_real = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_visit_plan = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_eco = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_cob_ccc = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ctes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vpo_vta = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vpo_obj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ds_vta = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ds_obj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_dra_vta = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_dra_obj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_alcancem = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tendencia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_vta_acum = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_obj_mes = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ds_objd = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ds_vtad = null;
public String _lpt = "";
public String _steyin = "";
public String _steyout = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_prio = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_secund = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_comp = null;
public String _stay_hh = "";
public String _stay_mi = "";
public String _stay_ss = "";
public String _sdate = "";
public String _stime = "";
public String _horaingreso = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_quala = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ferrero = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_sanmarcos = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_campari = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_iberia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_bepensa = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_scj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_medj = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_duracell = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_guna = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_kimb = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tresm = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_redb = null;
public anywheresoftware.b4a.objects.ButtonWrapper _btn_ubicar = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_comm = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_mm = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_vive = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_guna = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_ba = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_comis = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_mm_1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_vive_1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_guna_1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_ba_1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_total_comis_1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_ok_comiss = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel_c = null;
public int _titleheight = 0;
public int _title2height = 0;
public int _dividerheight = 0;
public b4a.example3.customlistview _clv1 = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _pnltitle = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_marcas = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel5 = null;
public anywheresoftware.b4a.objects.LabelWrapper _lbltitle = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_ok_panel5 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_principal = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_mandainfo = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.objects.LabelWrapper _label22 = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_rutasuplencia = null;
public String _userpiezas = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_abordo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_abordo = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_preventa = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_abordo = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel11 = null;
public b4a.example3.customlistview _clv_pick_ciego = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pick_ciego = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_pick_ciego = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_pick_ciego = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_ciego = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel4 = null;
public String _q_buscar = "";
public anywheresoftware.b4a.objects.EditTextWrapper _et_buspc = null;
public medicomed.keymon.com.mx.c_bitacora _bitacora = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_pedidos_tot = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regresar = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_pedidos = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_prod = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_regreso = null;
public anywheresoftware.b4a.objects.ImageViewWrapper _iv_productos = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_productos = null;
public anywheresoftware.b4a.objects.ListViewWrapper _lv_prod_prin = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prod_p = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_prod_c = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tot_prod_c = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_tot_prod_p = null;
public b4a.example.dateutils _dateutils = null;
public medicomed.keymon.com.mx.main _main = null;
public medicomed.keymon.com.mx.starter _starter = null;
public medicomed.keymon.com.mx.appupdater _appupdater = null;
public medicomed.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public medicomed.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public medicomed.keymon.com.mx.subs _subs = null;
public medicomed.keymon.com.mx.notificationservice _notificationservice = null;
public medicomed.keymon.com.mx.pendientes _pendientes = null;
public medicomed.keymon.com.mx.tracker _tracker = null;
public medicomed.keymon.com.mx.newinst2 _newinst2 = null;
public medicomed.keymon.com.mx.b4xpages _b4xpages = null;
public medicomed.keymon.com.mx.b4xcollections _b4xcollections = null;
public medicomed.keymon.com.mx.httputils2service _httputils2service = null;
public medicomed.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static class _titledata{
public boolean IsInitialized;
public String Title;
public void Initialize() {
IsInitialized = true;
Title = "";
}
@Override
		public String toString() {
			return BA.TypeToString(this, false);
		}}
public String  _addtitle(String _title) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p_marcas = null;
medicomed.keymon.com.mx.c_principal._titledata _td = null;
 //BA.debugLineNum = 2871;BA.debugLine="Sub AddTitle (Title As String)";
 //BA.debugLineNum = 2872;BA.debugLine="Dim p_MARCAS As B4XView = xui.CreatePanel(\"\")";
_p_marcas = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p_marcas = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 2873;BA.debugLine="p_MARCAS.SetLayoutAnimated(0, 0, 0, CLV1.AsView.W";
_p_marcas.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_clv1._asview().getWidth(),_titleheight);
 //BA.debugLineNum = 2874;BA.debugLine="p_MARCAS.LoadLayout(\"CellTitle\")";
_p_marcas.LoadLayout("CellTitle",ba);
 //BA.debugLineNum = 2875;BA.debugLine="lblTitle.Text = Title";
_lbltitle.setText(BA.ObjectToCharSequence(_title));
 //BA.debugLineNum = 2876;BA.debugLine="Dim td As TitleData";
_td = new medicomed.keymon.com.mx.c_principal._titledata();
 //BA.debugLineNum = 2877;BA.debugLine="td.Title = Title";
_td.Title /*String*/  = _title;
 //BA.debugLineNum = 2878;BA.debugLine="CLV1.Add(p_MARCAS, td)";
_clv1._add(_p_marcas,(Object)(_td));
 //BA.debugLineNum = 2879;BA.debugLine="End Sub";
return "";
}
public String  _b_comm_click() throws Exception{
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
 //BA.debugLineNum = 2672;BA.debugLine="Sub B_COMM_Click";
 //BA.debugLineNum = 2673;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2674;BA.debugLine="label1 = lv_pedidos_tot.SingleLineLayout.Label";
_label1 = _lv_pedidos_tot.getSingleLineLayout().Label;
 //BA.debugLineNum = 2675;BA.debugLine="label1.TextSize = 14";
_label1.setTextSize((float) (14));
 //BA.debugLineNum = 2676;BA.debugLine="SCROLL_RESDIA.Panel.Height = p_pedidos.Height";
_scroll_resdia.getPanel().setHeight(_p_pedidos.getHeight());
 //BA.debugLineNum = 2677;BA.debugLine="p_pedidos.Width = Root.Width";
_p_pedidos.setWidth(_root.getWidth());
 //BA.debugLineNum = 2678;BA.debugLine="b_regresar.Left = (p_pedidos.Width - b_regresar.W";
_b_regresar.setLeft((int) ((_p_pedidos.getWidth()-_b_regresar.getWidth())/(double)2));
 //BA.debugLineNum = 2679;BA.debugLine="b_regresar.Top = p_pedidos.Height - b_regresar.He";
_b_regresar.setTop((int) (_p_pedidos.getHeight()-_b_regresar.getHeight()));
 //BA.debugLineNum = 2680;BA.debugLine="p_pedidos.Visible = True";
_p_pedidos.setVisible(__c.True);
 //BA.debugLineNum = 2683;BA.debugLine="MostrarDatosPedidos";
_mostrardatospedidos();
 //BA.debugLineNum = 2684;BA.debugLine="End Sub";
return "";
}
public String  _b_mapa_click() throws Exception{
 //BA.debugLineNum = 2165;BA.debugLine="Sub b_mapa_Click";
 //BA.debugLineNum = 2166;BA.debugLine="Log(\"mapClic\")";
__c.LogImpl("72818049","mapClic",0);
 //BA.debugLineNum = 2167;BA.debugLine="B4XPages.GetPage(\"Mapas\")";
_b4xpages._getpage /*Object*/ (ba,"Mapas");
 //BA.debugLineNum = 2168;BA.debugLine="End Sub";
return "";
}
public String  _b_marcas_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 2787;BA.debugLine="Sub B_MARCAS_Click";
 //BA.debugLineNum = 2812;BA.debugLine="SCROLL_RESDIA.Visible = False";
_scroll_resdia.setVisible(__c.False);
 //BA.debugLineNum = 2813;BA.debugLine="Panel5.Visible = True";
_panel5.setVisible(__c.True);
 //BA.debugLineNum = 2814;BA.debugLine="pnlTitle.Visible = False";
_pnltitle.setVisible(__c.False);
 //BA.debugLineNum = 2815;BA.debugLine="pnlTitle.SetLayoutAnimated(0, 0, 0, CLV1.AsView.W";
_pnltitle.SetLayoutAnimated((int) (0),(int) (0),(int) (0),_clv1._asview().getWidth(),(int) (_titleheight+_dividerheight));
 //BA.debugLineNum = 2816;BA.debugLine="pnlTitle.LoadLayout(\"CellTitle\")";
_pnltitle.LoadLayout("CellTitle",ba);
 //BA.debugLineNum = 2817;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select CAT_GP";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select CAT_GP_CLASIF, SUM(TOTAL) AS TOTAL FROM TOTAL_MARCAS GROUP BY CAT_GP_CLASIF")));
 //BA.debugLineNum = 2818;BA.debugLine="CLV1.Clear";
_clv1._clear();
 //BA.debugLineNum = 2819;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2820;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step9 = 1;
final int limit9 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit9 ;_i = _i + step9 ) {
 //BA.debugLineNum = 2821;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 2822;BA.debugLine="AddTitle(c.GetString(\"CAT_GP_CLASIF\"))";
_addtitle(_c.GetString("CAT_GP_CLASIF"));
 //BA.debugLineNum = 2823;BA.debugLine="If c.GetString(\"CAT_GP_CLASIF\") = \"PROMOS\" Then";
if ((_c.GetString("CAT_GP_CLASIF")).equals("PROMOS")) { 
 //BA.debugLineNum = 2824;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"SELECT SUM";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT SUM(PE_CANT) AS CUANTOS FROM PEDIDO WHERE PE_CEDIS = PE_PROID")));
 //BA.debugLineNum = 2825;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2826;BA.debugLine="CLV1.AddTextItem(\"CANTIDAD DE PROMOS = \" & d.G";
_clv1._addtextitem((Object)("CANTIDAD DE PROMOS = "+_d.GetString("CUANTOS")),(Object)("1"));
 //BA.debugLineNum = 2827;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 2829;BA.debugLine="f=B4XPages.MainPage.skmt.ExecQuery2(\"select CO";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select COUNT(*) AS CUANTOS from HIST_MARCAS_CUOTAS where HMC_MARCA = ?",new String[]{_c.GetString("CAT_GP_CLASIF")})));
 //BA.debugLineNum = 2830;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 2831;BA.debugLine="If f.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_f.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 2832;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery2(\"select H";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select HMC_MARCA, HMC_TOTAL from HIST_MARCAS_CUOTAS where HMC_MARCA = ?",new String[]{_c.GetString("CAT_GP_CLASIF")})));
 //BA.debugLineNum = 2833;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 2834;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT c";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT count(distinct(PE_CLIENTE)) AS CUANTOS FROM PEDIDO WHERE PE_PROID in (select CAT_GP_ID from cat_gunaprod WHERE CAT_GP_CLASIF =?)",new String[]{_c.GetString("CAT_GP_CLASIF")})));
 //BA.debugLineNum = 2835;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2836;BA.debugLine="CLV1.AddTextItem(\"TOTAL  PREVENTA = $\" & c.Ge";
_clv1._addtextitem((Object)("TOTAL  PREVENTA = $"+_c.GetString("TOTAL")),(Object)("1"));
 //BA.debugLineNum = 2837;BA.debugLine="CLV1.AddTextItem(\"M E T A  = $\" & e.GetString";
_clv1._addtextitem((Object)("M E T A  = $"+_e.GetString("HMC_TOTAL")),(Object)("1"));
 //BA.debugLineNum = 2838;BA.debugLine="CLV1.AddTextItem(\"FALTA  = $\" & (e.GetString(";
_clv1._addtextitem((Object)("FALTA  = $"+BA.NumberToString(((double)(Double.parseDouble(_e.GetString("HMC_TOTAL")))-(double)(Double.parseDouble(_c.GetString("TOTAL")))))),(Object)("1"));
 //BA.debugLineNum = 2839;BA.debugLine="CLV1.AddTextItem(\"CLIENTES  = \" & d.GetString";
_clv1._addtextitem((Object)("CLIENTES  = "+_d.GetString("CUANTOS")),(Object)("1"));
 //BA.debugLineNum = 2840;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2841;BA.debugLine="e.Close";
_e.Close();
 }else {
 //BA.debugLineNum = 2843;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT c";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT count(distinct(pe_cliente)) AS CUANTOS FROM PEDIDO WHERE PE_PROID in (select CAT_GP_ID from cat_gunaprod WHERE CAT_GP_CLASIF =?)",new String[]{_c.GetString("CAT_GP_CLASIF")})));
 //BA.debugLineNum = 2844;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2845;BA.debugLine="CLV1.AddTextItem(\"TOTAL  PREVENTA = $\" & c.Ge";
_clv1._addtextitem((Object)("TOTAL  PREVENTA = $"+_c.GetString("TOTAL")),(Object)("1"));
 //BA.debugLineNum = 2846;BA.debugLine="CLV1.AddTextItem(\"M E T A  = $\" & \"1000\",\"1\")";
_clv1._addtextitem((Object)("M E T A  = $"+"1000"),(Object)("1"));
 //BA.debugLineNum = 2847;BA.debugLine="CLV1.AddTextItem(\"FALTA  = $\" & (1000 - c.Get";
_clv1._addtextitem((Object)("FALTA  = $"+BA.NumberToString((1000-(double)(Double.parseDouble(_c.GetString("TOTAL")))))),(Object)("1"));
 //BA.debugLineNum = 2848;BA.debugLine="CLV1.AddTextItem(\"CLIENTES  = \" & d.GetString";
_clv1._addtextitem((Object)("CLIENTES  = "+_d.GetString("CUANTOS")),(Object)("1"));
 //BA.debugLineNum = 2849;BA.debugLine="d.Close";
_d.Close();
 };
 //BA.debugLineNum = 2851;BA.debugLine="f.Close";
_f.Close();
 };
 }
};
 };
 //BA.debugLineNum = 2855;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2856;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select HMC_MA";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select HMC_MARCA,  HMC_TOTAL from HIST_MARCAS_CUOTAS where HMC_MARCA  not in (SELECT  CAT_GP_CLASIF FROM TOTAL_MARCAS )")));
 //BA.debugLineNum = 2857;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2858;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step47 = 1;
final int limit47 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit47 ;_i = _i + step47 ) {
 //BA.debugLineNum = 2859;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 2860;BA.debugLine="AddTitle(c.GetString(\"HMC_MARCA\"))";
_addtitle(_c.GetString("HMC_MARCA"));
 //BA.debugLineNum = 2861;BA.debugLine="CLV1.AddTextItem(\"TOTAL  PREVENTA = $ 0.00\",\"1\"";
_clv1._addtextitem((Object)("TOTAL  PREVENTA = $ 0.00"),(Object)("1"));
 //BA.debugLineNum = 2862;BA.debugLine="CLV1.AddTextItem(\"M E T A  = $\" & C.GetString(\"";
_clv1._addtextitem((Object)("M E T A  = $"+_c.GetString("HMC_TOTAL")),(Object)("1"));
 //BA.debugLineNum = 2863;BA.debugLine="CLV1.AddTextItem(\"CLIENTES  = 0\",\"1\")";
_clv1._addtextitem((Object)("CLIENTES  = 0"),(Object)("1"));
 }
};
 };
 //BA.debugLineNum = 2866;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2869;BA.debugLine="End Sub";
return "";
}
public String  _b_ok_comiss_click() throws Exception{
 //BA.debugLineNum = 2775;BA.debugLine="Sub B_OK_COMISS_Click";
 //BA.debugLineNum = 2776;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2777;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2778;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2779;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2780;BA.debugLine="P_RESUMEN.Visible=False";
_p_resumen.setVisible(__c.False);
 //BA.debugLineNum = 2781;BA.debugLine="Panel_C.Visible = False";
_panel_c.setVisible(__c.False);
 //BA.debugLineNum = 2782;BA.debugLine="SCROLL_RESDIA.Visible = False";
_scroll_resdia.setVisible(__c.False);
 //BA.debugLineNum = 2783;BA.debugLine="Btn_Ubicar.Visible=True";
_btn_ubicar.setVisible(__c.True);
 //BA.debugLineNum = 2784;BA.debugLine="End Sub";
return "";
}
public String  _b_ok_panel5_click() throws Exception{
 //BA.debugLineNum = 2881;BA.debugLine="Sub B_OK_PANEL5_Click";
 //BA.debugLineNum = 2882;BA.debugLine="Panel5.Visible = False";
_panel5.setVisible(__c.False);
 //BA.debugLineNum = 2883;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2884;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2885;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2886;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2887;BA.debugLine="P_RESUMEN.Visible=False";
_p_resumen.setVisible(__c.False);
 //BA.debugLineNum = 2888;BA.debugLine="Panel4.Visible=False";
_panel4.setVisible(__c.False);
 //BA.debugLineNum = 2889;BA.debugLine="SCROLL_RESDIA.Visible = False";
_scroll_resdia.setVisible(__c.False);
 //BA.debugLineNum = 2890;BA.debugLine="Btn_Ubicar.Visible=True";
_btn_ubicar.setVisible(__c.True);
 //BA.debugLineNum = 2891;BA.debugLine="p_principal.Visible = True";
_p_principal.setVisible(__c.True);
 //BA.debugLineNum = 2893;BA.debugLine="End Sub";
return "";
}
public String  _b_ok_pas_click() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _c12 = null;
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _c13 = null;
 //BA.debugLineNum = 2295;BA.debugLine="Sub B_OK_PAS_Click";
 //BA.debugLineNum = 2296;BA.debugLine="If CARGA = \"SUBIR\" And S_CP.Text = \"INFO OK\" Then";
if ((_carga).equals("SUBIR") && (_s_cp.getText()).equals("INFO OK")) { 
 //BA.debugLineNum = 2297;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 2298;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 //BA.debugLineNum = 2299;BA.debugLine="Btn_Ubicar.Visible=True";
_btn_ubicar.setVisible(__c.True);
 //BA.debugLineNum = 2301;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2302;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2303;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2304;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2305;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2306;BA.debugLine="Subs.panelVisible(p_principal, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_principal,(int) (0),(int) (0));
 }else if((_carga).equals("SUBIR") && (_s_cp.getText()).equals("ERROR")) { 
 //BA.debugLineNum = 2308;BA.debugLine="Msgbox(\"Tiene que subir de nuevo la información\"";
__c.Msgbox(BA.ObjectToCharSequence("Tiene que subir de nuevo la información"),BA.ObjectToCharSequence("Atención"),ba);
 //BA.debugLineNum = 2309;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 2310;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 //BA.debugLineNum = 2312;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2313;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2314;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2315;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2316;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2317;BA.debugLine="Subs.panelVisible(p_principal, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_principal,(int) (0),(int) (0));
 }else if((_carga).equals("SUBIR") && (_s_cp.getText()).equals("INFO OK") == false) { 
 //BA.debugLineNum = 2319;BA.debugLine="RES =  Msgbox2(\"Seguro que desea abortar el proc";
_res = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea abortar el proceso"),BA.ObjectToCharSequence("Cierre"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
 //BA.debugLineNum = 2320;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 2321;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 2323;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2324;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2325;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2326;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2327;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2328;BA.debugLine="Subs.panelVisible(p_principal, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_principal,(int) (0),(int) (0));
 //BA.debugLineNum = 2329;BA.debugLine="ExitApplication";
__c.ExitApplication();
 };
 };
 //BA.debugLineNum = 2332;BA.debugLine="If CARGA = \"CARGAR\" And S_CP.Text = \"LISTO\" And S";
if ((_carga).equals("CARGAR") && (_s_cp.getText()).equals("LISTO") && (_s_cc.getText()).equals("LISTO") && (_s_ch.getText()).equals("LISTO")) { 
 //BA.debugLineNum = 2333;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 2334;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 //BA.debugLineNum = 2335;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 //BA.debugLineNum = 2336;BA.debugLine="Btn_Ubicar.Visible=True";
_btn_ubicar.setVisible(__c.True);
 //BA.debugLineNum = 2338;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2339;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2340;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2341;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2342;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2343;BA.debugLine="Subs.panelVisible(p_principal, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_principal,(int) (0),(int) (0));
 //BA.debugLineNum = 2344;BA.debugLine="If E_RUTA2.Text <> \"\" Then";
if ((_e_ruta2.getText()).equals("") == false) { 
 //BA.debugLineNum = 2346;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO RUTA_SUPLENCIA(RS_RUTA) VALUES(?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_e_ruta2.getText()}));
 };
 //BA.debugLineNum = 2348;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO RUTAA(RUTAA) VALUES(?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_e_ruta.getText()}));
 //BA.debugLineNum = 2349;BA.debugLine="checaPedido";
_checapedido();
 //BA.debugLineNum = 2351;BA.debugLine="Dim c12  As Cursor = Starter.skmt.ExecQuery(\"Sel";
_c12 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c12 = (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  PE_PRONOMBRE, PE_PROID, PE_CANT FROM PEDIDO WHERE PE_FOLIO = 'PREVENTA'")));
 //BA.debugLineNum = 2352;BA.debugLine="If c12.RowCount > 0 Then";
if (_c12.getRowCount()>0) { 
 //BA.debugLineNum = 2353;BA.debugLine="For i = 0 To c12.RowCount - 1";
{
final int step52 = 1;
final int limit52 = (int) (_c12.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit52 ;_i = _i + step52 ) {
 //BA.debugLineNum = 2354;BA.debugLine="c12.Position = i";
_c12.setPosition(_i);
 //BA.debugLineNum = 2355;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE CAT_GUNAPRO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE CAT_GUNAPROD SET CAT_GP_ALMACEN = CAT_GP_ALMACEN - "+__c.SmartStringFormatter("",(Object)(_c12.GetString("PE_CANT")))+"  WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_c12.GetString("PE_PROID")))+"'"));
 }
};
 };
 //BA.debugLineNum = 2358;BA.debugLine="c12.Close";
_c12.Close();
 //BA.debugLineNum = 2360;BA.debugLine="Dim c13  As Cursor = Starter.skmt.ExecQuery(\"Sel";
_c13 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_c13 = (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  PE_PRONOMBRE, PE_PROID, PE_CANT FROM PEDIDO WHERE PE_FOLIO = 'VENTA'")));
 //BA.debugLineNum = 2361;BA.debugLine="If c13.RowCount > 0 Then";
if (_c13.getRowCount()>0) { 
 //BA.debugLineNum = 2362;BA.debugLine="For i = 0 To c13.RowCount - 1";
{
final int step60 = 1;
final int limit60 = (int) (_c13.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit60 ;_i = _i + step60 ) {
 //BA.debugLineNum = 2363;BA.debugLine="c13.Position = i";
_c13.setPosition(_i);
 //BA.debugLineNum = 2364;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE CAT_GUNAPRO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("UPDATE CAT_GUNAPROD2 SET CAT_GP_ALMACEN = CAT_GP_ALMACEN - "+__c.SmartStringFormatter("",(Object)(_c13.GetString("PE_CANT")))+"  WHERE CAT_GP_ID = '"+__c.SmartStringFormatter("",(Object)(_c13.GetString("PE_PROID")))+"'"));
 }
};
 };
 //BA.debugLineNum = 2367;BA.debugLine="c13.Close";
_c13.Close();
 //BA.debugLineNum = 2369;BA.debugLine="If E_RUTA2.Visible = True Then";
if (_e_ruta2.getVisible()==__c.True) { 
 //BA.debugLineNum = 2370;BA.debugLine="bitacora.mandaBitacora(Subs.fechanormal(DateTim";
_bitacora._mandabitacora /*String*/ (_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_usuario,_subs._traealmacen /*String*/ (ba),_subs._traerutabitacora /*String*/ (ba),"Carga día suplencia","",_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),"","","2","","");
 }else {
 //BA.debugLineNum = 2372;BA.debugLine="bitacora.mandaBitacora(Subs.fechanormal(DateTim";
_bitacora._mandabitacora /*String*/ (_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_usuario,_subs._traealmacen /*String*/ (ba),_subs._traerutabitacora /*String*/ (ba),"Carga día","",_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),"","","2","","");
 };
 //BA.debugLineNum = 2375;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 }else if((_carga).equals("CARGAR") && ((_s_cp.getText()).equals("LISTO") == false || (_s_cc.getText()).equals("LISTO") == false || (_s_ch.getText()).equals("LISTO") == false)) { 
 //BA.debugLineNum = 2377;BA.debugLine="RES =  Msgbox2(\"Seguro que desea abortar el proc";
_res = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea abortar el proceso"),BA.ObjectToCharSequence("Cierre"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
 //BA.debugLineNum = 2378;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 2379;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 2380;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 //BA.debugLineNum = 2382;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2383;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2384;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2385;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2386;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2387;BA.debugLine="Subs.panelVisible(p_principal, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_principal,(int) (0),(int) (0));
 //BA.debugLineNum = 2388;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2389;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 2390;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 2391;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2392;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod2");
 //BA.debugLineNum = 2393;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2394;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 2395;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 2396;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_PROMOS");
 //BA.debugLineNum = 2397;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_CLIENTE_CANT_PROMOS");
 //BA.debugLineNum = 2398;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROMOS_COMP");
 //BA.debugLineNum = 2399;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_VERIFICACION");
 //BA.debugLineNum = 2400;BA.debugLine="ExitApplication";
__c.ExitApplication();
 };
 };
 //BA.debugLineNum = 2403;BA.debugLine="End Sub";
return "";
}
public String  _b_ok_res_click() throws Exception{
 //BA.debugLineNum = 2409;BA.debugLine="Sub B_OK_RES_Click";
 //BA.debugLineNum = 2411;BA.debugLine="NUEVO.Visible =True";
_nuevo.setVisible(__c.True);
 //BA.debugLineNum = 2412;BA.debugLine="BUSCA.Visible=True";
_busca.setVisible(__c.True);
 //BA.debugLineNum = 2413;BA.debugLine="connecta.Visible=True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2414;BA.debugLine="Resumen.Visible= True";
_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2415;BA.debugLine="P_RESUMEN.Visible=False";
_p_resumen.setVisible(__c.False);
 //BA.debugLineNum = 2416;BA.debugLine="Panel4.Visible = False";
_panel4.setVisible(__c.False);
 //BA.debugLineNum = 2417;BA.debugLine="SCROLL_RESDIA.Visible = False";
_scroll_resdia.setVisible(__c.False);
 //BA.debugLineNum = 2418;BA.debugLine="Btn_Ubicar.Visible=True";
_btn_ubicar.setVisible(__c.True);
 //BA.debugLineNum = 2419;BA.debugLine="p_principal.Visible = True";
_p_principal.setVisible(__c.True);
 //BA.debugLineNum = 2420;BA.debugLine="End Sub";
return "";
}
public String  _b_regresar_click() throws Exception{
 //BA.debugLineNum = 2720;BA.debugLine="Private Sub b_regresar_Click";
 //BA.debugLineNum = 2721;BA.debugLine="p_pedidos.Visible = False";
_p_pedidos.setVisible(__c.False);
 //BA.debugLineNum = 2722;BA.debugLine="SCROLL_RESDIA.Panel.Height = Panel4.Height";
_scroll_resdia.getPanel().setHeight(_panel4.getHeight());
 //BA.debugLineNum = 2723;BA.debugLine="End Sub";
return "";
}
public String  _b_regreso_click() throws Exception{
 //BA.debugLineNum = 2771;BA.debugLine="Private Sub b_regreso_Click";
 //BA.debugLineNum = 2772;BA.debugLine="p_prod.Visible = False";
_p_prod.setVisible(__c.False);
 //BA.debugLineNum = 2773;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
 //BA.debugLineNum = 376;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 378;BA.debugLine="rd.respaldaPedido";
_rd._respaldapedido /*String*/ ();
 //BA.debugLineNum = 379;BA.debugLine="rd.respaldaInventarios";
_rd._respaldainventarios /*String*/ ();
 //BA.debugLineNum = 380;BA.debugLine="rd.respaldaPaquetes";
_rd._respaldapaquetes /*String*/ ();
 //BA.debugLineNum = 381;BA.debugLine="HORAINGRESO =\"000000\"";
_horaingreso = "000000";
 //BA.debugLineNum = 382;BA.debugLine="Btn_Ubicar.Left = (Root.Width/2) - (Btn_Ubicar.Wi";
_btn_ubicar.setLeft((int) ((_root.getWidth()/(double)2)-(_btn_ubicar.getWidth()/(double)2)));
 //BA.debugLineNum = 383;BA.debugLine="reqManager.Initialize(Me, Starter.DBReqServer)";
_reqmanager._initialize /*String*/ (ba,this,_starter._dbreqserver /*String*/ );
 //BA.debugLineNum = 385;BA.debugLine="PASO =0";
_paso = BA.NumberToString(0);
 //BA.debugLineNum = 386;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 387;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessageS";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);};
 //BA.debugLineNum = 388;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
 //BA.debugLineNum = 390;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"select count";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(*) as CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"FECHA"})));
 //BA.debugLineNum = 391;BA.debugLine="c.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 392;BA.debugLine="If c.GetString(\"CUANTOS\") = 0 Then";
if ((_c.GetString("CUANTOS")).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 393;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 394;BA.debugLine="cmd.Name = \"select_fecha\"";
_cmd.Name /*String*/  = "select_fecha";
 //BA.debugLineNum = 395;BA.debugLine="Log( Starter.DBReqServer)";
__c.LogImpl("72359315",_starter._dbreqserver /*String*/ ,0);
 //BA.debugLineNum = 396;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fecha\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("fecha"));
 //BA.debugLineNum = 397;BA.debugLine="Msgbox(\"AJUSTAR FECHA\",\"AVISO\") 'ignore";
__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR FECHA"),BA.ObjectToCharSequence("AVISO"),ba);
 //BA.debugLineNum = 398;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 }else {
 //BA.debugLineNum = 400;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"select CAT_";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",new String[]{"FECHA"})));
 //BA.debugLineNum = 401;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 402;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 403;BA.debugLine="DateTime.DateFormat = \"yyyyMMdd\"";
__c.DateTime.setDateFormat("yyyyMMdd");
 //BA.debugLineNum = 404;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 405;BA.debugLine="If c.GetString(\"CAT_VA_VALOR\") > sDate Then";
if ((double)(Double.parseDouble(_c.GetString("CAT_VA_VALOR")))>(double)(Double.parseDouble(_sdate))) { 
 //BA.debugLineNum = 406;BA.debugLine="Msgbox(\"AJUSTAR LA FECHA YA QUE ES MENOR AL SIS";
__c.Msgbox(BA.ObjectToCharSequence("AJUSTAR LA FECHA YA QUE ES MENOR AL SISTEMA"),BA.ObjectToCharSequence("AVISO"),ba);
 //BA.debugLineNum = 407;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 408;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 };
 //BA.debugLineNum = 410;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 412;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 413;BA.debugLine="If EJECUTANDO =0 Then";
if ((_ejecutando).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 414;BA.debugLine="Listo1 = 0";
_listo1 = BA.NumberToString(0);
 //BA.debugLineNum = 415;BA.debugLine="Listo2 = 0";
_listo2 = BA.NumberToString(0);
 //BA.debugLineNum = 416;BA.debugLine="Listo3 = 0";
_listo3 = BA.NumberToString(0);
 //BA.debugLineNum = 417;BA.debugLine="Listo4 = 0";
_listo4 = BA.NumberToString(0);
 //BA.debugLineNum = 418;BA.debugLine="Listo5 = 0";
_listo5 = BA.NumberToString(0);
 //BA.debugLineNum = 419;BA.debugLine="inve = 0";
_inve = BA.NumberToString(0);
 //BA.debugLineNum = 420;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 };
 //BA.debugLineNum = 422;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 423;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 424;BA.debugLine="b=B4XPages.MainPage.skmt.ExecQuery(\"Select count(";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select count(*) as CUANTOS from pedido_cliente WHERE PC_CLIENTE <> 0  AND PC_CLIENTE <> 1")));
 //BA.debugLineNum = 425;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 426;BA.debugLine="Cuantos = b.GetString(\"CUANTOS\")";
_cuantos = _b.GetString("CUANTOS");
 //BA.debugLineNum = 427;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 429;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0")));
 //BA.debugLineNum = 430;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 431;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as POR_VISITAR from kmt_info WHERE CAT_CL_CODIGO <>0 OR CAT_CL_CODIGO <>1 ")));
 //BA.debugLineNum = 432;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 433;BA.debugLine="f=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CAT_CL_RUTA from kmt_info WHERE CAT_CL_CODIGO <>0 OR CAT_CL_CODIGO <>1 ")));
 //BA.debugLineNum = 434;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 435;BA.debugLine="l_ruta.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 //BA.debugLineNum = 436;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 437;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 438;BA.debugLine="l_ruta.Text =0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 }else {
 //BA.debugLineNum = 440;BA.debugLine="f=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info")));
 //BA.debugLineNum = 441;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 442;BA.debugLine="l_ruta.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 //BA.debugLineNum = 443;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 445;BA.debugLine="If Cuantos  = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 446;BA.debugLine="L_MONTOD.Text =0";
_l_montod.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 447;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 448;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 449;BA.debugLine="L_CUANTOST.Text = 0";
_l_cuantost.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 450;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 451;BA.debugLine="l_drop.Text = 0";
_l_drop.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 452;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 453;BA.debugLine="l_efectiva.text =0";
_l_efectiva.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 454;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 455;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 //BA.debugLineNum = 456;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 457;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 458;BA.debugLine="b=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS from noventa")));
 //BA.debugLineNum = 459;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 460;BA.debugLine="l_cuantosn.Text = b.GetString(\"CUANTOS\")";
_l_cuantosn.setText(BA.ObjectToCharSequence(_b.GetString("CUANTOS")));
 //BA.debugLineNum = 461;BA.debugLine="b.close";
_b.Close();
 }else {
 //BA.debugLineNum = 463;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  SUM(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  SUM(PE_COSTO_TOT) as MONTO_DIA, COUNT(DISTINCT(PE_CLIENTE)) AS CLIENTES_DIA  from PEDIDO WHERE PE_CLIENTE <> 0")));
 //BA.debugLineNum = 464;BA.debugLine="b=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS from noventa")));
 //BA.debugLineNum = 465;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 466;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 467;BA.debugLine="L_MONTOD.Text = c.GetString(\"MONTO_DIA\")";
_l_montod.setText(BA.ObjectToCharSequence(_c.GetString("MONTO_DIA")));
 //BA.debugLineNum = 468;BA.debugLine="l_cuantosc.Text = c.GetString(\"CLIENTES_DIA\")";
_l_cuantosc.setText(BA.ObjectToCharSequence(_c.GetString("CLIENTES_DIA")));
 //BA.debugLineNum = 469;BA.debugLine="D2=B4XPages.MainPage.skmt.ExecQuery(\"select  COU";
_d2 = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  COUNT(*) AS CUANTOS   from PEDIDO ")));
 //BA.debugLineNum = 470;BA.debugLine="D2.Position = 0";
_d2.setPosition((int) (0));
 //BA.debugLineNum = 471;BA.debugLine="LPT = D2.GetString(\"CUANTOS\") / l_cuantosc.Text";
_lpt = BA.NumberToString((double)(Double.parseDouble(_d2.GetString("CUANTOS")))/(double)(double)(Double.parseDouble(_l_cuantosc.getText())));
 //BA.debugLineNum = 472;BA.debugLine="D2.Close";
_d2.Close();
 //BA.debugLineNum = 473;BA.debugLine="l_cuantosn.Text = b.GetString(\"CUANTOS\")";
_l_cuantosn.setText(BA.ObjectToCharSequence(_b.GetString("CUANTOS")));
 //BA.debugLineNum = 474;BA.debugLine="efectiva = c.GetString(\"CLIENTES_DIA\") / e.GetSt";
_efectiva = (double)(Double.parseDouble(_c.GetString("CLIENTES_DIA")))/(double)(double)(Double.parseDouble(_e.GetString("POR_VISITAR")));
 //BA.debugLineNum = 475;BA.debugLine="l_efectiva.text = Round2(efectiva*100,2)";
_l_efectiva.setText(BA.ObjectToCharSequence(__c.Round2(_efectiva*100,(int) (2))));
 //BA.debugLineNum = 476;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 477;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 478;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 //BA.debugLineNum = 479;BA.debugLine="L_CUANTOST.Text = l_cuantosc.Text + l_cuantosn.T";
_l_cuantost.setText(BA.ObjectToCharSequence((double)(Double.parseDouble(_l_cuantosc.getText()))+(double)(Double.parseDouble(_l_cuantosn.getText()))));
 //BA.debugLineNum = 480;BA.debugLine="drop = L_CUANTOST.Text / l_porvisitar.Text";
_drop = (double)(Double.parseDouble(_l_cuantost.getText()))/(double)(double)(Double.parseDouble(_l_porvisitar.getText()));
 //BA.debugLineNum = 481;BA.debugLine="l_drop.Text = Round(drop * 100)";
_l_drop.setText(BA.ObjectToCharSequence(__c.Round(_drop*100)));
 //BA.debugLineNum = 482;BA.debugLine="If L_CUANTOST.Text < 40 Then";
if ((double)(Double.parseDouble(_l_cuantost.getText()))<40) { 
 //BA.debugLineNum = 483;BA.debugLine="ImageView3.Bitmap = LoadBitmap(File.DirAssets,";
_imageview3.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"tache_rojo.png").getObject()));
 }else if((double)(Double.parseDouble(_l_cuantost.getText()))>=40 && (double)(Double.parseDouble(_l_cuantost.getText()))<50) { 
 //BA.debugLineNum = 485;BA.debugLine="ImageView3.bitmap = LoadBitmap(File.DirAssets,";
_imageview3.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alerta_amarilla.png").getObject()));
 }else {
 //BA.debugLineNum = 487;BA.debugLine="ImageView3.Bitmap = LoadBitmap(File.DirAssets,";
_imageview3.setBitmap((android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"palomita_verde.png").getObject()));
 };
 //BA.debugLineNum = 497;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 498;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 500;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 501;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 502;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 503;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select ID_ALM";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 504;BA.debugLine="C.Position =0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 505;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 //BA.debugLineNum = 506;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 507;BA.debugLine="bu.Initialize";
_bu._initialize /*String*/ (ba);
 //BA.debugLineNum = 508;BA.debugLine="batterystatus = bu.BatteryInformation";
_batterystatus = _bu._getbatteryinformation /*int[]*/ ();
 //BA.debugLineNum = 509;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
 //BA.debugLineNum = 510;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 511;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 512;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 513;BA.debugLine="B4XPages.MainPage.batt = batterystatus(0)";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._batt /*int*/  = _batterystatus[(int) (0)];
 //BA.debugLineNum = 514;BA.debugLine="B4XPages.MainPage.montoActual = L_MONTOD.Text";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._montoactual /*String*/  = _l_montod.getText();
 //BA.debugLineNum = 515;BA.debugLine="B4XPages.MainPage.clientestotal = L_CUANTOST.Text";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._clientestotal /*String*/  = _l_cuantost.getText();
 //BA.debugLineNum = 516;BA.debugLine="B4XPages.MainPage.clientesventa =  l_cuantosc.Tex";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._clientesventa /*String*/  = _l_cuantosc.getText();
 //BA.debugLineNum = 517;BA.debugLine="B4XPages.MainPage.clientesvisitados = l_porvisita";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._clientesvisitados /*String*/  = _l_porvisitar.getText();
 //BA.debugLineNum = 518;BA.debugLine="B4XPages.MainPage.ALMACEN = ALMACEN";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._almacen /*String*/  = _almacen;
 //BA.debugLineNum = 519;BA.debugLine="B4XPages.MainPage.rutapreventa =  l_ruta.text";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._rutapreventa /*String*/  = _l_ruta.getText();
 //BA.debugLineNum = 521;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
 //BA.debugLineNum = 522;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 523;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 524;BA.debugLine="B4XPages.MainPage.usuario = usuario";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._usuario /*String*/  = _usuario;
 //BA.debugLineNum = 525;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 527;BA.debugLine="CallSub(Starter, \"ENVIA_ULTIMA_GPS\")";
__c.CallSubNew(ba,(Object)(_starter.getObject()),"ENVIA_ULTIMA_GPS");
 //BA.debugLineNum = 528;BA.debugLine="s = B4XPages.MainPage.skmt.ExecQuery(\"select RS_R";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select RS_RUTA FROM RUTA_SUPLENCIA")));
 //BA.debugLineNum = 529;BA.debugLine="s.Position = 0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 530;BA.debugLine="If s.RowCount = 0 Then";
if (_s.getRowCount()==0) { 
 //BA.debugLineNum = 531;BA.debugLine="Label22.Visible = False";
_label22.setVisible(__c.False);
 //BA.debugLineNum = 532;BA.debugLine="l_rutasuplencia.Visible = False";
_l_rutasuplencia.setVisible(__c.False);
 //BA.debugLineNum = 533;BA.debugLine="l_rutasuplencia.Text = \"\"";
_l_rutasuplencia.setText(BA.ObjectToCharSequence(""));
 }else if(_s.getRowCount()>0) { 
 //BA.debugLineNum = 535;BA.debugLine="Label22.Visible = True";
_label22.setVisible(__c.True);
 //BA.debugLineNum = 536;BA.debugLine="l_rutasuplencia.Visible = True";
_l_rutasuplencia.setVisible(__c.True);
 //BA.debugLineNum = 537;BA.debugLine="l_rutasuplencia.Text = s.GetString(\"RS_RUTA\")";
_l_rutasuplencia.setText(BA.ObjectToCharSequence(_s.GetString("RS_RUTA")));
 };
 //BA.debugLineNum = 539;BA.debugLine="s.Close";
_s.Close();
 //BA.debugLineNum = 540;BA.debugLine="s = B4XPages.MainPage.skmt.ExecQuery(\"select RUTA";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select RUTAA FROM RUTAA")));
 //BA.debugLineNum = 541;BA.debugLine="s.Position = 0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 542;BA.debugLine="If s.RowCount = 0 Then";
if (_s.getRowCount()==0) { 
 //BA.debugLineNum = 543;BA.debugLine="l_ruta.Text = 0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 }else if(_s.getRowCount()>0) { 
 //BA.debugLineNum = 545;BA.debugLine="l_ruta.Text = s.GetString(\"RUTAA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_s.GetString("RUTAA")));
 };
 //BA.debugLineNum = 547;BA.debugLine="If l_ruta.Text = \"0\" Then";
if ((_l_ruta.getText()).equals("0")) { 
 //BA.debugLineNum = 548;BA.debugLine="p_abordo.Visible = False";
_p_abordo.setVisible(__c.False);
 //BA.debugLineNum = 549;BA.debugLine="p_productos.Visible= False";
_p_productos.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 551;BA.debugLine="p_abordo.Visible = False";
_p_abordo.setVisible(__c.False);
 //BA.debugLineNum = 552;BA.debugLine="p_productos.Visible = False";
_p_productos.setVisible(__c.False);
 };
 //BA.debugLineNum = 563;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(medicomed.keymon.com.mx.c_principal parent) {
this.parent = parent;
}
medicomed.keymon.com.mx.c_principal 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 = 2073;BA.debugLine="If SCROLL_RESDIA.Visible Then";
if (true) break;

case 1:
//if
this.state = 10;
if (parent._scroll_resdia.getVisible()) { 
this.state = 3;
}else if(parent._p_prod.getVisible()) { 
this.state = 5;
}else if(parent._panel5.getVisible()) { 
this.state = 7;
}else {
this.state = 9;
}if (true) break;

case 3:
//C
this.state = 10;
 //BA.debugLineNum = 2074;BA.debugLine="SCROLL_RESDIA.Visible = False";
parent._scroll_resdia.setVisible(parent.__c.False);
 //BA.debugLineNum = 2075;BA.debugLine="B_OK_RES_Click";
parent._b_ok_res_click();
 //BA.debugLineNum = 2076;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 5:
//C
this.state = 10;
 //BA.debugLineNum = 2078;BA.debugLine="p_prod.Visible = False";
parent._p_prod.setVisible(parent.__c.False);
 //BA.debugLineNum = 2081;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 7:
//C
this.state = 10;
 //BA.debugLineNum = 2083;BA.debugLine="B_OK_PANEL5_Click";
parent._b_ok_panel5_click();
 //BA.debugLineNum = 2084;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 2086;BA.debugLine="B4XPages.ShowPage(\"login\")";
parent._b4xpages._showpage /*String*/ (ba,"login");
 if (true) break;

case 10:
//C
this.state = -1;
;
 //BA.debugLineNum = 2088;BA.debugLine="Return False";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.False));return;};
 //BA.debugLineNum = 2089;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
String _ruta = "";
 //BA.debugLineNum = 242;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 243;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 244;BA.debugLine="bitacora.Initialize(\"bitacora\", \"bitacora\", Root,";
_bitacora._initialize /*Object*/ (ba,(Object)("bitacora"),"bitacora",_root,_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ ,_starter._reqmanager /*medicomed.keymon.com.mx.dbrequestmanager*/ );
 //BA.debugLineNum = 246;BA.debugLine="Root.LoadLayout(\"principal\")";
_root.LoadLayout("principal",ba);
 //BA.debugLineNum = 247;BA.debugLine="rd.Initialize";
_rd._initialize /*Object*/ (ba);
 //BA.debugLineNum = 248;BA.debugLine="rd.vacuum";
_rd._vacuum /*String*/ ();
 //BA.debugLineNum = 249;BA.debugLine="EJECUTANDO=1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 250;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 251;BA.debugLine="img2.Visible =False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 252;BA.debugLine="ruta = File.DirInternal";
_ruta = __c.File.getDirInternal();
 //BA.debugLineNum = 253;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(_ruta,"kmt.db")==__c.False) { 
 //BA.debugLineNum = 254;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",_ruta,"kmt.db");
 };
 //BA.debugLineNum = 256;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 257;BA.debugLine="fecha=DateTime.Date(DateTime.Now)";
_fecha = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 258;BA.debugLine="B4XPages.MainPage.skmt.Initialize(ruta,\"kmt.db\",";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .Initialize(_ruta,"kmt.db",__c.True);
 //BA.debugLineNum = 259;BA.debugLine="b=B4XPages.MainPage.skmt.ExecQuery(\"Select count(";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select count(*) as CUANTOS from pedido_cliente")));
 //BA.debugLineNum = 260;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 261;BA.debugLine="Cuantos = b.GetString(\"CUANTOS\")";
_cuantos = _b.GetString("CUANTOS");
 //BA.debugLineNum = 262;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 263;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as TOTAL_VISITAR from kmt_info where gestion = 0")));
 //BA.debugLineNum = 264;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 265;BA.debugLine="e=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_e = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as POR_VISITAR from kmt_info")));
 //BA.debugLineNum = 266;BA.debugLine="e.Position=0";
_e.setPosition((int) (0));
 //BA.debugLineNum = 267;BA.debugLine="f=B4XPages.MainPage.skmt.ExecQuery(\"select count(";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CAT_CL_RUTA from kmt_info")));
 //BA.debugLineNum = 268;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 269;BA.debugLine="l_ruta.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 //BA.debugLineNum = 270;BA.debugLine="f.Close";
_f.Close();
 //BA.debugLineNum = 271;BA.debugLine="If l_ruta.Text = 0 Then";
if ((_l_ruta.getText()).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 272;BA.debugLine="l_ruta.Text =0";
_l_ruta.setText(BA.ObjectToCharSequence(0));
 }else {
 //BA.debugLineNum = 274;BA.debugLine="f=B4XPages.MainPage.skmt.ExecQuery(\"select CAT_C";
_f = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA from kmt_info")));
 //BA.debugLineNum = 275;BA.debugLine="f.Position=0";
_f.setPosition((int) (0));
 //BA.debugLineNum = 276;BA.debugLine="l_ruta.Text = f.GetString(\"CAT_CL_RUTA\")";
_l_ruta.setText(BA.ObjectToCharSequence(_f.GetString("CAT_CL_RUTA")));
 //BA.debugLineNum = 277;BA.debugLine="f.Close";
_f.Close();
 };
 //BA.debugLineNum = 279;BA.debugLine="If Cuantos  = 0 Then";
if ((_cuantos).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 280;BA.debugLine="L_MONTOD.Text =0";
_l_montod.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 281;BA.debugLine="l_cuantosc.Text = 0";
_l_cuantosc.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 282;BA.debugLine="l_cuantosn.Text = 0";
_l_cuantosn.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 283;BA.debugLine="drop = 0";
_drop = 0;
 //BA.debugLineNum = 284;BA.debugLine="l_drop.Text = 0";
_l_drop.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 285;BA.debugLine="efectiva = 0";
_efectiva = 0;
 //BA.debugLineNum = 286;BA.debugLine="l_efectiva.text =0";
_l_efectiva.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 287;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 288;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 }else {
 //BA.debugLineNum = 290;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select  sum(pc_monto) as MONTO_DIA, count(pc_cliente) AS CLIENTES_DIA  from pedido_cliente where PC_CLIENTE <> 0 AND PC_CLIENTE <> 1")));
 //BA.debugLineNum = 291;BA.debugLine="b=B4XPages.MainPage.skmt.ExecQuery(\"select count";
_b = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select count(*) as CUANTOS from noventa")));
 //BA.debugLineNum = 293;BA.debugLine="c.Position=0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 294;BA.debugLine="b.Position=0";
_b.setPosition((int) (0));
 //BA.debugLineNum = 295;BA.debugLine="L_MONTOD.Text = c.GetString(\"MONTO_DIA\")";
_l_montod.setText(BA.ObjectToCharSequence(_c.GetString("MONTO_DIA")));
 //BA.debugLineNum = 296;BA.debugLine="l_cuantosc.Text = c.GetString(\"CLIENTES_DIA\")";
_l_cuantosc.setText(BA.ObjectToCharSequence(_c.GetString("CLIENTES_DIA")));
 //BA.debugLineNum = 297;BA.debugLine="l_cuantosn.Text = b.GetString(\"CUANTOS\")";
_l_cuantosn.setText(BA.ObjectToCharSequence(_b.GetString("CUANTOS")));
 //BA.debugLineNum = 299;BA.debugLine="l_drop.Text = Round2(drop,2)";
_l_drop.setText(BA.ObjectToCharSequence(__c.Round2(_drop,(int) (2))));
 //BA.debugLineNum = 300;BA.debugLine="efectiva = c.GetString(\"CLIENTES_DIA\") / e.GetSt";
_efectiva = (double)(Double.parseDouble(_c.GetString("CLIENTES_DIA")))/(double)(double)(Double.parseDouble(_e.GetString("POR_VISITAR")));
 //BA.debugLineNum = 301;BA.debugLine="l_efectiva.text = Round2(efectiva*100,2)";
_l_efectiva.setText(BA.ObjectToCharSequence(__c.Round2(_efectiva*100,(int) (2))));
 //BA.debugLineNum = 302;BA.debugLine="l_ctast.Text = d.GetString(\"TOTAL_VISITAR\")";
_l_ctast.setText(BA.ObjectToCharSequence(_d.GetString("TOTAL_VISITAR")));
 //BA.debugLineNum = 303;BA.debugLine="l_porvisitar.Text = e.GetString(\"POR_VISITAR\")";
_l_porvisitar.setText(BA.ObjectToCharSequence(_e.GetString("POR_VISITAR")));
 //BA.debugLineNum = 304;BA.debugLine="b.Close";
_b.Close();
 //BA.debugLineNum = 305;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 307;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 308;BA.debugLine="e.Close";
_e.Close();
 //BA.debugLineNum = 310;BA.debugLine="s = B4XPages.MainPage.skmt.ExecQuery(\"select RS_R";
_s = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select RS_RUTA FROM RUTA_SUPLENCIA")));
 //BA.debugLineNum = 311;BA.debugLine="s.Position = 0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 312;BA.debugLine="If s.RowCount = 0 Then";
if (_s.getRowCount()==0) { 
 //BA.debugLineNum = 313;BA.debugLine="Label22.Visible = False";
_label22.setVisible(__c.False);
 //BA.debugLineNum = 314;BA.debugLine="l_rutasuplencia.Visible = False";
_l_rutasuplencia.setVisible(__c.False);
 }else if(_s.getRowCount()>0) { 
 //BA.debugLineNum = 316;BA.debugLine="Label22.Visible = True";
_label22.setVisible(__c.True);
 //BA.debugLineNum = 317;BA.debugLine="l_rutasuplencia.Visible = True";
_l_rutasuplencia.setVisible(__c.True);
 //BA.debugLineNum = 318;BA.debugLine="l_rutasuplencia.Text = s.GetString(\"RS_RUTA\")";
_l_rutasuplencia.setText(BA.ObjectToCharSequence(_s.GetString("RS_RUTA")));
 };
 //BA.debugLineNum = 320;BA.debugLine="Starter.Skmt.ExecNonQuery($\"create table if not e";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("create table if not exists kmt_info ("+__c.SmartStringFormatter("",(Object)(_gettablecolumnlist(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ ,"kmt_info")))+")"));
 //BA.debugLineNum = 321;BA.debugLine="End Sub";
return "";
}
public void  _btn_ubicar_click() throws Exception{
ResumableSub_Btn_Ubicar_Click rsub = new ResumableSub_Btn_Ubicar_Click(this);
rsub.resume(ba, null);
}
public static class ResumableSub_Btn_Ubicar_Click extends BA.ResumableSub {
public ResumableSub_Btn_Ubicar_Click(medicomed.keymon.com.mx.c_principal parent) {
this.parent = parent;
}
medicomed.keymon.com.mx.c_principal parent;
String _permission = "";
boolean _result = false;

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

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

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 2648;BA.debugLine="rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCA";
parent._rp.CheckAndRequest(ba,parent._rp.PERMISSION_ACCESS_FINE_LOCATION);
 //BA.debugLineNum = 2649;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 5;
return;
case 5:
//C
this.state = 1;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 2650;BA.debugLine="If Result Then";
if (true) break;

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

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 2651;BA.debugLine="StartActivity(MAPA_RUTAS)";
parent.__c.StartActivity(ba,(Object)(parent._mapa_rutas.getObject()));
 if (true) break;

case 4:
//C
this.state = -1;
;
 //BA.debugLineNum = 2653;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public void  _b4xpage_permissionresult(String _permission,boolean _result) throws Exception{
}
public String  _busca_click() throws Exception{
 //BA.debugLineNum = 2161;BA.debugLine="Sub BUSCA_Click";
 //BA.debugLineNum = 2162;BA.debugLine="B4XPages.ShowPage(\"TicketsDia\")";
_b4xpages._showpage /*String*/ (ba,"TicketsDia");
 //BA.debugLineNum = 2163;BA.debugLine="End Sub";
return "";
}
public String  _carga_click() throws Exception{
 //BA.debugLineNum = 2437;BA.debugLine="Sub CARGA_Click";
 //BA.debugLineNum = 2438;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 //BA.debugLineNum = 2439;BA.debugLine="End Sub";
return "";
}
public String  _cargar_click() throws Exception{
boolean _pedidodiaanterior = false;
anywheresoftware.b4a.sql.SQL.CursorWrapper _cp = null;
String[] _fecha2 = null;
String _dia = "";
String _dia2 = "";
 //BA.debugLineNum = 857;BA.debugLine="Sub cargar_Click";
 //BA.debugLineNum = 858;BA.debugLine="Dim pedidodiaanterior As Boolean = False";
_pedidodiaanterior = __c.False;
 //BA.debugLineNum = 859;BA.debugLine="Dim cp As Cursor = B4XPages.MainPage.skmt.ExecQue";
_cp = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_cp = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from PEDIDO")));
 //BA.debugLineNum = 860;BA.debugLine="If cp.RowCount > 0 Then";
if (_cp.getRowCount()>0) { 
 //BA.debugLineNum = 861;BA.debugLine="cp.Position = 0";
_cp.setPosition((int) (0));
 //BA.debugLineNum = 862;BA.debugLine="Private fecha As String = cp.GetString(\"PE_FECHA";
_fecha = _cp.GetString("PE_FECHA");
 //BA.debugLineNum = 863;BA.debugLine="Dim fecha2() As String = Regex.Split(\"/\",fecha)";
_fecha2 = __c.Regex.Split("/",_fecha);
 //BA.debugLineNum = 864;BA.debugLine="Dim dia As String = fecha2(1)";
_dia = _fecha2[(int) (1)];
 //BA.debugLineNum = 865;BA.debugLine="Log(dia)";
__c.LogImpl("72490376",_dia,0);
 //BA.debugLineNum = 866;BA.debugLine="Dim dia2 As String = DateTime.GetDayOfMonth(Date";
_dia2 = BA.NumberToString(__c.DateTime.GetDayOfMonth(__c.DateTime.getNow()));
 //BA.debugLineNum = 867;BA.debugLine="Log(dia & \" , \" & dia2)";
__c.LogImpl("72490378",_dia+" , "+_dia2,0);
 //BA.debugLineNum = 868;BA.debugLine="If dia < dia2 Then";
if ((double)(Double.parseDouble(_dia))<(double)(Double.parseDouble(_dia2))) { 
 //BA.debugLineNum = 869;BA.debugLine="pedidodiaanterior = True";
_pedidodiaanterior = __c.True;
 };
 };
 //BA.debugLineNum = 872;BA.debugLine="If Not (pedidodiaanterior) Then";
if (__c.Not(_pedidodiaanterior)) { 
 //BA.debugLineNum = 873;BA.debugLine="CARGA = \"CARGAR\"";
_carga = "CARGAR";
 //BA.debugLineNum = 874;BA.debugLine="p_mandaInfo.Width = Root.Width";
_p_mandainfo.setWidth(_root.getWidth());
 //BA.debugLineNum = 875;BA.debugLine="p_mandaInfo.Height = Root.Height";
_p_mandainfo.setHeight(_root.getHeight());
 //BA.debugLineNum = 876;BA.debugLine="P1.Left = (p_mandaInfo.Width/2) - (P1.Width/2)";
_p1.setLeft((int) ((_p_mandainfo.getWidth()/(double)2)-(_p1.getWidth()/(double)2)));
 //BA.debugLineNum = 877;BA.debugLine="P1.top = (p_mandaInfo.Height/2) - (P1.Height/2)";
_p1.setTop((int) ((_p_mandainfo.getHeight()/(double)2)-(_p1.getHeight()/(double)2)));
 //BA.debugLineNum = 878;BA.debugLine="img2.Visible =True";
_img2.setVisible(__c.True);
 //BA.debugLineNum = 879;BA.debugLine="L_P_1.Visible = True";
_l_p_1.setVisible(__c.True);
 //BA.debugLineNum = 880;BA.debugLine="S_CC.Visible = True";
_s_cc.setVisible(__c.True);
 //BA.debugLineNum = 881;BA.debugLine="Btn_Ubicar.Visible=False";
_btn_ubicar.setVisible(__c.False);
 //BA.debugLineNum = 882;BA.debugLine="P1.Visible = True";
_p1.setVisible(__c.True);
 //BA.debugLineNum = 883;BA.debugLine="p_mandaInfo.Visible = True";
_p_mandainfo.setVisible(__c.True);
 //BA.debugLineNum = 884;BA.debugLine="p_principal.Visible = False";
_p_principal.setVisible(__c.False);
 //BA.debugLineNum = 885;BA.debugLine="Subs.panelVisible(P1, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p1,(int) (0),(int) (0));
 //BA.debugLineNum = 886;BA.debugLine="Subs.centraPanel(P1, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p1,_root.getWidth());
 //BA.debugLineNum = 887;BA.debugLine="Subs.centraPanelV(P1, Root.Height)";
_subs._centrapanelv /*String*/ (ba,_p1,_root.getHeight());
 //BA.debugLineNum = 889;BA.debugLine="NUEVO.Visible =False";
_nuevo.setVisible(__c.False);
 //BA.debugLineNum = 890;BA.debugLine="BUSCA.Visible=False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 891;BA.debugLine="connecta.Visible=False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 892;BA.debugLine="L_P_3.Visible = True";
_l_p_3.setVisible(__c.True);
 //BA.debugLineNum = 893;BA.debugLine="S_CH.Visible = True";
_s_ch.setVisible(__c.True);
 //BA.debugLineNum = 894;BA.debugLine="PB1.Visible = True";
_pb1.setVisible(__c.True);
 //BA.debugLineNum = 895;BA.debugLine="Resumen.Visible= False";
_resumen.setVisible(__c.False);
 //BA.debugLineNum = 897;BA.debugLine="L_P_1.Text = \"Catalogo de Clientes\"";
_l_p_1.setText(BA.ObjectToCharSequence("Catalogo de Clientes"));
 //BA.debugLineNum = 898;BA.debugLine="L_P_2.Text = \"Catalogos de Productos\"";
_l_p_2.setText(BA.ObjectToCharSequence("Catalogos de Productos"));
 //BA.debugLineNum = 899;BA.debugLine="L_P_3.Text = \"Catalogos Historicos\"";
_l_p_3.setText(BA.ObjectToCharSequence("Catalogos Historicos"));
 //BA.debugLineNum = 900;BA.debugLine="S_CC.Text = \"EN PROCESO\"";
_s_cc.setText(BA.ObjectToCharSequence("EN PROCESO"));
 //BA.debugLineNum = 901;BA.debugLine="S_CH.Text = \"EN PROCESO\"";
_s_ch.setText(BA.ObjectToCharSequence("EN PROCESO"));
 //BA.debugLineNum = 902;BA.debugLine="S_CP.Text = \"EN PROCESO\"";
_s_cp.setText(BA.ObjectToCharSequence("EN PROCESO"));
 //BA.debugLineNum = 903;BA.debugLine="PB1.Progress = 0";
_pb1.setProgress((int) (0));
 //BA.debugLineNum = 904;BA.debugLine="PB2.Progress = 0";
_pb2.setProgress((int) (0));
 //BA.debugLineNum = 905;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 908;BA.debugLine="TOPE = 0";
_tope = (int) (0);
 //BA.debugLineNum = 910;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTA_SUPLENCIA");
 //BA.debugLineNum = 911;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 912;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CLIENTE_NUEVO");
 //BA.debugLineNum = 913;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 914;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 915;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cod_result");
 //BA.debugLineNum = 916;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from hist_gest");
 //BA.debugLineNum = 917;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 918;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod2");
 //BA.debugLineNum = 919;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 920;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from telefonos");
 //BA.debugLineNum = 921;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 922;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_PROMOS");
 //BA.debugLineNum = 923;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_CLIENTE_CANT_PROMOS");
 //BA.debugLineNum = 924;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PROMOS_COMP");
 //BA.debugLineNum = 925;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_VERIFICACION");
 //BA.debugLineNum = 926;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_GIRO\"";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_GIRO");
 //BA.debugLineNum = 927;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM MARCAS_RUTAS");
 //BA.debugLineNum = 928;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_STAY_STORE");
 //BA.debugLineNum = 929;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GEOCERCA");
 //BA.debugLineNum = 930;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_MARCAS_CUOTAS");
 //BA.debugLineNum = 932;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 934;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2(\"select co";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select count(CAT_VA_DESCRIPCION) as HoraIngreso from cat_variables where CAT_VA_DESCRIPCION = ? ",new String[]{"HoraIngreso"})));
 //BA.debugLineNum = 935;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 936;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 938;BA.debugLine="If c.GetString(\"HoraIngreso\") > 0 Then";
if ((double)(Double.parseDouble(_c.GetString("HoraIngreso")))>0) { 
 //BA.debugLineNum = 939;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"Update ca";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("Update cat_variables set CAT_VA_VALOR = ?  WHERE CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__c.DateTime.Time(__c.DateTime.getNow()),"HoraIngreso"}));
 }else {
 //BA.debugLineNum = 941;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_VALOR,CAT_VA_DESCRIPCION)  VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{__c.DateTime.Time(__c.DateTime.getNow()),"HoraIngreso"}));
 };
 //BA.debugLineNum = 943;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 944;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 945;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuar";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
 //BA.debugLineNum = 946;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 947;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 948;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 950;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 951;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 952;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 953;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 955;BA.debugLine="Dim P As PhoneId";
_p = new anywheresoftware.b4a.phone.Phone.PhoneId();
 //BA.debugLineNum = 958;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 959;BA.debugLine="cmd.Name = \"select_marcas_MEDI_V2\"";
_cmd.Name /*String*/  = "select_marcas_MEDI_V2";
 //BA.debugLineNum = 960;BA.debugLine="cmd.Parameters = Array As Object(usuario)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_usuario)};
 //BA.debugLineNum = 961;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"marcas\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("marcas"));
 //BA.debugLineNum = 968;BA.debugLine="imei = \"xxxx\"";
_imei = "xxxx";
 //BA.debugLineNum = 970;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 971;BA.debugLine="cmd.Name =\"insert_drop_MEDI_2_V2\"";
_cmd.Name /*String*/  = "insert_drop_MEDI_2_V2";
 //BA.debugLineNum = 972;BA.debugLine="cmd.Parameters = Array As Object(usuario,e_ruta.";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_usuario),(Object)(_e_ruta.getText()),(Object)(_sdate),(Object)(_imei),(Object)(_stime),(Object)(""),(Object)(""),(Object)(""),(Object)(""),(Object)("CARGA"),(Object)(_almacen),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 973;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 //BA.debugLineNum = 975;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 976;BA.debugLine="cmd.Name = \"select_cat_guna_productos_MEDICOMED_";
_cmd.Name /*String*/  = "select_cat_guna_productos_MEDICOMED_V2";
 //BA.debugLineNum = 977;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 978;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 985;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 986;BA.debugLine="cmd.Name = \"select_cat_giro_V2\"";
_cmd.Name /*String*/  = "select_cat_giro_V2";
 //BA.debugLineNum = 987;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"giro\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("giro"));
 //BA.debugLineNum = 994;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 995;BA.debugLine="cmd.Name = \"select_cat_paquetes_MEDI3_V2\"";
_cmd.Name /*String*/  = "select_cat_paquetes_MEDI3_V2";
 //BA.debugLineNum = 996;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 997;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprodp\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprodp"));
 //BA.debugLineNum = 1000;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1001;BA.debugLine="cmd.Name = \"select_cat_paquetess_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cat_paquetess_MEDI_V2";
 //BA.debugLineNum = 1002;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1003;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprodp\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprodp"));
 //BA.debugLineNum = 1005;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1006;BA.debugLine="cmd.Name = \"select_cat_detallepa_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cat_detallepa_MEDI_V2";
 //BA.debugLineNum = 1007;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1008;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"detallepaq\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("detallepaq"));
 //BA.debugLineNum = 1010;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1011;BA.debugLine="cmd.Name = \"select_cat_clientes_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cat_clientes_MEDI_V2";
 //BA.debugLineNum = 1012;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1013;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1025;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1026;BA.debugLine="cmd.Name = \"select_hist_datos_MEDI_2_V2\"";
_cmd.Name /*String*/  = "select_hist_datos_MEDI_2_V2";
 //BA.debugLineNum = 1027;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen),(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1028;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1030;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1031;BA.debugLine="cmd.Name = \"select_hist_promos_MEDI_V2\"";
_cmd.Name /*String*/  = "select_hist_promos_MEDI_V2";
 //BA.debugLineNum = 1032;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1033;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_promos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_promos"));
 //BA.debugLineNum = 1040;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1041;BA.debugLine="cmd.Name = \"select_hist_cliente_promos_MEDI_V2\"";
_cmd.Name /*String*/  = "select_hist_cliente_promos_MEDI_V2";
 //BA.debugLineNum = 1042;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1043;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_cliente_p";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_cliente_promos"));
 //BA.debugLineNum = 1051;BA.debugLine="If E_RUTA2.text <> \"\" Then";
if ((_e_ruta2.getText()).equals("") == false) { 
 //BA.debugLineNum = 1055;BA.debugLine="E_RUTA2.Visible = False";
_e_ruta2.setVisible(__c.False);
 //BA.debugLineNum = 1056;BA.debugLine="Panel11.Visible = False";
_panel11.setVisible(__c.False);
 //BA.debugLineNum = 1058;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1059;BA.debugLine="cmd.Name = \"select_cat_clientes_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cat_clientes_MEDI_V2";
 //BA.debugLineNum = 1060;BA.debugLine="cmd.Parameters = Array As Object(E_RUTA2.text,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta2.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1061;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"kmt_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("kmt_datos"));
 //BA.debugLineNum = 1068;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1069;BA.debugLine="cmd.Name = \"select_hist_datos_MEDI_V2\"";
_cmd.Name /*String*/  = "select_hist_datos_MEDI_V2";
 //BA.debugLineNum = 1070;BA.debugLine="cmd.Parameters = Array As Object(E_RUTA2.text,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta2.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1071;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_datos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_datos"));
 //BA.debugLineNum = 1073;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1074;BA.debugLine="cmd.Name = \"select_hist_promos_MEDI_V2\"";
_cmd.Name /*String*/  = "select_hist_promos_MEDI_V2";
 //BA.debugLineNum = 1075;BA.debugLine="cmd.Parameters = Array As Object(E_RUTA2.text,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta2.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1076;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_promos\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_promos"));
 //BA.debugLineNum = 1078;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1079;BA.debugLine="cmd.Name = \"select_hist_cliente_promos_MEDI_V2\"";
_cmd.Name /*String*/  = "select_hist_cliente_promos_MEDI_V2";
 //BA.debugLineNum = 1080;BA.debugLine="cmd.Parameters = Array As Object(E_RUTA2.text,";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta2.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1081;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_cliente_";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_cliente_promos"));
 };
 //BA.debugLineNum = 1084;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1085;BA.debugLine="cmd.Name = \"select_promo_comp_MEDI_V2\"";
_cmd.Name /*String*/  = "select_promo_comp_MEDI_V2";
 //BA.debugLineNum = 1086;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 1087;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"hist_comp_prom";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("hist_comp_promos"));
 //BA.debugLineNum = 1094;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1095;BA.debugLine="cmd.Name = \"select_fecha\"";
_cmd.Name /*String*/  = "select_fecha";
 //BA.debugLineNum = 1096;BA.debugLine="cmd.Parameters = Array As Object(e_ruta.text, AL";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_e_ruta.getText()),(Object)(_almacen)};
 //BA.debugLineNum = 1097;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"fecha\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("fecha"));
 //BA.debugLineNum = 1099;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1100;BA.debugLine="cmd.Name = \"select_folio_MEDI_V2\"";
_cmd.Name /*String*/  = "select_folio_MEDI_V2";
 //BA.debugLineNum = 1101;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_ruta";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 1102;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"folio\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("folio"));
 //BA.debugLineNum = 1109;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1110;BA.debugLine="cmd.Name = \"select_marcas_rutas_MEDI_V2\"";
_cmd.Name /*String*/  = "select_marcas_rutas_MEDI_V2";
 //BA.debugLineNum = 1111;BA.debugLine="cmd.Parameters = Array As Object( ALMACEN, e_rut";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 1112;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"marcas_rutas\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("marcas_rutas"));
 //BA.debugLineNum = 1124;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 1125;BA.debugLine="cmd.Name = \"select_marcas_rutas_MEDI_V2\"";
_cmd.Name /*String*/  = "select_marcas_rutas_MEDI_V2";
 //BA.debugLineNum = 1126;BA.debugLine="cmd.Parameters = Array As Object( ALMACEN, e_rut";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 1127;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"COMISIONES\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("COMISIONES"));
 //BA.debugLineNum = 1135;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1136;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1137;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1138;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessageS";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias"),__c.True);};
 }else {
 //BA.debugLineNum = 1140;BA.debugLine="Log(\"XXXX\")";
__c.LogImpl("72490651","XXXX",0);
 //BA.debugLineNum = 1141;BA.debugLine="MsgboxAsync(\"Para poder cargar día no puedes ten";
__c.MsgboxAsync(BA.ObjectToCharSequence("Para poder cargar día no puedes tener venta del día anterior. Por favor haz FIN DIA e intenta nuevamente."),BA.ObjectToCharSequence("Atención"),ba);
 };
 //BA.debugLineNum = 1143;BA.debugLine="End Sub";
return "";
}
public String  _checapedido() throws Exception{
 //BA.debugLineNum = 2908;BA.debugLine="Sub checaPedido";
 //BA.debugLineNum = 2909;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"SEL";
_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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PC_CLIENTE FROM PEDIDO_CLIENTE")));
 //BA.debugLineNum = 2910;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2911;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info set gestion = 2  WHERE CAT_CL_CODIGO IN (SELECT PC_CLIENTE FROM PEDIDO_CLIENTE)");
 };
 //BA.debugLineNum = 2913;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery(\"SEL";
_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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT NV_CLIENTE FROM NOVENTA")));
 //BA.debugLineNum = 2914;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2915;BA.debugLine="Starter.skmt.ExecNonQuery(\"Update kmt_info set g";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("Update kmt_info set gestion = 3  WHERE CAT_CL_CODIGO IN (SELECT NV_CLIENTE FROM NOVENTA)");
 };
 //BA.debugLineNum = 2917;BA.debugLine="End Sub";
return "";
}
public boolean  _chkiftableexists(anywheresoftware.b4a.sql.SQL _db,String _table) throws Exception{
boolean _t = false;
 //BA.debugLineNum = 323;BA.debugLine="Sub chkIfTableExists(db As SQL, table As String) A";
 //BA.debugLineNum = 324;BA.debugLine="Private t As Boolean = False 'ignore";
_t = __c.False;
 //BA.debugLineNum = 325;BA.debugLine="If db.IsInitialized Then";
if (_db.IsInitialized()) { 
 //BA.debugLineNum = 326;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery($\"S";
_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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT name FROM sqlite_master WHERE type='table' AND name='"+__c.SmartStringFormatter("",(Object)(_table))+"'"))));
 //BA.debugLineNum = 327;BA.debugLine="If c.RowCount > 0 Then t = True";
if (_c.getRowCount()>0) { 
_t = __c.True;};
 //BA.debugLineNum = 328;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 330;BA.debugLine="Return t";
if (true) return _t;
 //BA.debugLineNum = 331;BA.debugLine="End Sub";
return false;
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Public rp As RuntimePermissions";
_rp = new anywheresoftware.b4a.objects.RuntimePermissions();
 //BA.debugLineNum = 3;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 4;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 6;BA.debugLine="Dim rd As C_RespaldoDiario";
_rd = new medicomed.keymon.com.mx.c_respaldodiario();
 //BA.debugLineNum = 7;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new medicomed.keymon.com.mx.dbrequestmanager();
 //BA.debugLineNum = 8;BA.debugLine="Dim conectado As String";
_conectado = "";
 //BA.debugLineNum = 9;BA.debugLine="Dim ime As IME";
_ime = new anywheresoftware.b4a.objects.IME();
 //BA.debugLineNum = 10;BA.debugLine="Dim t1, t2 As Timer";
_t1 = new anywheresoftware.b4a.objects.Timer();
_t2 = new anywheresoftware.b4a.objects.Timer();
 //BA.debugLineNum = 11;BA.debugLine="Dim sb As StringBuilder";
_sb = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 12;BA.debugLine="Dim PHONE As Phone";
_phone = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 13;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 14;BA.debugLine="Dim trabajar As Button";
_trabajar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 18;BA.debugLine="Dim b As Cursor";
_b = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim e As Cursor";
_e = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Dim f As Cursor";
_f = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Dim D2 As Cursor";
_d2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Dim lv As ListView";
_lv = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Dim cargar As Button";
_cargar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Dim pendiente As Button";
_pendiente = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim foto1() As Byte";
_foto1 = new byte[(int) (0)];
;
 //BA.debugLineNum = 26;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 27;BA.debugLine="Dim connecta As Button";
_connecta = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Dim conn As String";
_conn = "";
 //BA.debugLineNum = 29;BA.debugLine="Dim Subir As Button";
_subir = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 31;BA.debugLine="Dim TOPE As Int";
_tope = 0;
 //BA.debugLineNum = 32;BA.debugLine="Dim COUNT_CLIE As Int";
_count_clie = 0;
 //BA.debugLineNum = 33;BA.debugLine="Dim fecha As String";
_fecha = "";
 //BA.debugLineNum = 34;BA.debugLine="Dim drop As Double";
_drop = 0;
 //BA.debugLineNum = 35;BA.debugLine="Dim efectiva As Double";
_efectiva = 0;
 //BA.debugLineNum = 36;BA.debugLine="Dim L_MONTOD As Label";
_l_montod = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 37;BA.debugLine="Dim l_cuantosc As Label";
_l_cuantosc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 38;BA.debugLine="Dim l_drop As Label";
_l_drop = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Dim l_efectiva As Label";
_l_efectiva = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Dim l_ctast As Label";
_l_ctast = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 41;BA.debugLine="Dim BUSCA As Button";
_busca = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Dim Cuantos As String";
_cuantos = "";
 //BA.debugLineNum = 43;BA.debugLine="Dim l_cuantosn As Label";
_l_cuantosn = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Dim e_ruta As EditText";
_e_ruta = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Dim l_porvisitar As Label";
_l_porvisitar = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Dim b_mapa As Button";
_b_mapa = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 47;BA.debugLine="Dim l_ruta As Label";
_l_ruta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 48;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
 //BA.debugLineNum = 49;BA.debugLine="Private img2 As ImageView";
_img2 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 50;BA.debugLine="Dim Listo1 As String";
_listo1 = "";
 //BA.debugLineNum = 51;BA.debugLine="Dim Listo2 As String";
_listo2 = "";
 //BA.debugLineNum = 52;BA.debugLine="Dim Listo3 As String";
_listo3 = "";
 //BA.debugLineNum = 53;BA.debugLine="Dim Listo4 As String";
_listo4 = "";
 //BA.debugLineNum = 54;BA.debugLine="Dim Listo5 As String";
_listo5 = "";
 //BA.debugLineNum = 55;BA.debugLine="Dim EJECUTANDO As String";
_ejecutando = "";
 //BA.debugLineNum = 56;BA.debugLine="Dim RES As String";
_res = "";
 //BA.debugLineNum = 57;BA.debugLine="Dim inve As String";
_inve = "";
 //BA.debugLineNum = 58;BA.debugLine="Dim cuantos_pedidosc As String";
_cuantos_pedidosc = "";
 //BA.debugLineNum = 59;BA.debugLine="Dim cuantos_pedido As String";
_cuantos_pedido = "";
 //BA.debugLineNum = 60;BA.debugLine="Dim cuantos_noventa As String";
_cuantos_noventa = "";
 //BA.debugLineNum = 61;BA.debugLine="Dim datos_iguales As String";
_datos_iguales = "";
 //BA.debugLineNum = 62;BA.debugLine="Dim p As PhoneId";
_p = new anywheresoftware.b4a.phone.Phone.PhoneId();
 //BA.debugLineNum = 63;BA.debugLine="Dim imei As String";
_imei = "";
 //BA.debugLineNum = 65;BA.debugLine="Private inv As Button";
_inv = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 66;BA.debugLine="Private P1 As Panel";
_p1 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 67;BA.debugLine="Private CLAVE As EditText";
_clave = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 68;BA.debugLine="Private B_OK_PAS As Button";
_b_ok_pas = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 69;BA.debugLine="Dim PASO As String";
_paso = "";
 //BA.debugLineNum = 70;BA.debugLine="Private USUARIO1 As EditText";
_usuario1 = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 71;BA.debugLine="Dim connecta1 As Double";
_connecta1 = 0;
 //BA.debugLineNum = 72;BA.debugLine="Dim armafolio As String";
_armafolio = "";
 //BA.debugLineNum = 73;BA.debugLine="Private NUEVO As Button";
_nuevo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 74;BA.debugLine="Private S_CC As Label";
_s_cc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 75;BA.debugLine="Private S_CP As Label";
_s_cp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 76;BA.debugLine="Private S_CH As Label";
_s_ch = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 77;BA.debugLine="Private PB2 As ProgressBar";
_pb2 = new anywheresoftware.b4a.objects.ProgressBarWrapper();
 //BA.debugLineNum = 78;BA.debugLine="Private PB1 As ProgressBar";
_pb1 = new anywheresoftware.b4a.objects.ProgressBarWrapper();
 //BA.debugLineNum = 79;BA.debugLine="Private L_P_1 As Label";
_l_p_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 80;BA.debugLine="Private L_P_2 As Label";
_l_p_2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 81;BA.debugLine="Private L_P_3 As Label";
_l_p_3 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 82;BA.debugLine="Private CARGA As String";
_carga = "";
 //BA.debugLineNum = 83;BA.debugLine="Private PORCENTAJE As String";
_porcentaje = "";
 //BA.debugLineNum = 84;BA.debugLine="Private P_RESUMEN As Panel";
_p_resumen = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 85;BA.debugLine="Private B_OK_RES As Button";
_b_ok_res = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 86;BA.debugLine="Private Resumen As Button";
_resumen = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 87;BA.debugLine="Private L_CUANTOST As Label";
_l_cuantost = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 88;BA.debugLine="Private img3 As ImageView";
_img3 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 89;BA.debugLine="Private ImageView3 As ImageView";
_imageview3 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 90;BA.debugLine="Private ImageView5 As ImageView";
_imageview5 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 91;BA.debugLine="Private L_TICKPROM As Label";
_l_tickprom = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 92;BA.debugLine="Private L_MARCAS As ListView";
_l_marcas = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 93;BA.debugLine="Private ImageView9 As ImageView";
_imageview9 = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 94;BA.debugLine="Private E_RUTA2 As EditText";
_e_ruta2 = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 95;BA.debugLine="Private resdia As ImageView";
_resdia = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 96;BA.debugLine="Private hacer_ped As ImageView";
_hacer_ped = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 97;BA.debugLine="Private nvo_cliente As ImageView";
_nvo_cliente = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 98;BA.debugLine="Private tickets_dia As ImageView";
_tickets_dia = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 99;BA.debugLine="Private l_monto_ks As Label";
_l_monto_ks = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 100;BA.debugLine="Private l_monto_kp As Label";
_l_monto_kp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 101;BA.debugLine="Private l_monto_k As Label";
_l_monto_k = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 102;BA.debugLine="Private l_monto_c1 As Label";
_l_monto_c1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 103;BA.debugLine="Private l_monto_c2 As Label";
_l_monto_c2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 104;BA.debugLine="Private l_monto_c3 As Label";
_l_monto_c3 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 105;BA.debugLine="Private l_encuesta As Label";
_l_encuesta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 106;BA.debugLine="Private bpv1 As BatteryProgressView";
_bpv1 = new batteryprogressviewwrapper.batteryprogressviewWrapper();
 //BA.debugLineNum = 107;BA.debugLine="Dim batterystatus(11) As Int";
_batterystatus = new int[(int) (11)];
;
 //BA.debugLineNum = 108;BA.debugLine="Private bu As BatteryUtilities";
_bu = new medicomed.keymon.com.mx.batteryutilities();
 //BA.debugLineNum = 109;BA.debugLine="Private L_NES As Label";
_l_nes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 110;BA.debugLine="Private L_REAL As Label";
_l_real = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 111;BA.debugLine="Private L_ALCANCE As Label";
_l_alcance = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 112;BA.debugLine="Private L_VPLAN As Label";
_l_vplan = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 113;BA.debugLine="Private L_VREAL As Label";
_l_vreal = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 114;BA.debugLine="Private L_EFEC_VIS As Label";
_l_efec_vis = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 115;BA.debugLine="Private L_VISITCC As Label";
_l_visitcc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 116;BA.debugLine="Private L_EFEC_PV As Label";
_l_efec_pv = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 117;BA.debugLine="Private L_EFEC_PURA As Label";
_l_efec_pura = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 118;BA.debugLine="Private L_CTE_PROMO As Label";
_l_cte_promo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 119;BA.debugLine="Private L_REDEN_PROMO As Label";
_l_reden_promo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 120;BA.debugLine="Private L_LIN_TICK As Label";
_l_lin_tick = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 121;BA.debugLine="Private SCROLL_RESDIA As ScrollView";
_scroll_resdia = new anywheresoftware.b4a.objects.ScrollViewWrapper();
 //BA.debugLineNum = 122;BA.debugLine="Private L_ACUMULADO As Label";
_l_acumulado = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 123;BA.debugLine="Private L_UNILEVER As Label";
_l_unilever = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 124;BA.debugLine="Private L_RECHAZOP As Label";
_l_rechazop = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 125;BA.debugLine="Private L_RECHAZOM As Label";
_l_rechazom = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 126;BA.debugLine="Private L_VTA_3MES As Label";
_l_vta_3mes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 127;BA.debugLine="Private L_VTA_2MES As Label";
_l_vta_2mes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 128;BA.debugLine="Private L_VTA_1MES As Label";
_l_vta_1mes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 129;BA.debugLine="Private L_MES_PY As Label";
_l_mes_py = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 130;BA.debugLine="Private L_FREC_DE_CREAL As Label";
_l_frec_de_creal = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 131;BA.debugLine="Private L_FREC_DE_COBJ As Label";
_l_frec_de_cobj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 132;BA.debugLine="Private L_COB_VISIT As Label";
_l_cob_visit = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 133;BA.debugLine="Private L_VISIT_REAL As Label";
_l_visit_real = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 134;BA.debugLine="Private L_VISIT_PLAN As Label";
_l_visit_plan = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 135;BA.debugLine="Private L_ECO As Label";
_l_eco = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 136;BA.debugLine="Private L_COB_CCC As Label";
_l_cob_ccc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 137;BA.debugLine="Private L_CTES As Label";
_l_ctes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 138;BA.debugLine="Private L_VPO_VTA As Label";
_l_vpo_vta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 139;BA.debugLine="Private L_VPO_OBJ As Label";
_l_vpo_obj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 140;BA.debugLine="Private L_DS_VTA As Label";
_l_ds_vta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 141;BA.debugLine="Private L_DS_OBJ As Label";
_l_ds_obj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 142;BA.debugLine="Private L_DRA_VTA As Label";
_l_dra_vta = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 143;BA.debugLine="Private L_DRA_OBJ As Label";
_l_dra_obj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 144;BA.debugLine="Private L_ALCANCEM As Label";
_l_alcancem = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 145;BA.debugLine="Private L_TENDENCIA As Label";
_l_tendencia = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 146;BA.debugLine="Private L_VTA_ACUM As Label";
_l_vta_acum = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 147;BA.debugLine="Private L_OBJ_MES As Label";
_l_obj_mes = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 148;BA.debugLine="Private L_DS_OBJD As Label";
_l_ds_objd = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 149;BA.debugLine="Private L_DS_VTAD As Label";
_l_ds_vtad = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 150;BA.debugLine="Private LPT As String";
_lpt = "";
 //BA.debugLineNum = 151;BA.debugLine="Private STEYIN As String";
_steyin = "";
 //BA.debugLineNum = 152;BA.debugLine="Private STEYOUT As String";
_steyout = "";
 //BA.debugLineNum = 153;BA.debugLine="Private L_PRIO As Label";
_l_prio = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 154;BA.debugLine="Private L_SECUND As Label";
_l_secund = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 155;BA.debugLine="Private L_COMP As Label";
_l_comp = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 156;BA.debugLine="Private stay_hh As String";
_stay_hh = "";
 //BA.debugLineNum = 157;BA.debugLine="Private stay_mi As String";
_stay_mi = "";
 //BA.debugLineNum = 158;BA.debugLine="Private stay_ss As String";
_stay_ss = "";
 //BA.debugLineNum = 159;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 160;BA.debugLine="Dim HORAINGRESO As String";
_horaingreso = "";
 //BA.debugLineNum = 161;BA.debugLine="Private L_QUALA As Label";
_l_quala = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 162;BA.debugLine="Private L_FERRERO As Label";
_l_ferrero = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 163;BA.debugLine="Private L_SANMARCOS As Label";
_l_sanmarcos = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 164;BA.debugLine="Private L_CAMPARI As Label";
_l_campari = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 165;BA.debugLine="Private L_IBERIA As Label";
_l_iberia = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 166;BA.debugLine="Private L_BEPENSA As Label";
_l_bepensa = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 167;BA.debugLine="Private L_SCJ As Label";
_l_scj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 168;BA.debugLine="Private L_MEDJ As Label";
_l_medj = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 169;BA.debugLine="Private L_DURACELL As Label";
_l_duracell = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 170;BA.debugLine="Private L_GUNA As Label";
_l_guna = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 171;BA.debugLine="Private L_KIMB As Label";
_l_kimb = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 172;BA.debugLine="Private L_TRESM As Label";
_l_tresm = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 173;BA.debugLine="Private L_REDB As Label";
_l_redb = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 174;BA.debugLine="Private Btn_Ubicar As Button";
_btn_ubicar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 175;BA.debugLine="Private B_COMM As Button";
_b_comm = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 176;BA.debugLine="Private L_TOTAL_MM As Label";
_l_total_mm = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 177;BA.debugLine="Private L_TOTAL_VIVE As Label";
_l_total_vive = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 178;BA.debugLine="Private L_TOTAL_GUNA As Label";
_l_total_guna = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 179;BA.debugLine="Private L_TOTAL_BA As Label";
_l_total_ba = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 180;BA.debugLine="Private L_TOTAL_COMIS As Label";
_l_total_comis = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 181;BA.debugLine="Private L_TOTAL_MM_1 As Label";
_l_total_mm_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 182;BA.debugLine="Private L_TOTAL_VIVE_1 As Label";
_l_total_vive_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 183;BA.debugLine="Private L_TOTAL_GUNA_1 As Label";
_l_total_guna_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 184;BA.debugLine="Private L_TOTAL_BA_1 As Label";
_l_total_ba_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 185;BA.debugLine="Private L_TOTAL_COMIS_1 As Label";
_l_total_comis_1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 186;BA.debugLine="Private B_OK_COMISS As Button";
_b_ok_comiss = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 187;BA.debugLine="Private Panel_C As Panel";
_panel_c = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 188;BA.debugLine="Private TitleHeight As Int = 50dip";
_titleheight = __c.DipToCurrent((int) (50));
 //BA.debugLineNum = 189;BA.debugLine="Private Title2Height As Int = 100dip";
_title2height = __c.DipToCurrent((int) (100));
 //BA.debugLineNum = 190;BA.debugLine="Private DividerHeight As Int = 5dip";
_dividerheight = __c.DipToCurrent((int) (5));
 //BA.debugLineNum = 191;BA.debugLine="Private CLV1 As CustomListView";
_clv1 = new b4a.example3.customlistview();
 //BA.debugLineNum = 192;BA.debugLine="Private pnlTitle As B4XView";
_pnltitle = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 193;BA.debugLine="Private xui As XUI";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 194;BA.debugLine="Type TitleData (Title As String)";
;
 //BA.debugLineNum = 195;BA.debugLine="Private B_MARCAS As Button";
_b_marcas = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 196;BA.debugLine="Private Panel5 As Panel";
_panel5 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 197;BA.debugLine="Private lblTitle As Label";
_lbltitle = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 198;BA.debugLine="Private B_OK_PANEL5 As Button";
_b_ok_panel5 = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 199;BA.debugLine="Private p_principal As Panel";
_p_principal = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 200;BA.debugLine="Private p_mandaInfo As Panel";
_p_mandainfo = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 201;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 202;BA.debugLine="Private Label22 As Label";
_label22 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 203;BA.debugLine="Private l_rutasuplencia As Label";
_l_rutasuplencia = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 204;BA.debugLine="Dim userpiezas As String";
_userpiezas = "";
 //BA.debugLineNum = 205;BA.debugLine="Private b_abordo As Button";
_b_abordo = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 206;BA.debugLine="Private L_ABORDO As Label";
_l_abordo = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 208;BA.debugLine="Private L_PREVENTA As Label";
_l_preventa = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 209;BA.debugLine="Private p_abordo As Panel";
_p_abordo = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 210;BA.debugLine="Private Panel11 As Panel";
_panel11 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 211;BA.debugLine="Private CLV_PICK_CIEGO As CustomListView";
_clv_pick_ciego = new b4a.example3.customlistview();
 //BA.debugLineNum = 212;BA.debugLine="Private P_PICK_CIEGO As Panel";
_p_pick_ciego = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 213;BA.debugLine="Dim ET_PICK_CIEGO As EditText";
_et_pick_ciego = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 214;BA.debugLine="Private L_PICK_CIEGO As Label";
_l_pick_ciego = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 215;BA.debugLine="Private P_CIEGO As Panel";
_p_ciego = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 216;BA.debugLine="Dim Panel4 As Panel";
_panel4 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 217;BA.debugLine="Dim q_buscar As String";
_q_buscar = "";
 //BA.debugLineNum = 218;BA.debugLine="Private et_buspc As EditText";
_et_buspc = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 220;BA.debugLine="Dim bitacora As C_Bitacora";
_bitacora = new medicomed.keymon.com.mx.c_bitacora();
 //BA.debugLineNum = 222;BA.debugLine="Private lv_pedidos_tot As ListView";
_lv_pedidos_tot = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 223;BA.debugLine="Private b_regresar As Button";
_b_regresar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 224;BA.debugLine="Dim p_pedidos As Panel";
_p_pedidos = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 225;BA.debugLine="Private p_prod As Panel";
_p_prod = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 226;BA.debugLine="Private b_regreso As Button";
_b_regreso = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 227;BA.debugLine="Private iv_productos As ImageView";
_iv_productos = new anywheresoftware.b4a.objects.ImageViewWrapper();
 //BA.debugLineNum = 228;BA.debugLine="Private p_productos As Panel";
_p_productos = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 229;BA.debugLine="Private lv_prod_Prin As ListView";
_lv_prod_prin = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 230;BA.debugLine="Private l_prod_p As Label";
_l_prod_p = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 231;BA.debugLine="Private l_prod_c As Label";
_l_prod_c = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 232;BA.debugLine="Private l_tot_prod_c As Label";
_l_tot_prod_c = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 233;BA.debugLine="Private l_tot_prod_p As Label";
_l_tot_prod_p = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 234;BA.debugLine="End Sub";
return "";
}
public String  _connecta_click() throws Exception{
 //BA.debugLineNum = 2091;BA.debugLine="Sub connecta_Click";
 //BA.debugLineNum = 2092;BA.debugLine="Log( Starter.DBReqServer)";
__c.LogImpl("72686977",_starter._dbreqserver /*String*/ ,0);
 //BA.debugLineNum = 2093;BA.debugLine="reqManager.Initialize(Me, Starter.DBReqServer)";
_reqmanager._initialize /*String*/ (ba,this,_starter._dbreqserver /*String*/ );
 //BA.debugLineNum = 2094;BA.debugLine="ime.HideKeyboard";
_ime.HideKeyboard(ba);
 //BA.debugLineNum = 2095;BA.debugLine="connecta1 = connecta1 + 1";
_connecta1 = _connecta1+1;
 //BA.debugLineNum = 2097;BA.debugLine="imei = \"xxxx\"";
_imei = "xxxx";
 //BA.debugLineNum = 2098;BA.debugLine="conn = \"1\"";
_conn = "1";
 //BA.debugLineNum = 2118;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 2119;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2121;BA.debugLine="cmd.Name = \"select_ruta_MEDI_7_V2\"";
_cmd.Name /*String*/  = "select_ruta_MEDI_7_V2";
 //BA.debugLineNum = 2122;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN, e_ruta.";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_e_ruta.getText())};
 //BA.debugLineNum = 2124;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"ruta\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("ruta"));
 //BA.debugLineNum = 2126;BA.debugLine="If e_ruta.Text = \"KMTS1\" Then";
if ((_e_ruta.getText()).equals("KMTS1")) { 
 //BA.debugLineNum = 2127;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 2128;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 //BA.debugLineNum = 2129;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 };
 //BA.debugLineNum = 2132;BA.debugLine="If e_ruta.Text = \"BERNA1\" Then";
if ((_e_ruta.getText()).equals("BERNA1")) { 
 //BA.debugLineNum = 2133;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 2134;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 //BA.debugLineNum = 2135;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 };
 //BA.debugLineNum = 2138;BA.debugLine="If e_ruta.Text = \"FIN DIA\" Then";
if ((_e_ruta.getText()).equals("FIN DIA")) { 
 //BA.debugLineNum = 2139;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2140;BA.debugLine="ToastMessageShow(\"Debe presionar enter en el tec";
__c.ToastMessageShow(BA.ObjectToCharSequence("Debe presionar enter en el teclado."),__c.True);
 };
 //BA.debugLineNum = 2143;BA.debugLine="ToastMessageShow(\"Validando Conexión.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Validando Conexión."),__c.True);
 //BA.debugLineNum = 2159;BA.debugLine="End Sub";
return "";
}
public String  _e_ruta_enterpressed() throws Exception{
 //BA.debugLineNum = 2211;BA.debugLine="Sub e_ruta_EnterPressed";
 //BA.debugLineNum = 2212;BA.debugLine="If e_ruta.Text = \"FIN DIA\" Then";
if ((_e_ruta.getText()).equals("FIN DIA")) { 
 //BA.debugLineNum = 2213;BA.debugLine="RES = Msgbox2(\"Seguro que desea hacer el cierre?";
_res = BA.NumberToString(__c.Msgbox2(BA.ObjectToCharSequence("Seguro que desea hacer el cierre? Todos los datos se borrarán."),BA.ObjectToCharSequence("Cierre"),"Si","","No",(android.graphics.Bitmap)(__c.LoadBitmap(__c.File.getDirAssets(),"alert2.png").getObject()),ba));
 //BA.debugLineNum = 2214;BA.debugLine="If RES = DialogResponse.POSITIVE Then";
if ((_res).equals(BA.NumberToString(__c.DialogResponse.POSITIVE))) { 
 //BA.debugLineNum = 2215;BA.debugLine="bitacora.mandaBitacora(Subs.fechanormal(DateTim";
_bitacora._mandabitacora /*String*/ (_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_usuario,_subs._traealmacen /*String*/ (ba),_subs._traerutabitacora /*String*/ (ba),"Fin Día","",_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_subs._fechanormal /*String*/ (ba,BA.NumberToString(__c.DateTime.getNow())),_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ,_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ,"2","","");
 //BA.debugLineNum = 2216;BA.debugLine="Label22.Visible = False";
_label22.setVisible(__c.False);
 //BA.debugLineNum = 2217;BA.debugLine="l_rutasuplencia.Visible = False";
_l_rutasuplencia.setVisible(__c.False);
 //BA.debugLineNum = 2218;BA.debugLine="l_rutasuplencia.Text = \"\"";
_l_rutasuplencia.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2220;BA.debugLine="t2.Initialize(\"t2\", 1000)  ' 1000 ms = 1 segund";
_t2.Initialize(ba,"t2",(long) (1000));
 //BA.debugLineNum = 2221;BA.debugLine="t2.Enabled = True";
_t2.setEnabled(__c.True);
 };
 };
 //BA.debugLineNum = 2225;BA.debugLine="If e_ruta.Text = \"IWL\" Then";
if ((_e_ruta.getText()).equals("IWL")) { 
 //BA.debugLineNum = 2227;BA.debugLine="NUEVO.Visible =False";
_nuevo.setVisible(__c.False);
 //BA.debugLineNum = 2228;BA.debugLine="BUSCA.Visible=False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 2229;BA.debugLine="connecta.Visible=False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 2230;BA.debugLine="img3.Visible =True";
_img3.setVisible(__c.True);
 //BA.debugLineNum = 2231;BA.debugLine="Resumen.Visible= False";
_resumen.setVisible(__c.False);
 };
 //BA.debugLineNum = 2233;BA.debugLine="If e_ruta.Text = \"SUPLENCIA\" Then";
if ((_e_ruta.getText()).equals("SUPLENCIA")) { 
 //BA.debugLineNum = 2234;BA.debugLine="E_RUTA2.Visible = True";
_e_ruta2.setVisible(__c.True);
 //BA.debugLineNum = 2235;BA.debugLine="Panel11.Visible = True";
_panel11.setVisible(__c.True);
 //BA.debugLineNum = 2237;BA.debugLine="e_ruta.Text= \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 };
 //BA.debugLineNum = 2239;BA.debugLine="End Sub";
return "";
}
public String  _e_ruta_textchanged(String _old,String _new) throws Exception{
String _validchars = "";
 //BA.debugLineNum = 2656;BA.debugLine="Sub e_ruta_TextChanged (Old As String, New As Stri";
 //BA.debugLineNum = 2657;BA.debugLine="Dim validChars As String =\"ABCDEFGHIJKLMNOPQRSTUV";
_validchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ";
 //BA.debugLineNum = 2659;BA.debugLine="If Old <> \"KMTS1\" Then";
if ((_old).equals("KMTS1") == false) { 
 //BA.debugLineNum = 2661;BA.debugLine="Try";
try { //BA.debugLineNum = 2662;BA.debugLine="If validChars.Contains(New.SubString(New.Length";
if (_validchars.contains(_new.substring((int) (_new.length()-1)))==__c.False) { 
 //BA.debugLineNum = 2663;BA.debugLine="e_ruta.Text = New.SubString2(0, New.Length-1)";
_e_ruta.setText(BA.ObjectToCharSequence(_new.substring((int) (0),(int) (_new.length()-1))));
 //BA.debugLineNum = 2664;BA.debugLine="e_ruta.SelectionStart = e_ruta.Text.Length";
_e_ruta.setSelectionStart(_e_ruta.getText().length());
 };
 } 
       catch (Exception e9) {
			ba.setLastException(e9); //BA.debugLineNum = 2667;BA.debugLine="Log(LastException)";
__c.LogImpl("73932171",BA.ObjectToString(__c.LastException(ba)),0);
 };
 };
 //BA.debugLineNum = 2670;BA.debugLine="End Sub";
return "";
}
public String  _gettablecolumnlist(anywheresoftware.b4a.sql.SQL _db,String _table) throws Exception{
String _l = "";
int _i = 0;
 //BA.debugLineNum = 355;BA.debugLine="Sub getTableColumnList(db As SQL, table As String)";
 //BA.debugLineNum = 356;BA.debugLine="Private l As String = \"\"";
_l = "";
 //BA.debugLineNum = 357;BA.debugLine="If chkIfTableExists(db, table) Then";
if (_chkiftableexists(_db,_table)) { 
 //BA.debugLineNum = 358;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery($\"p";
_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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("pragma table_info("+__c.SmartStringFormatter("",(Object)(_table))+")"))));
 //BA.debugLineNum = 359;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 360;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step5 = 1;
final int limit5 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
 //BA.debugLineNum = 361;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 362;BA.debugLine="If l.Length = 0 Then";
if (_l.length()==0) { 
 //BA.debugLineNum = 363;BA.debugLine="l = $\"${c.GetString(\"name\")} ${c.GetString(\"t";
_l = (""+__c.SmartStringFormatter("",(Object)(_c.GetString("name")))+" "+__c.SmartStringFormatter("",(Object)(_c.GetString("type")))+"");
 }else {
 //BA.debugLineNum = 365;BA.debugLine="l = $\"${l}, ${c.GetString(\"name\")} ${c.GetStr";
_l = (""+__c.SmartStringFormatter("",(Object)(_l))+", "+__c.SmartStringFormatter("",(Object)(_c.GetString("name")))+" "+__c.SmartStringFormatter("",(Object)(_c.GetString("type")))+"");
 };
 }
};
 };
 }else {
 //BA.debugLineNum = 370;BA.debugLine="Return \"No existe la tabla.\"";
if (true) return "No existe la tabla.";
 };
 //BA.debugLineNum = 372;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 373;BA.debugLine="Return l";
if (true) return _l;
 //BA.debugLineNum = 374;BA.debugLine="End Sub";
return "";
}
public String  _gettablecolumnlistname(anywheresoftware.b4a.sql.SQL _db,String _table) throws Exception{
String _l = "";
int _i = 0;
 //BA.debugLineNum = 334;BA.debugLine="Sub getTableColumnListName(db As SQL, table As Str";
 //BA.debugLineNum = 335;BA.debugLine="Private l As String = \"\"";
_l = "";
 //BA.debugLineNum = 336;BA.debugLine="If chkIfTableExists(db, table) Then";
if (_chkiftableexists(_db,_table)) { 
 //BA.debugLineNum = 337;BA.debugLine="Private c As Cursor = Starter.skmt.ExecQuery($\"p";
_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)(_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("pragma table_info("+__c.SmartStringFormatter("",(Object)(_table))+")"))));
 //BA.debugLineNum = 338;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 339;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step5 = 1;
final int limit5 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
 //BA.debugLineNum = 340;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 341;BA.debugLine="If l.Length = 0 Then";
if (_l.length()==0) { 
 //BA.debugLineNum = 342;BA.debugLine="l = $\"${c.GetString(\"name\")}\"$";
_l = (""+__c.SmartStringFormatter("",(Object)(_c.GetString("name")))+"");
 }else {
 //BA.debugLineNum = 344;BA.debugLine="l = $\"${l}, ${c.GetString(\"name\")}\"$";
_l = (""+__c.SmartStringFormatter("",(Object)(_l))+", "+__c.SmartStringFormatter("",(Object)(_c.GetString("name")))+"");
 };
 }
};
 };
 }else {
 //BA.debugLineNum = 349;BA.debugLine="Return \"No existe la tabla.\"";
if (true) return "No existe la tabla.";
 };
 //BA.debugLineNum = 351;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 352;BA.debugLine="Return l";
if (true) return _l;
 //BA.debugLineNum = 353;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 2643;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 2645;BA.debugLine="End Sub";
return "";
}
public String  _hacer_ped_click() throws Exception{
 //BA.debugLineNum = 2631;BA.debugLine="Sub hacer_ped_Click";
 //BA.debugLineNum = 2632;BA.debugLine="B4XPages.ShowPage(\"Clientes\")";
_b4xpages._showpage /*String*/ (ba,"Clientes");
 //BA.debugLineNum = 2633;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 237;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 238;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 239;BA.debugLine="End Sub";
return null;
}
public String  _inv_click() throws Exception{
 //BA.debugLineNum = 2241;BA.debugLine="Sub inv_Click";
 //BA.debugLineNum = 2242;BA.debugLine="img2.Visible =True";
_img2.setVisible(__c.True);
 //BA.debugLineNum = 2243;BA.debugLine="EJECUTANDO = 1";
_ejecutando = BA.NumberToString(1);
 //BA.debugLineNum = 2244;BA.debugLine="inve = 1";
_inve = BA.NumberToString(1);
 //BA.debugLineNum = 2245;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2246;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod2");
 //BA.debugLineNum = 2247;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2248;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
 //BA.debugLineNum = 2249;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2250;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 2251;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2252;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2253;BA.debugLine="cmd.Name = \"select_cat_guna_productos_MEDICOMED_V";
_cmd.Name /*String*/  = "select_cat_guna_productos_MEDICOMED_V2";
 //BA.debugLineNum = 2254;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 2255;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprod\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprod"));
 //BA.debugLineNum = 2256;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2257;BA.debugLine="cmd.Name = \"select_cat_paquetes_MEDI3_V2\"";
_cmd.Name /*String*/  = "select_cat_paquetes_MEDI3_V2";
 //BA.debugLineNum = 2258;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN)";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen)};
 //BA.debugLineNum = 2259;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"gunaprodp\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("gunaprodp"));
 //BA.debugLineNum = 2266;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 2267;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 2268;BA.debugLine="connecta.Visible = True";
_connecta.setVisible(__c.True);
 //BA.debugLineNum = 2269;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 2270;BA.debugLine="ToastMessageShow(\"Se Actualizaran los datos, Este";
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias"),__c.True);
 //BA.debugLineNum = 2271;BA.debugLine="End Sub";
return "";
}
public String  _iv_abordo_click() throws Exception{
 //BA.debugLineNum = 2901;BA.debugLine="Private Sub iv_abordo_Click";
 //BA.debugLineNum = 2902;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUENTAA\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 2903;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CUENTAA V";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("0")}));
 //BA.debugLineNum = 2904;BA.debugLine="B4XPages.MainPage.tipo_venta = \"ABORDO\"";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._tipo_venta /*String*/  = "ABORDO";
 //BA.debugLineNum = 2905;BA.debugLine="B4XPages.ShowPage(\"Productos\")";
_b4xpages._showpage /*String*/ (ba,"Productos");
 //BA.debugLineNum = 2906;BA.debugLine="End Sub";
return "";
}
public String  _iv_productos_click() throws Exception{
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
 //BA.debugLineNum = 2725;BA.debugLine="Private Sub iv_productos_Click";
 //BA.debugLineNum = 2726;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2727;BA.debugLine="label1 = lv_prod_Prin.SingleLineLayout.Label";
_label1 = _lv_prod_prin.getSingleLineLayout().Label;
 //BA.debugLineNum = 2728;BA.debugLine="label1.TextSize = 14";
_label1.setTextSize((float) (14));
 //BA.debugLineNum = 2729;BA.debugLine="p_prod.Width = Root.Width";
_p_prod.setWidth(_root.getWidth());
 //BA.debugLineNum = 2730;BA.debugLine="p_prod.Height = Root.Height";
_p_prod.setHeight(_root.getHeight());
 //BA.debugLineNum = 2731;BA.debugLine="b_regreso.Left = (p_prod.Width - b_regreso.Width)";
_b_regreso.setLeft((int) ((_p_prod.getWidth()-_b_regreso.getWidth())/(double)2));
 //BA.debugLineNum = 2732;BA.debugLine="b_regreso.Top = p_prod.Height - b_regreso.Height";
_b_regreso.setTop((int) (_p_prod.getHeight()-_b_regreso.getHeight()));
 //BA.debugLineNum = 2734;BA.debugLine="p_prod.Visible = True";
_p_prod.setVisible(__c.True);
 //BA.debugLineNum = 2735;BA.debugLine="p_prod.BringToFront";
_p_prod.BringToFront();
 //BA.debugLineNum = 2736;BA.debugLine="MostrarProductos";
_mostrarproductos();
 //BA.debugLineNum = 2737;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(medicomed.keymon.com.mx.httpjob _job) throws Exception{
medicomed.keymon.com.mx.dbrequestmanager._dbresult _result = null;
Object[] _records = null;
String _k = "";
String _n = "";
String _giro = "";
String _cat_cl_codigo = "";
String _cat_cl_ruta = "";
String _cat_cl_nombre = "";
String _cat_cl_atiende1 = "";
String _cat_cl_atiente2 = "";
String _cat_cl_telefono = "";
String _cat_cl_email = "";
String _cat_cl_calle = "";
String _cat_cl_noext = "";
String _cat_cl_noint = "";
String _cat_cl_calle1 = "";
String _cat_cl_calle2 = "";
String _cat_cl_colonia = "";
String _cat_cl_muni = "";
String _cat_cl_edo = "";
String _cat_cl_cp = "";
String _cat_cl_long = "";
String _cat_cl_lat = "";
String _cat_cl_mtocompra = "";
String _cat_cl_num_seriefisico = "";
String _cat_cl_bcredito = "";
String _cat_cl_limitecredito = "";
medicomed.keymon.com.mx.dbrequestmanager._dbresult _resultado = null;
int _piezasexiste = 0;
String _pcnoarts = "";
String _pcmonto = "";
String _hist_ra_objmes = "";
String _hist_ra_venta = "";
String _hist_ra_tendencia = "";
String _hist_ra_alcance = "";
String _hisr_ra_draobj = "";
String _hist_ra_dravta = "";
String _hist_ra_dsobj = "";
String _hist_ra_dsvta = "";
String _hist_ra_vpoobj = "";
String _hist_ra_vpovta = "";
String _hist_ra_ctes = "";
String _hist_ra_cobccc = "";
String _hist_ra_eco = "";
String _hist_ra_visitplan = "";
String _hist_ra_visireal = "";
String _hist_ra_cobvisit = "";
String _hist_ra_freccompobj = "";
String _hist_ra_freccomreal = "";
String _hist_ra_ventames1 = "";
String _hist_ra_ventames2 = "";
String _hist_ra_ventames3 = "";
String _hist_ra_ventames4 = "";
String _hist_ra_rechazo = "";
String _hist_ra_rechazoporcen = "";
String _hist_ra_semana1 = "";
String _hist_ra_semana1_dias = "";
String _hist_ra_semana1_dra = "";
String _hist_ra_semana2 = "";
String _hist_ra_semana2_dias = "";
String _hist_ra_semana2_dra = "";
String _hist_ra_semana3 = "";
String _hist_ra_semana3_dias = "";
String _hist_ra_semana3_dra = "";
String _hist_ra_semana4 = "";
String _hist_ra_semana4_dias = "";
String _hist_ra_semana4_dra = "";
String _hist_ra_semana5 = "";
String _hist_ra_semana5_dias = "";
String _hist_ra_semana5_dra = "";
String _hist_ra_semana1_lpt = "";
String _hist_ra_semana2_lpt = "";
String _hist_ra_semana3_lpt = "";
String _hist_ra_semana4_lpt = "";
String _hist_ra_semana5_lpt = "";
String _hist_ra_ruta = "";
String _hist_ra_idalmacen = "";
String _hp_cliente = "";
String _hp_codigo_promocion = "";
String _marcas = "";
String _hccp_cliente = "";
String _hccp_promo = "";
String _hccp_cant = "";
String _hmc_marca = "";
String _hmc_total = "";
String _cat_pa_id = "";
String _cat_pa_maxprom = "";
String _cat_pa_maxpromrec = "";
String _cat_pa_maxpromclie = "";
String _cat_ve_idprod = "";
String _cat_ve_nombre = "";
String _cat_ve_orden = "";
String _hvd_marca = "";
String _clientes = "";
String _hc_ruta = "";
String _hc_cuota1 = "";
String _hc_cuota2 = "";
String _hc_cuota3 = "";
String _hc_cuota4 = "";
String _hc_cuota5 = "";
String _hc_cuota6 = "";
String _hc_meta1 = "";
String _hc_meta2 = "";
String _hc_meta3 = "";
String _hc_meta4 = "";
String _hc_meta5 = "";
String _hc_meta6 = "";
String _hcm_total_v = "";
String _hcm_total_vive = "";
String _hcm_total_guna = "";
String _hcm_total_beb = "";
String _cat_gp_id = "";
String _cat_gp_nombre = "";
String _cat_gp_imp1 = "";
String _cat_gp_imp2 = "";
String _cat_gp_precio = "";
String _cat_gp_clasif = "";
String _cat_gp_sts = "";
String _cat_gp_tipo = "";
String _cat_gp_subtipo = "";
byte[] _cat_gp_img = null;
int _cat_gp_almacen = 0;
int _cat_gp_tipoprod = 0;
int _cat_gp_iniciativa = 0;
float _cat_dp_precio4 = 0f;
int _cat_dp_conversion1 = 0;
String _cat_dp_almacen = "";
String _cat_dp_id = "";
String _cat_dp_idprod = "";
String _cat_dp_tipo = "";
String _cat_dp_pzas = "";
String _cat_dp_usuario = "";
String _cat_dp_fecha = "";
String _cat_dp_regalo = "";
String _cat_dp_clasif = "";
String _cat_dp_precio = "";
String _cat_dp_precio_simptos = "";
String _hvd_cliente = "";
String _hvd_pronombre = "";
String _hvd_cant = "";
String _hvd_costo_tot = "";
String _cat_va_descripcion = "";
String _cat_va_valor = "";
int _cuantosp = 0;
int _cuantosc = 0;
int _cuantosn = 0;
String _cat_ve_version = "";
String _valido = "";
String _name2 = "";
String _fecha_hoy = "";
String _folio = "";
String _idcliente = "";
 //BA.debugLineNum = 1145;BA.debugLine="Sub JobDone(Job As HttpJob)";
 //BA.debugLineNum = 1146;BA.debugLine="Log(\"JOBDONE PRINCIPAL\")";
__c.LogImpl("72555905","JOBDONE PRINCIPAL",0);
 //BA.debugLineNum = 1147;BA.debugLine="If reqManager.reqsList.IsInitialized Then 'Si ten";
if (_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ .IsInitialized()) { 
 //BA.debugLineNum = 1148;BA.debugLine="If reqManager.reqsList.IndexOf(Job.tag) <> -1 Th";
if (_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ .IndexOf(_job._tag /*Object*/ )!=-1) { 
 //BA.debugLineNum = 1149;BA.debugLine="reqManager.reqsList.RemoveAt(reqManager.reqsLis";
_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ .RemoveAt(_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ .IndexOf(_job._tag /*Object*/ ));
 //BA.debugLineNum = 1150;BA.debugLine="LogColor($\">>>>>> Quitamos ${Job.tag}\"$, Colors";
__c.LogImpl("72555909",(">>>>>> Quitamos "+__c.SmartStringFormatter("",_job._tag /*Object*/ )+""),__c.Colors.Blue);
 };
 //BA.debugLineNum = 1152;BA.debugLine="LogColor(\">>>>>> \" & reqManager.reqsList.Size &";
__c.LogImpl("72555911",">>>>>> "+BA.NumberToString(_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ .getSize())+" - "+BA.ObjectToString(_reqmanager._reqslist /*anywheresoftware.b4a.objects.collections.List*/ ),__c.Colors.Blue);
 };
 //BA.debugLineNum = 1154;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
 //BA.debugLineNum = 1155;BA.debugLine="Log(\"ERROR\")";
__c.LogImpl("72555914","ERROR",0);
 //BA.debugLineNum = 1156;BA.debugLine="LogColor(\"Error: \" & reqManager.HandleJob(Job).t";
__c.LogImpl("72555915","Error: "+BA.ObjectToString(_reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+" : "+_job._errormessage /*String*/ ,__c.Colors.Red);
 //BA.debugLineNum = 1157;BA.debugLine="Log(\"ex\")";
__c.LogImpl("72555916","ex",0);
 //BA.debugLineNum = 1158;BA.debugLine="Log(2)";
__c.LogImpl("72555917",BA.NumberToString(2),0);
 }else {
 //BA.debugLineNum = 1162;BA.debugLine="Log(3)";
__c.LogImpl("72555921",BA.NumberToString(3),0);
 //BA.debugLineNum = 1163;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job";
__c.LogImpl("72555922","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.RGB((int) (0),(int) (160),(int) (0)));
 //BA.debugLineNum = 1165;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1166;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1167;BA.debugLine="If RESULT.Tag = \"update_gps\" Then";
if ((_result.Tag /*Object*/ ).equals((Object)("update_gps"))) { 
 //BA.debugLineNum = 1168;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group20 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen20 = group20.getSize()
;int index20 = 0;
;
for (; index20 < groupLen20;index20++){
_records = (Object[])(group20.Get(index20));
 //BA.debugLineNum = 1169;BA.debugLine="Log(\"==========================REGISTROS=\"&RE";
__c.LogImpl("72555928","==========================REGISTROS="+BA.ObjectToString(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ),0);
 //BA.debugLineNum = 1170;BA.debugLine="For Each k As String In RESULT.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group22 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen22 = group22.getSize()
;int index22 = 0;
;
for (; index22 < groupLen22;index22++){
_k = BA.ObjectToString(group22.Get(index22));
 //BA.debugLineNum = 1171;BA.debugLine="Log(RESULT.Tag & \": \" & k & \": \" & records(R";
__c.LogImpl("72555930",BA.ObjectToString(_result.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 //BA.debugLineNum = 1175;BA.debugLine="If RESULT.Tag = \"ins_pedidos\" Then";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedidos"))) { 
 //BA.debugLineNum = 1176;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group28 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen28 = group28.getSize()
;int index28 = 0;
;
for (; index28 < groupLen28;index28++){
_records = (Object[])(group28.Get(index28));
 //BA.debugLineNum = 1177;BA.debugLine="Log(\"==========================REGISTROS=\"&RE";
__c.LogImpl("72555936","==========================REGISTROS="+BA.ObjectToString(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ),0);
 //BA.debugLineNum = 1178;BA.debugLine="For Each k As String In RESULT.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group30 = _result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen30 = group30.getSize()
;int index30 = 0;
;
for (; index30 < groupLen30;index30++){
_k = BA.ObjectToString(group30.Get(index30));
 //BA.debugLineNum = 1179;BA.debugLine="Log(RESULT.Tag & \": \" & k & \": \" & records(R";
__c.LogImpl("72555938",BA.ObjectToString(_result.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 //BA.debugLineNum = 1183;BA.debugLine="If RESULT.Tag = \"usuarioA\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuarioA"))) { 
 //BA.debugLineNum = 1184;BA.debugLine="Private n As String = \"Sin Usuario\"";
_n = "Sin Usuario";
 //BA.debugLineNum = 1185;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group37 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen37 = group37.getSize()
;int index37 = 0;
;
for (; index37 < groupLen37;index37++){
_records = (Object[])(group37.Get(index37));
 //BA.debugLineNum = 1186;BA.debugLine="n = records(RESULT.Columns.Get(\"USUARIO\"))";
_n = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("USUARIO"))))]);
 }
};
 //BA.debugLineNum = 1188;BA.debugLine="LogColor(\"**************************\"&n, Color";
__c.LogImpl("72555947","**************************"+_n,__c.Colors.Green);
 //BA.debugLineNum = 1189;BA.debugLine="If n = \"OKActivo\"  Then";
if ((_n).equals("OKActivo")) { 
 //BA.debugLineNum = 1190;BA.debugLine="Log(\"Usuario guardado en BD es 'Valido'\")";
__c.LogImpl("72555949","Usuario guardado en BD es 'Valido'",0);
 }else if((_n).equals("OKExpirado")) { 
 //BA.debugLineNum = 1192;BA.debugLine="Msgbox(\"Usuario Expirado llamar al administra";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Expirado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 //BA.debugLineNum = 1193;BA.debugLine="B4XPages.ShowPage(\"B4XMainPage\")";
_b4xpages._showpage /*String*/ (ba,"B4XMainPage");
 }else if((_n).equals("OKCancelado")) { 
 //BA.debugLineNum = 1195;BA.debugLine="Msgbox(\"Usuario Cancelado llamar al administr";
__c.Msgbox(BA.ObjectToCharSequence("Usuario Cancelado llamar al administrador"),BA.ObjectToCharSequence(""),ba);
 //BA.debugLineNum = 1196;BA.debugLine="B4XPages.ShowPage(\"B4XMainPage\")";
_b4xpages._showpage /*String*/ (ba,"B4XMainPage");
 }else {
 //BA.debugLineNum = 1198;BA.debugLine="Msgbox(\"Usuario o password No validos\",\"\") 'i";
__c.Msgbox(BA.ObjectToCharSequence("Usuario o password No validos"),BA.ObjectToCharSequence(""),ba);
 //BA.debugLineNum = 1199;BA.debugLine="B4XPages.ShowPage(\"B4XMainPage\")";
_b4xpages._showpage /*String*/ (ba,"B4XMainPage");
 };
 //BA.debugLineNum = 1201;BA.debugLine="Log(\"*****************  \"&n)";
__c.LogImpl("72555960","*****************  "+_n,0);
 };
 };
 //BA.debugLineNum = 1205;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1206;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1207;BA.debugLine="If RESULT.Tag = \"giro\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("giro"))) { 
 //BA.debugLineNum = 1208;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group59 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen59 = group59.getSize()
;int index59 = 0;
;
for (; index59 < groupLen59;index59++){
_records = (Object[])(group59.Get(index59));
 //BA.debugLineNum = 1209;BA.debugLine="Dim giro  As String = records(RESULT.Columns.";
_giro = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GR_DESC"))))]);
 //BA.debugLineNum = 1211;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CAT_G";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GIRO(GIRO) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_giro)}));
 }
};
 //BA.debugLineNum = 1213;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 1214;BA.debugLine="PB2.Progress = 30";
_pb2.setProgress((int) (30));
 //BA.debugLineNum = 1215;BA.debugLine="S_CP.Text = \"CARGANDO\"";
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb2.getProgress()==30) { 
 //BA.debugLineNum = 1217;BA.debugLine="PB2.Progress = 60";
_pb2.setProgress((int) (60));
 }else if(_pb2.getProgress()==60) { 
 //BA.debugLineNum = 1219;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1220;BA.debugLine="S_CP.Text = \"LISTO\"";
_s_cp.setText(BA.ObjectToCharSequence("LISTO"));
 };
 //BA.debugLineNum = 1222;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1223;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1224;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1225;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1226;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1228;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1229;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1230;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1236;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1237;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1238;BA.debugLine="If RESULT.Tag = \"kmt_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("kmt_datos"))) { 
 //BA.debugLineNum = 1239;BA.debugLine="S_CC.TEXT = \"CARGANDO\"";
_s_cc.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1240;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group88 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen88 = group88.getSize()
;int index88 = 0;
;
for (; index88 < groupLen88;index88++){
_records = (Object[])(group88.Get(index88));
 //BA.debugLineNum = 1241;BA.debugLine="Dim CAT_CL_CODIGO As String = records(RESULT.";
_cat_cl_codigo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CODIGO"))))]);
 //BA.debugLineNum = 1242;BA.debugLine="Dim CAT_CL_RUTA As String = records(RESULT.Co";
_cat_cl_ruta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_RUTA"))))]);
 //BA.debugLineNum = 1243;BA.debugLine="Dim CAT_CL_NOMBRE As String = records(RESULT.";
_cat_cl_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOMBRE"))))]);
 //BA.debugLineNum = 1244;BA.debugLine="Dim CAT_CL_ATIENDE1 As String = records(RESUL";
_cat_cl_atiende1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_ATIENDE1"))))]);
 //BA.debugLineNum = 1245;BA.debugLine="Dim CAT_CL_ATIENTE2 As String = records(RESUL";
_cat_cl_atiente2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_ATIENTE2"))))]);
 //BA.debugLineNum = 1246;BA.debugLine="Dim CAT_CL_TELEFONO As String = records(RESUL";
_cat_cl_telefono = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_TELEFONO"))))]);
 //BA.debugLineNum = 1247;BA.debugLine="Dim CAT_CL_EMAIL As String = records(RESULT.C";
_cat_cl_email = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_EMAIL"))))]);
 //BA.debugLineNum = 1248;BA.debugLine="Dim CAT_CL_CALLE As String = records(RESULT.C";
_cat_cl_calle = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE"))))]);
 //BA.debugLineNum = 1249;BA.debugLine="Dim CAT_CL_NOEXT As String = records(RESULT.C";
_cat_cl_noext = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOEXT"))))]);
 //BA.debugLineNum = 1250;BA.debugLine="Dim CAT_CL_NOINT As String = records(RESULT.C";
_cat_cl_noint = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NOINT"))))]);
 //BA.debugLineNum = 1251;BA.debugLine="Dim CAT_CL_CALLE1 As String = records(RESULT.";
_cat_cl_calle1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE1"))))]);
 //BA.debugLineNum = 1252;BA.debugLine="Dim CAT_CL_CALLE2 As String = records(RESULT.";
_cat_cl_calle2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CALLE2"))))]);
 //BA.debugLineNum = 1253;BA.debugLine="Dim CAT_CL_COLONIA As String = records(RESULT";
_cat_cl_colonia = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_COLONIA"))))]);
 //BA.debugLineNum = 1254;BA.debugLine="Dim CAT_CL_MUNI As String = records(RESULT.Co";
_cat_cl_muni = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_MUNI"))))]);
 //BA.debugLineNum = 1255;BA.debugLine="Dim CAT_CL_EDO As String = records(RESULT.Col";
_cat_cl_edo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_EDO"))))]);
 //BA.debugLineNum = 1256;BA.debugLine="Dim CAT_CL_CP As String = records(RESULT.Colu";
_cat_cl_cp = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_CP"))))]);
 //BA.debugLineNum = 1257;BA.debugLine="Dim CAT_CL_LONG As String = records(RESULT.Co";
_cat_cl_long = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_LONG"))))]);
 //BA.debugLineNum = 1258;BA.debugLine="Dim CAT_CL_LAT As String = records(RESULT.Col";
_cat_cl_lat = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_LAT"))))]);
 //BA.debugLineNum = 1259;BA.debugLine="Dim CAT_CL_MTOCOMPRA As String = records(RESU";
_cat_cl_mtocompra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_MTOCOMPRA"))))]);
 //BA.debugLineNum = 1260;BA.debugLine="Dim CAT_CL_NUM_SERIEFISICO As String = record";
_cat_cl_num_seriefisico = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_NUM_SERIEFISICO"))))]);
 //BA.debugLineNum = 1261;BA.debugLine="Dim CAT_CL_BCREDITO As String = records(RESUL";
_cat_cl_bcredito = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_BCREDITO"))))]);
 //BA.debugLineNum = 1262;BA.debugLine="Dim CAT_CL_LIMITECREDITO As String = records(";
_cat_cl_limitecredito = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_CL_LIMITECREDITO"))))]);
 //BA.debugLineNum = 1263;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO, CAT_CL_BCREDITO, CAT_CL_LIMITECREDITO, gestion) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ,?,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_cl_codigo),(Object)(_cat_cl_ruta),(Object)(_cat_cl_nombre),(Object)(_cat_cl_atiende1),(Object)(_cat_cl_atiente2),(Object)(_cat_cl_telefono),(Object)(_cat_cl_email),(Object)(_cat_cl_calle),(Object)(_cat_cl_noext),(Object)(_cat_cl_noint),(Object)(_cat_cl_calle1),(Object)(_cat_cl_calle2),(Object)(_cat_cl_colonia),(Object)(_cat_cl_muni),(Object)(_cat_cl_edo),(Object)(_cat_cl_cp),(Object)(_cat_cl_long),(Object)(_cat_cl_lat),(Object)(_cat_cl_mtocompra),(Object)(_cat_cl_num_seriefisico),(Object)(_cat_cl_bcredito),(Object)(_cat_cl_limitecredito)}));
 //BA.debugLineNum = 1264;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO,  HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_cl_codigo)}));
 }
};
 //BA.debugLineNum = 1266;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO kmt_in";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO, gestion) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,0,0) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("0"),(Object)(_e_ruta.getText()),(Object)("VENTA ABORDO"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("NULL"),(Object)("null"),(Object)("NULL")}));
 //BA.debugLineNum = 1267;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO kmt_in";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO, gestion) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,0,0) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("1"),(Object)(_e_ruta.getText()),(Object)("VENTA RECARGA"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("null"),(Object)("NULL"),(Object)("null"),(Object)("NULL")}));
 //BA.debugLineNum = 1268;BA.debugLine="Listo1 = 1";
_listo1 = BA.NumberToString(1);
 //BA.debugLineNum = 1269;BA.debugLine="S_CC.Text = \"LISTO\"";
_s_cc.setText(BA.ObjectToCharSequence("LISTO"));
 //BA.debugLineNum = 1270;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Catalogo Clientes Actualizados."),__c.True);};
 //BA.debugLineNum = 1271;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1272;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1273;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1274;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1279;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1280;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo";
_resultado = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1281;BA.debugLine="If resultado.Tag = \"piezas\" Then 'query tag";
if ((_resultado.Tag /*Object*/ ).equals((Object)("piezas"))) { 
 //BA.debugLineNum = 1283;BA.debugLine="Dim piezasexiste As Int";
_piezasexiste = 0;
 //BA.debugLineNum = 1285;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group130 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen130 = group130.getSize()
;int index130 = 0;
;
for (; index130 < groupLen130;index130++){
_records = (Object[])(group130.Get(index130));
 //BA.debugLineNum = 1287;BA.debugLine="piezasexiste = records(resultado.Columns.Get(";
_piezasexiste = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("COUNT(*)"))))]));
 //BA.debugLineNum = 1288;BA.debugLine="Log(piezasexiste)";
__c.LogImpl("72556047",BA.NumberToString(_piezasexiste),0);
 //BA.debugLineNum = 1289;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 1290;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 1291;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 1292;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 1294;BA.debugLine="If piezasexiste =  0 Then";
if (_piezasexiste==0) { 
 //BA.debugLineNum = 1296;BA.debugLine="Dim PCNoArts As String";
_pcnoarts = "";
 //BA.debugLineNum = 1297;BA.debugLine="Dim PCMonto As String";
_pcmonto = "";
 //BA.debugLineNum = 1298;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery2(\"SELEC";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("SELECT * FROM PEDIDO_CLIENTE WHERE PC_CLIENTE = ? AND PC_CLIENTE <> 1",new String[]{_userpiezas})));
 //BA.debugLineNum = 1300;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 1301;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 1302;BA.debugLine="PCNoArts = c.GetString(\"PC_NOART\")";
_pcnoarts = _c.GetString("PC_NOART");
 //BA.debugLineNum = 1303;BA.debugLine="PCMonto = c.GetString(\"PC_MONTO\")";
_pcmonto = _c.GetString("PC_MONTO");
 };
 };
 }
};
 };
 };
 //BA.debugLineNum = 1398;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1399;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1400;BA.debugLine="If RESULT.Tag = \"resum_apk\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("resum_apk"))) { 
 //BA.debugLineNum = 1401;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group153 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen153 = group153.getSize()
;int index153 = 0;
;
for (; index153 < groupLen153;index153++){
_records = (Object[])(group153.Get(index153));
 //BA.debugLineNum = 1402;BA.debugLine="Dim HIST_RA_OBJMES As String = records(RESULT";
_hist_ra_objmes = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_OBJMES"))))]);
 //BA.debugLineNum = 1403;BA.debugLine="Dim HIST_RA_VENTA As String = records(RESULT.";
_hist_ra_venta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VENTA"))))]);
 //BA.debugLineNum = 1404;BA.debugLine="Dim HIST_RA_TENDENCIA As String = records(RES";
_hist_ra_tendencia = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_TENDENCIA"))))]);
 //BA.debugLineNum = 1405;BA.debugLine="Dim HIST_RA_ALCANCE As String = records(RESUL";
_hist_ra_alcance = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_ALCANCE"))))]);
 //BA.debugLineNum = 1406;BA.debugLine="Dim HISR_RA_DRAOBJ As String = records(RESULT";
_hisr_ra_draobj = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HISR_RA_DRAOBJ"))))]);
 //BA.debugLineNum = 1407;BA.debugLine="Dim HIST_RA_DRAVTA As String = records(RESULT";
_hist_ra_dravta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_DRAVTA"))))]);
 //BA.debugLineNum = 1408;BA.debugLine="Dim HIST_RA_DSOBJ As String = records(RESULT.";
_hist_ra_dsobj = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_DSOBJ"))))]);
 //BA.debugLineNum = 1409;BA.debugLine="Dim HIST_RA_DSVTA As String = records(RESULT.";
_hist_ra_dsvta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_DSVTA"))))]);
 //BA.debugLineNum = 1410;BA.debugLine="Dim HIST_RA_VPOOBJ As String = records(RESULT";
_hist_ra_vpoobj = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VPOOBJ"))))]);
 //BA.debugLineNum = 1411;BA.debugLine="Dim HIST_RA_VPOVTA As String = records(RESULT";
_hist_ra_vpovta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VPOVTA"))))]);
 //BA.debugLineNum = 1412;BA.debugLine="Dim HIST_RA_CTES As String = records(RESULT.C";
_hist_ra_ctes = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_CTES"))))]);
 //BA.debugLineNum = 1413;BA.debugLine="Dim HIST_RA_COBCCC As String = records(RESULT";
_hist_ra_cobccc = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_COBCCC"))))]);
 //BA.debugLineNum = 1414;BA.debugLine="Dim HIST_RA_ECO As String = records(RESULT.Co";
_hist_ra_eco = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_ECO"))))]);
 //BA.debugLineNum = 1415;BA.debugLine="Dim HIST_RA_VISITPLAN As String = records(RES";
_hist_ra_visitplan = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VISITPLAN"))))]);
 //BA.debugLineNum = 1416;BA.debugLine="Dim HIST_RA_VISIREAL As String = records(RESU";
_hist_ra_visireal = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VISIREAL"))))]);
 //BA.debugLineNum = 1417;BA.debugLine="Dim HIST_RA_COBVISIT As String = records(RESU";
_hist_ra_cobvisit = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_COBVISIT"))))]);
 //BA.debugLineNum = 1418;BA.debugLine="Dim HIST_RA_FRECCOMPOBJ As String = records(R";
_hist_ra_freccompobj = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_FRECCOMPOBJ"))))]);
 //BA.debugLineNum = 1419;BA.debugLine="Dim HIST_RA_FRECCOMREAL As String = records(R";
_hist_ra_freccomreal = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_FRECCOMREAL"))))]);
 //BA.debugLineNum = 1420;BA.debugLine="Dim HIST_RA_VENTAMES1 As String = records(RES";
_hist_ra_ventames1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VENTAMES1"))))]);
 //BA.debugLineNum = 1421;BA.debugLine="Dim HIST_RA_VENTAMES2 As String = records(RES";
_hist_ra_ventames2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VENTAMES2"))))]);
 //BA.debugLineNum = 1422;BA.debugLine="Dim HIST_RA_VENTAMES3 As String = records(RES";
_hist_ra_ventames3 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VENTAMES3"))))]);
 //BA.debugLineNum = 1423;BA.debugLine="Dim HIST_RA_VENTAMES4 As String = records(RES";
_hist_ra_ventames4 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_VENTAMES4"))))]);
 //BA.debugLineNum = 1424;BA.debugLine="Dim HIST_RA_RECHAZO As String = records(RESUL";
_hist_ra_rechazo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_RECHAZO"))))]);
 //BA.debugLineNum = 1425;BA.debugLine="Dim HIST_RA_RECHAZOPORCEN As String = records";
_hist_ra_rechazoporcen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_RECHAZOPORCEN"))))]);
 //BA.debugLineNum = 1426;BA.debugLine="Dim HIST_RA_SEMANA1 As String = records(RESUL";
_hist_ra_semana1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA1"))))]);
 //BA.debugLineNum = 1427;BA.debugLine="Dim HIST_RA_SEMANA1_DIAS As String = records(";
_hist_ra_semana1_dias = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA1_DIAS"))))]);
 //BA.debugLineNum = 1428;BA.debugLine="Dim HIST_RA_SEMANA1_DRA As String = records(R";
_hist_ra_semana1_dra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA1_DRA"))))]);
 //BA.debugLineNum = 1429;BA.debugLine="Dim HIST_RA_SEMANA2 As String = records(RESUL";
_hist_ra_semana2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA2"))))]);
 //BA.debugLineNum = 1430;BA.debugLine="Dim HIST_RA_SEMANA2_DIAS As String = records(";
_hist_ra_semana2_dias = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA2_DIAS"))))]);
 //BA.debugLineNum = 1431;BA.debugLine="Dim HIST_RA_SEMANA2_DRA As String = records(R";
_hist_ra_semana2_dra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA2_DRA"))))]);
 //BA.debugLineNum = 1432;BA.debugLine="Dim HIST_RA_SEMANA3 As String = records(RESUL";
_hist_ra_semana3 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA3"))))]);
 //BA.debugLineNum = 1433;BA.debugLine="Dim HIST_RA_SEMANA3_DIAS As String = records(";
_hist_ra_semana3_dias = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA3_DIAS"))))]);
 //BA.debugLineNum = 1434;BA.debugLine="Dim HIST_RA_SEMANA3_DRA As String = records(R";
_hist_ra_semana3_dra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA3_DRA"))))]);
 //BA.debugLineNum = 1435;BA.debugLine="Dim HIST_RA_SEMANA4 As String = records(RESUL";
_hist_ra_semana4 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA4"))))]);
 //BA.debugLineNum = 1436;BA.debugLine="Dim HIST_RA_SEMANA4_DIAS As String = records(";
_hist_ra_semana4_dias = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA4_DIAS"))))]);
 //BA.debugLineNum = 1437;BA.debugLine="Dim HIST_RA_SEMANA4_DRA As String = records(R";
_hist_ra_semana4_dra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA4_DRA"))))]);
 //BA.debugLineNum = 1438;BA.debugLine="Dim HIST_RA_SEMANA5 As String = records(RESUL";
_hist_ra_semana5 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA5"))))]);
 //BA.debugLineNum = 1439;BA.debugLine="Dim HIST_RA_SEMANA5_DIAS As String = records(";
_hist_ra_semana5_dias = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA5_DIAS"))))]);
 //BA.debugLineNum = 1440;BA.debugLine="Dim HIST_RA_SEMANA5_DRA As String = records(R";
_hist_ra_semana5_dra = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA5_DRA"))))]);
 //BA.debugLineNum = 1441;BA.debugLine="Dim HIST_RA_SEMANA1_LPT As String = records(R";
_hist_ra_semana1_lpt = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA1_LPT"))))]);
 //BA.debugLineNum = 1442;BA.debugLine="Dim HIST_RA_SEMANA2_LPT As String = records(R";
_hist_ra_semana2_lpt = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA2_LPT"))))]);
 //BA.debugLineNum = 1443;BA.debugLine="Dim HIST_RA_SEMANA3_LPT As String = records(R";
_hist_ra_semana3_lpt = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA3_LPT"))))]);
 //BA.debugLineNum = 1444;BA.debugLine="Dim HIST_RA_SEMANA4_LPT As String = records(R";
_hist_ra_semana4_lpt = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA4_LPT"))))]);
 //BA.debugLineNum = 1445;BA.debugLine="Dim HIST_RA_SEMANA5_LPT As String = records(R";
_hist_ra_semana5_lpt = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_SEMANA5_LPT"))))]);
 //BA.debugLineNum = 1446;BA.debugLine="Dim HIST_RA_RUTA As String = records(RESULT.C";
_hist_ra_ruta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_RUTA"))))]);
 //BA.debugLineNum = 1447;BA.debugLine="Dim HIST_RA_IDALMACEN As String = records(RES";
_hist_ra_idalmacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HIST_RA_IDALMACEN"))))]);
 //BA.debugLineNum = 1449;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_RESUM_APK(HIST_RA_OBJMES,HIST_RA_VENTA,HIST_RA_TENDENCIA,HIST_RA_ALCANCE,HISR_RA_DRAOBJ,HIST_RA_DRAVTA,HIST_RA_DSOBJ,HIST_RA_DSVTA,HIST_RA_VPOOBJ,HIST_RA_VPOVTA,HIST_RA_CTES,HIST_RA_COBCCC,HIST_RA_ECO,HIST_RA_VISITPLAN,HIST_RA_VISIREAL,HIST_RA_COBVISIT,HIST_RA_FRECCOMPOBJ,HIST_RA_FRECCOMREAL,HIST_RA_VENTAMES1,HIST_RA_VENTAMES2,HIST_RA_VENTAMES3,HIST_RA_VENTAMES4,HIST_RA_RECHAZO,HIST_RA_RECHAZOPORCEN,HIST_RA_SEMANA1,HIST_RA_SEMANA1_DIAS,HIST_RA_SEMANA1_DRA,HIST_RA_SEMANA2,HIST_RA_SEMANA2_DIAS,HIST_RA_SEMANA2_DRA,HIST_RA_SEMANA3,HIST_RA_SEMANA3_DIAS,HIST_RA_SEMANA3_DRA,HIST_RA_SEMANA4,HIST_RA_SEMANA4_DIAS,HIST_RA_SEMANA4_DRA,HIST_RA_SEMANA5,HIST_RA_SEMANA5_DIAS,HIST_RA_SEMANA5_DRA,HIST_RA_SEMANA1_LPT,HIST_RA_SEMANA2_LPT,HIST_RA_SEMANA3_LPT,HIST_RA_SEMANA4_LPT,HIST_RA_SEMANA5_LPT,HIST_RA_RUTA,HIST_RA_IDALMACEN) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hist_ra_objmes),(Object)(_hist_ra_venta),(Object)(_hist_ra_tendencia),(Object)(_hist_ra_alcance),(Object)(_hisr_ra_draobj),(Object)(_hist_ra_dravta),(Object)(_hist_ra_dsobj),(Object)(_hist_ra_dsvta),(Object)(_hist_ra_vpoobj),(Object)(_hist_ra_vpovta),(Object)(_hist_ra_ctes),(Object)(_hist_ra_cobccc),(Object)(_hist_ra_eco),(Object)(_hist_ra_visitplan),(Object)(_hist_ra_visireal),(Object)(_hist_ra_cobvisit),(Object)(_hist_ra_freccompobj),(Object)(_hist_ra_freccomreal),(Object)(_hist_ra_ventames1),(Object)(_hist_ra_ventames2),(Object)(_hist_ra_ventames3),(Object)(_hist_ra_ventames4),(Object)(_hist_ra_rechazo),(Object)(_hist_ra_rechazoporcen),(Object)(_hist_ra_semana1),(Object)(_hist_ra_semana1_dias),(Object)(_hist_ra_semana1_dra),(Object)(_hist_ra_semana2),(Object)(_hist_ra_semana2_dias),(Object)(_hist_ra_semana2_dra),(Object)(_hist_ra_semana3),(Object)(_hist_ra_semana3_dias),(Object)(_hist_ra_semana3_dra),(Object)(_hist_ra_semana4),(Object)(_hist_ra_semana4_dias),(Object)(_hist_ra_semana4_dra),(Object)(_hist_ra_semana5),(Object)(_hist_ra_semana5_dias),(Object)(_hist_ra_semana5_dra),(Object)(_hist_ra_semana1_lpt),(Object)(_hist_ra_semana2_lpt),(Object)(_hist_ra_semana3_lpt),(Object)(_hist_ra_semana4_lpt),(Object)(_hist_ra_semana5_lpt),(Object)(_hist_ra_ruta),(Object)(_hist_ra_idalmacen)}));
 }
};
 //BA.debugLineNum = 1452;BA.debugLine="Listo1 = 1";
_listo1 = BA.NumberToString(1);
 //BA.debugLineNum = 1453;BA.debugLine="S_CC.Text = \"LISTO\"";
_s_cc.setText(BA.ObjectToCharSequence("LISTO"));
 //BA.debugLineNum = 1454;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Catalogo Resumen Actualizado."),__c.True);};
 };
 };
 //BA.debugLineNum = 1458;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1459;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1460;BA.debugLine="If RESULT.Tag = \"hist_promos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_promos"))) { 
 //BA.debugLineNum = 1461;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group210 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen210 = group210.getSize()
;int index210 = 0;
;
for (; index210 < groupLen210;index210++){
_records = (Object[])(group210.Get(index210));
 //BA.debugLineNum = 1462;BA.debugLine="Dim HP_CLIENTE As String = records(RESULT.Col";
_hp_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HP_CLIENTE"))))]);
 //BA.debugLineNum = 1463;BA.debugLine="Dim HP_CODIGO_PROMOCION As String = records(R";
_hp_codigo_promocion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HP_CODIGO_PROMOCION"))))]);
 //BA.debugLineNum = 1464;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_PROMOS(HP_CLIENTE, HP_CODIGO_PROMOCION) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hp_cliente),(Object)(_hp_codigo_promocion)}));
 }
};
 //BA.debugLineNum = 1466;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Historico Promociones Actualizado."),__c.True);};
 //BA.debugLineNum = 1467;BA.debugLine="If PB1.Progress = 0 Then";
if (_pb1.getProgress()==0) { 
 //BA.debugLineNum = 1468;BA.debugLine="PB1.Progress = 30";
_pb1.setProgress((int) (30));
 //BA.debugLineNum = 1469;BA.debugLine="S_CH.Text = \"CARGANDO\"";
_s_ch.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb1.getProgress()==30) { 
 //BA.debugLineNum = 1471;BA.debugLine="PB1.Progress = 60";
_pb1.setProgress((int) (60));
 }else if(_pb1.getProgress()==60) { 
 //BA.debugLineNum = 1473;BA.debugLine="PB1.Progress = 100";
_pb1.setProgress((int) (100));
 //BA.debugLineNum = 1474;BA.debugLine="S_CH.Text = \"LISTO\"";
_s_ch.setText(BA.ObjectToCharSequence("LISTO"));
 };
 };
 //BA.debugLineNum = 1477;BA.debugLine="If RESULT.Tag = \"marcas\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("marcas"))) { 
 //BA.debugLineNum = 1478;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group227 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen227 = group227.getSize()
;int index227 = 0;
;
for (; index227 < groupLen227;index227++){
_records = (Object[])(group227.Get(index227));
 //BA.debugLineNum = 1479;BA.debugLine="Dim MARCAS As String = records(RESULT.Columns";
_marcas = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("MARCAS"))))]);
 //BA.debugLineNum = 1480;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"DELETE";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("DELETE FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MARCAS")}));
 //BA.debugLineNum = 1481;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("MARCAS"),(Object)(_marcas)}));
 }
};
 };
 };
 //BA.debugLineNum = 1487;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1488;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1489;BA.debugLine="If RESULT.Tag = \"hist_cliente_promos\" Then 'que";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_cliente_promos"))) { 
 //BA.debugLineNum = 1490;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group237 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen237 = group237.getSize()
;int index237 = 0;
;
for (; index237 < groupLen237;index237++){
_records = (Object[])(group237.Get(index237));
 //BA.debugLineNum = 1491;BA.debugLine="Dim HCCP_CLIENTE As String = records(RESULT.C";
_hccp_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCCP_CLIENTE"))))]);
 //BA.debugLineNum = 1492;BA.debugLine="Dim HCCP_PROMO As String = records(RESULT.Col";
_hccp_promo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCCP_PROMO"))))]);
 //BA.debugLineNum = 1493;BA.debugLine="Dim HCCP_CANT As String = records(RESULT.Colu";
_hccp_cant = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCCP_CANT"))))]);
 //BA.debugLineNum = 1494;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_CLIENTE_CANT_PROMOS(HCCP_CLIENTE, HCCP_PROMO, HCCP_CANT) VALUES (?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hccp_cliente),(Object)(_hccp_promo),(Object)(_hccp_cant)}));
 }
};
 //BA.debugLineNum = 1496;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence(" Historico Clientes Promociones Actualizado."),__c.True);};
 };
 };
 //BA.debugLineNum = 1500;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1501;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1502;BA.debugLine="If RESULT.Tag = \"HIST_MARCAS_CUOTAS\" Then 'quer";
if ((_result.Tag /*Object*/ ).equals((Object)("HIST_MARCAS_CUOTAS"))) { 
 //BA.debugLineNum = 1503;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group249 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen249 = group249.getSize()
;int index249 = 0;
;
for (; index249 < groupLen249;index249++){
_records = (Object[])(group249.Get(index249));
 //BA.debugLineNum = 1504;BA.debugLine="Dim HMC_MARCA As String = records(RESULT.Colu";
_hmc_marca = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HMC_MARCA"))))]);
 //BA.debugLineNum = 1505;BA.debugLine="Dim HMC_TOTAL As String = records(RESULT.Colu";
_hmc_total = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HMC_TOTAL"))))]);
 //BA.debugLineNum = 1506;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_MARCAS_CUOTAS(HMC_MARCA, HMC_TOTAL) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hmc_marca),(Object)(_hmc_total)}));
 }
};
 //BA.debugLineNum = 1508;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence(" Historico Marcas"),__c.True);};
 };
 };
 //BA.debugLineNum = 1512;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1513;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1514;BA.debugLine="If RESULT.Tag = \"hist_comp_promos\" Then 'query";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_comp_promos"))) { 
 //BA.debugLineNum = 1515;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group260 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen260 = group260.getSize()
;int index260 = 0;
;
for (; index260 < groupLen260;index260++){
_records = (Object[])(group260.Get(index260));
 //BA.debugLineNum = 1516;BA.debugLine="Dim CAT_PA_ID As String = records(RESULT.Colu";
_cat_pa_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PA_ID"))))]);
 //BA.debugLineNum = 1517;BA.debugLine="Dim CAT_PA_MAXPROM As String = records(RESULT";
_cat_pa_maxprom = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PA_MAXPROM"))))]);
 //BA.debugLineNum = 1518;BA.debugLine="Dim CAT_PA_MAXPROMREC As String = records(RES";
_cat_pa_maxpromrec = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PA_MAXPROMREC"))))]);
 //BA.debugLineNum = 1519;BA.debugLine="Dim CAT_PA_MAXPROMCLIE As String = records(RE";
_cat_pa_maxpromclie = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PA_MAXPROMCLIE"))))]);
 //BA.debugLineNum = 1520;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO PROMOS_COMP(CAT_PA_ID, CAT_PA_MAXPROM, CAT_PA_MAXPROMREC, CAT_PA_MAXPROMCLIE) VALUES (?, ?, ?, ?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_pa_id),(Object)(_cat_pa_maxprom),(Object)(_cat_pa_maxpromrec),(Object)(_cat_pa_maxpromclie)}));
 }
};
 //BA.debugLineNum = 1522;BA.debugLine="If PB1.Progress = 0 Then";
if (_pb1.getProgress()==0) { 
 //BA.debugLineNum = 1523;BA.debugLine="PB1.Progress = 30";
_pb1.setProgress((int) (30));
 //BA.debugLineNum = 1524;BA.debugLine="S_CH.Text = \"CARGANDO\"";
_s_ch.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb1.getProgress()==30) { 
 //BA.debugLineNum = 1526;BA.debugLine="PB1.Progress = 60";
_pb1.setProgress((int) (60));
 }else if(_pb1.getProgress()==60) { 
 //BA.debugLineNum = 1528;BA.debugLine="PB1.Progress = 100";
_pb1.setProgress((int) (100));
 //BA.debugLineNum = 1529;BA.debugLine="S_CH.Text = \"LISTO\"";
_s_ch.setText(BA.ObjectToCharSequence("LISTO"));
 };
 };
 };
 //BA.debugLineNum = 1534;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1535;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1536;BA.debugLine="If RESULT.Tag = \"cat_verificacion\" Then 'query";
if ((_result.Tag /*Object*/ ).equals((Object)("cat_verificacion"))) { 
 //BA.debugLineNum = 1537;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group281 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen281 = group281.getSize()
;int index281 = 0;
;
for (; index281 < groupLen281;index281++){
_records = (Object[])(group281.Get(index281));
 //BA.debugLineNum = 1538;BA.debugLine="Dim CAT_VE_IDPROD As String = records(RESULT.";
_cat_ve_idprod = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_IDPROD"))))]);
 //BA.debugLineNum = 1539;BA.debugLine="Dim CAT_VE_NOMBRE As String = records(RESULT.";
_cat_ve_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_NOMBRE"))))]);
 //BA.debugLineNum = 1540;BA.debugLine="Dim CAT_VE_ORDEN As String = records(RESULT.C";
_cat_ve_orden = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_ORDEN"))))]);
 //BA.debugLineNum = 1541;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VERIFICACION(CAT_VE_IDPROD, CAT_VE_NOMBRE,CAT_VE_ORDEN) VALUES (?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ve_idprod),(Object)(_cat_ve_nombre),(Object)(_cat_ve_orden)}));
 }
};
 };
 };
 //BA.debugLineNum = 1546;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1547;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1548;BA.debugLine="If RESULT.Tag = \"marcas_rutas\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("marcas_rutas"))) { 
 //BA.debugLineNum = 1549;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group292 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen292 = group292.getSize()
;int index292 = 0;
;
for (; index292 < groupLen292;index292++){
_records = (Object[])(group292.Get(index292));
 //BA.debugLineNum = 1550;BA.debugLine="Dim HVD_MARCA As String = records(RESULT.Colu";
_hvd_marca = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_MARCA"))))]);
 //BA.debugLineNum = 1551;BA.debugLine="Dim CLIENTES As String = records(RESULT.Colum";
_clientes = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CLIENTES"))))]);
 //BA.debugLineNum = 1552;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO MARCAS_RUTAS(HVD_MARCA, CLIENTES) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_marca),(Object)(_clientes)}));
 }
};
 };
 };
 //BA.debugLineNum = 1558;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1559;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1560;BA.debugLine="If RESULT.Tag = \"CUOTAS\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("CUOTAS"))) { 
 //BA.debugLineNum = 1561;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group302 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen302 = group302.getSize()
;int index302 = 0;
;
for (; index302 < groupLen302;index302++){
_records = (Object[])(group302.Get(index302));
 //BA.debugLineNum = 1562;BA.debugLine="Dim HC_RUTA As String = records(RESULT.Column";
_hc_ruta = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_RUTA"))))]);
 //BA.debugLineNum = 1563;BA.debugLine="Dim HC_CUOTA1 As String = records(RESULT.Colu";
_hc_cuota1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA1"))))]);
 //BA.debugLineNum = 1564;BA.debugLine="Dim HC_CUOTA2 As String = records(RESULT.Colu";
_hc_cuota2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA2"))))]);
 //BA.debugLineNum = 1565;BA.debugLine="Dim HC_CUOTA3 As String = records(RESULT.Colu";
_hc_cuota3 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA3"))))]);
 //BA.debugLineNum = 1566;BA.debugLine="Dim HC_CUOTA4 As String = records(RESULT.Colu";
_hc_cuota4 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA4"))))]);
 //BA.debugLineNum = 1567;BA.debugLine="Dim HC_CUOTA5 As String = records(RESULT.Colu";
_hc_cuota5 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA5"))))]);
 //BA.debugLineNum = 1568;BA.debugLine="Dim HC_CUOTA6 As String = records(RESULT.Colu";
_hc_cuota6 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CUOTA6"))))]);
 //BA.debugLineNum = 1569;BA.debugLine="Dim HC_META1 As String = records(RESULT.Colum";
_hc_meta1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META1"))))]);
 //BA.debugLineNum = 1570;BA.debugLine="Dim HC_META2 As String = records(RESULT.Colum";
_hc_meta2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META2"))))]);
 //BA.debugLineNum = 1571;BA.debugLine="Dim HC_META3 As String = records(RESULT.Colum";
_hc_meta3 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META3"))))]);
 //BA.debugLineNum = 1572;BA.debugLine="Dim HC_META4 As String = records(RESULT.Colum";
_hc_meta4 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META4"))))]);
 //BA.debugLineNum = 1573;BA.debugLine="Dim HC_META5 As String = records(RESULT.Colum";
_hc_meta5 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META5"))))]);
 //BA.debugLineNum = 1574;BA.debugLine="Dim HC_META6 As String = records(RESULT.Colum";
_hc_meta6 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_META6"))))]);
 //BA.debugLineNum = 1575;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_CUOTAS(HC_RUTA, HC_CUOTA1,HC_CUOTA2,HC_CUOTA3,HC_CUOTA4,HC_CUOTA5,HC_CUOTA6,HC_META1,HC_META2,HC_META3,HC_META4,HC_META5,HC_META6) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hc_ruta),(Object)(_hc_cuota1),(Object)(_hc_cuota2),(Object)(_hc_cuota3),(Object)(_hc_cuota4),(Object)(_hc_cuota5),(Object)(_hc_cuota6),(Object)(_hc_meta1),(Object)(_hc_meta2),(Object)(_hc_meta3),(Object)(_hc_meta4),(Object)(_hc_meta5),(Object)(_hc_meta6)}));
 }
};
 };
 };
 //BA.debugLineNum = 1582;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1583;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1584;BA.debugLine="If RESULT.Tag = \"COMISIONES\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("COMISIONES"))) { 
 //BA.debugLineNum = 1585;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group323 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen323 = group323.getSize()
;int index323 = 0;
;
for (; index323 < groupLen323;index323++){
_records = (Object[])(group323.Get(index323));
 //BA.debugLineNum = 1586;BA.debugLine="Dim HCM_TOTAL_V As String = records(RESULT.Co";
_hcm_total_v = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCM_TOTAL_V"))))]);
 //BA.debugLineNum = 1587;BA.debugLine="Dim HCM_TOTAL_VIVE As String = records(RESULT";
_hcm_total_vive = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCM_TOTAL_VIVE"))))]);
 //BA.debugLineNum = 1588;BA.debugLine="Dim HCM_TOTAL_GUNA As String = records(RESULT";
_hcm_total_guna = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCM_TOTAL_GUNA"))))]);
 //BA.debugLineNum = 1589;BA.debugLine="Dim HCM_TOTAL_BEB As String = records(RESULT.";
_hcm_total_beb = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HCM_TOTAL_BEB"))))]);
 //BA.debugLineNum = 1590;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_COMISIONES_MOVIL (HCM_TOTAL_V , HCM_TOTAL_VIVE , HCM_TOTAL_GUNA ,	HCM_TOTAL_BEB) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hcm_total_v),(Object)(_hcm_total_vive),(Object)(_hcm_total_guna),(Object)(_hcm_total_beb)}));
 }
};
 };
 };
 //BA.debugLineNum = 1595;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1596;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1597;BA.debugLine="If RESULT.Tag = \"gunaprod\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprod"))) { 
 //BA.debugLineNum = 1598;BA.debugLine="If PB2.Progress < 30 Then S_CP.Text = \"CARGAND";
if (_pb2.getProgress()<30) { 
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));};
 //BA.debugLineNum = 1599;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group336 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen336 = group336.getSize()
;int index336 = 0;
;
for (; index336 < groupLen336;index336++){
_records = (Object[])(group336.Get(index336));
 //BA.debugLineNum = 1600;BA.debugLine="Dim CAT_GP_ID As String = records(RESULT.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))]);
 //BA.debugLineNum = 1601;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(RESULT.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_NOMBRE"))))]);
 //BA.debugLineNum = 1602;BA.debugLine="Dim CAT_GP_IMP1 As String = records(RESULT.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]);
 //BA.debugLineNum = 1603;BA.debugLine="Dim CAT_GP_IMP2 As String = records(RESULT.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP2"))))]);
 //BA.debugLineNum = 1604;BA.debugLine="Dim CAT_GP_PRECIO As String = records(RESULT.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_PRECIO"))))]);
 //BA.debugLineNum = 1605;BA.debugLine="Dim CAT_GP_CLASIF As String = records(RESULT.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_CLASIF"))))]);
 //BA.debugLineNum = 1606;BA.debugLine="Dim CAT_GP_STS As String = records(RESULT.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_STS"))))]);
 //BA.debugLineNum = 1607;BA.debugLine="Dim CAT_GP_TIPO As String = records(RESULT.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPO"))))]);
 //BA.debugLineNum = 1608;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(RESULT";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_SUBTIPO"))))]);
 //BA.debugLineNum = 1609;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(RESULT.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMG"))))]);
 //BA.debugLineNum = 1610;BA.debugLine="Dim CAT_GP_ALMACEN As Int = records(RESULT.Co";
_cat_gp_almacen = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ALMACEN"))))]));
 //BA.debugLineNum = 1612;BA.debugLine="Dim CAT_GP_TIPOPROD As Int = records(RESULT.C";
_cat_gp_tipoprod = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPOPROD"))))]));
 //BA.debugLineNum = 1613;BA.debugLine="Dim CAT_GP_INICIATIVA As Int = records(RESULT";
_cat_gp_iniciativa = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_INICIATIVA"))))]));
 //BA.debugLineNum = 1614;BA.debugLine="Dim CAT_DP_PRECIO4 As Float = records(RESULT.";
_cat_dp_precio4 = (float)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_PRECIO4"))))]));
 //BA.debugLineNum = 1615;BA.debugLine="Dim CAT_DP_CONVERSION1 As Int = records(RESUL";
_cat_dp_conversion1 = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_DP_CONVERSION1"))))]));
 //BA.debugLineNum = 1620;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD,CAT_GP_INICIATIVA,CAT_DP_PRECIO4,CAT_DP_CONVERSION1 ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod),(Object)(_cat_gp_iniciativa),(Object)(_cat_dp_precio4),(Object)(_cat_dp_conversion1)}));
 }
};
 //BA.debugLineNum = 1624;BA.debugLine="Listo2=1";
_listo2 = BA.NumberToString(1);
 //BA.debugLineNum = 1625;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 1626;BA.debugLine="PB2.Progress = 30";
_pb2.setProgress((int) (30));
 //BA.debugLineNum = 1627;BA.debugLine="S_CP.Text = \"CARGANDO\"";
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb2.getProgress()==30) { 
 //BA.debugLineNum = 1629;BA.debugLine="PB2.Progress = 60";
_pb2.setProgress((int) (60));
 }else if(_pb2.getProgress()==60) { 
 //BA.debugLineNum = 1631;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1632;BA.debugLine="S_CP.Text = \"LISTO\"";
_s_cp.setText(BA.ObjectToCharSequence("LISTO"));
 };
 //BA.debugLineNum = 1634;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Productos Actualizados."),__c.True);};
 //BA.debugLineNum = 1635;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1636;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1637;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1638;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1690;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1691;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1692;BA.debugLine="If RESULT.Tag = \"gunaprodp\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprodp"))) { 
 //BA.debugLineNum = 1693;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group375 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen375 = group375.getSize()
;int index375 = 0;
;
for (; index375 < groupLen375;index375++){
_records = (Object[])(group375.Get(index375));
 //BA.debugLineNum = 1694;BA.debugLine="Dim CAT_GP_ID As String = records(RESULT.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))]);
 //BA.debugLineNum = 1695;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(RESULT.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_NOMBRE"))))]);
 //BA.debugLineNum = 1696;BA.debugLine="Dim CAT_GP_IMP1 As String = records(RESULT.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]);
 //BA.debugLineNum = 1697;BA.debugLine="Dim CAT_GP_IMP2 As String = records(RESULT.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP2"))))]);
 //BA.debugLineNum = 1698;BA.debugLine="Dim CAT_GP_PRECIO As String = records(RESULT.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_PRECIO"))))]);
 //BA.debugLineNum = 1699;BA.debugLine="Dim CAT_GP_CLASIF As String = records(RESULT.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_CLASIF"))))]);
 //BA.debugLineNum = 1700;BA.debugLine="Dim CAT_GP_STS As String = records(RESULT.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_STS"))))]);
 //BA.debugLineNum = 1701;BA.debugLine="Dim CAT_GP_TIPO As String = records(RESULT.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPO"))))]);
 //BA.debugLineNum = 1702;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(RESULT";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_SUBTIPO"))))]);
 //BA.debugLineNum = 1703;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(RESULT.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMG"))))]);
 //BA.debugLineNum = 1704;BA.debugLine="Dim CAT_GP_ALMACEN As Int = records(RESULT.Co";
_cat_gp_almacen = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ALMACEN"))))]));
 //BA.debugLineNum = 1705;BA.debugLine="Dim CAT_GP_TIPOPROD As Int = records(RESULT.C";
_cat_gp_tipoprod = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPOPROD"))))]));
 //BA.debugLineNum = 1706;BA.debugLine="CAT_GP_TIPOPROD = \"5\"";
_cat_gp_tipoprod = (int)(Double.parseDouble("5"));
 //BA.debugLineNum = 1707;BA.debugLine="If CAT_GP_ID = \"PAQUNI003\" Then";
if ((_cat_gp_id).equals("PAQUNI003")) { 
 //BA.debugLineNum = 1708;BA.debugLine="CAT_GP_ALMACEN = 60";
_cat_gp_almacen = (int) (60);
 };
 //BA.debugLineNum = 1711;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod)}));
 //BA.debugLineNum = 1712;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD2(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod)}));
 }
};
 //BA.debugLineNum = 1714;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 1715;BA.debugLine="PB2.Progress = 30";
_pb2.setProgress((int) (30));
 //BA.debugLineNum = 1716;BA.debugLine="S_CP.Text = \"CARGANDO\"";
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb2.getProgress()==30) { 
 //BA.debugLineNum = 1718;BA.debugLine="PB2.Progress = 60";
_pb2.setProgress((int) (60));
 }else if(_pb2.getProgress()==60) { 
 //BA.debugLineNum = 1720;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1721;BA.debugLine="S_CP.Text = \"LISTO\"";
_s_cp.setText(BA.ObjectToCharSequence("LISTO"));
 };
 //BA.debugLineNum = 1723;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Promociones  Actualizados."),__c.True);};
 //BA.debugLineNum = 1724;BA.debugLine="Listo4=1";
_listo4 = BA.NumberToString(1);
 //BA.debugLineNum = 1725;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1726;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1727;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1728;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1730;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1731;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1732;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1737;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1738;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1739;BA.debugLine="If RESULT.Tag = \"gunaprodps\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("gunaprodps"))) { 
 //BA.debugLineNum = 1740;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group420 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen420 = group420.getSize()
;int index420 = 0;
;
for (; index420 < groupLen420;index420++){
_records = (Object[])(group420.Get(index420));
 //BA.debugLineNum = 1742;BA.debugLine="Dim CAT_GP_ID As String = records(RESULT.Colu";
_cat_gp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))]);
 //BA.debugLineNum = 1743;BA.debugLine="Dim CAT_GP_NOMBRE As String = records(RESULT.";
_cat_gp_nombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_NOMBRE"))))]);
 //BA.debugLineNum = 1744;BA.debugLine="Dim CAT_GP_IMP1 As String = records(RESULT.Co";
_cat_gp_imp1 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]);
 //BA.debugLineNum = 1745;BA.debugLine="Dim CAT_GP_IMP2 As String = records(RESULT.Co";
_cat_gp_imp2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP2"))))]);
 //BA.debugLineNum = 1746;BA.debugLine="Dim CAT_GP_PRECIO As String = records(RESULT.";
_cat_gp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_PRECIO"))))]);
 //BA.debugLineNum = 1747;BA.debugLine="Dim CAT_GP_CLASIF As String = records(RESULT.";
_cat_gp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_CLASIF"))))]);
 //BA.debugLineNum = 1748;BA.debugLine="Dim CAT_GP_STS As String = records(RESULT.Col";
_cat_gp_sts = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_STS"))))]);
 //BA.debugLineNum = 1749;BA.debugLine="Dim CAT_GP_TIPO As String = records(RESULT.Co";
_cat_gp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPO"))))]);
 //BA.debugLineNum = 1750;BA.debugLine="Dim CAT_GP_SUBTIPO As String = records(RESULT";
_cat_gp_subtipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_SUBTIPO"))))]);
 //BA.debugLineNum = 1751;BA.debugLine="Dim CAT_GP_IMG() As Byte = records(RESULT.Col";
_cat_gp_img = (byte[])(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMG"))))]);
 //BA.debugLineNum = 1752;BA.debugLine="Dim CAT_GP_ALMACEN As Int = records(RESULT.Co";
_cat_gp_almacen = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ALMACEN"))))]));
 //BA.debugLineNum = 1753;BA.debugLine="Dim CAT_GP_TIPOPROD As Int = records(RESULT.C";
_cat_gp_tipoprod = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_TIPOPROD"))))]));
 //BA.debugLineNum = 1754;BA.debugLine="Log(\"XXXXXXXX gunaprodps XXXXXXXX  \" & record";
__c.LogImpl("72556513","XXXXXXXX gunaprodps XXXXXXXX  "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_ID"))))])+"|"+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_GP_IMP1"))))]),0);
 //BA.debugLineNum = 1755;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod)}));
 //BA.debugLineNum = 1756;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_GUNAPROD2(CAT_GP_ID,CAT_GP_NOMBRE,CAT_GP_IMP1,CAT_GP_IMP2,CAT_GP_PRECIO,CAT_GP_CLASIF,CAT_GP_STS,CAT_GP_TIPO,CAT_GP_SUBTIPO,CAT_GP_IMG,CAT_GP_ALMACEN,CAT_GP_TIPOPROD) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_gp_id),(Object)(_cat_gp_nombre),(Object)(_cat_gp_imp1),(Object)(_cat_gp_imp2),(Object)(_cat_gp_precio),(Object)(_cat_gp_clasif),(Object)(_cat_gp_sts),(Object)(_cat_gp_tipo),(Object)(_cat_gp_subtipo),(Object)(_cat_gp_img),(Object)(_cat_gp_almacen),(Object)(_cat_gp_tipoprod)}));
 }
};
 //BA.debugLineNum = 1758;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 1759;BA.debugLine="PB2.Progress = 30";
_pb2.setProgress((int) (30));
 //BA.debugLineNum = 1760;BA.debugLine="S_CP.Text = \"CARGANDO\"";
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));
 //BA.debugLineNum = 1761;BA.debugLine="Log(\"C4\")";
__c.LogImpl("72556520","C4",0);
 }else if(_pb2.getProgress()==30) { 
 //BA.debugLineNum = 1763;BA.debugLine="PB2.Progress = 60";
_pb2.setProgress((int) (60));
 }else if(_pb2.getProgress()==60) { 
 //BA.debugLineNum = 1765;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1766;BA.debugLine="S_CP.Text = \"LISTO\"";
_s_cp.setText(BA.ObjectToCharSequence("LISTO"));
 //BA.debugLineNum = 1767;BA.debugLine="Log(\"3\")";
__c.LogImpl("72556526","3",0);
 };
 //BA.debugLineNum = 1769;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Promociones especiales  Actualizados."),__c.True);};
 //BA.debugLineNum = 1771;BA.debugLine="Listo4=1";
_listo4 = BA.NumberToString(1);
 //BA.debugLineNum = 1772;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1773;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1774;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1775;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1777;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1778;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1779;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1784;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1785;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1786;BA.debugLine="If RESULT.Tag = \"detallepaq\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("detallepaq"))) { 
 //BA.debugLineNum = 1787;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group464 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen464 = group464.getSize()
;int index464 = 0;
;
for (; index464 < groupLen464;index464++){
_records = (Object[])(group464.Get(index464));
 //BA.debugLineNum = 1788;BA.debugLine="Dim CAT_DP_ALMACEN  As String = records(RESUL";
_cat_dp_almacen = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_ALMACEN"))))]);
 //BA.debugLineNum = 1789;BA.debugLine="Dim CAT_DP_ID As String = records(RESULT.Colu";
_cat_dp_id = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_ID"))))]);
 //BA.debugLineNum = 1790;BA.debugLine="Dim CAT_DP_IDPROD As String = records(RESULT.";
_cat_dp_idprod = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_IDPROD"))))]);
 //BA.debugLineNum = 1791;BA.debugLine="Dim CAT_DP_TIPO As String = records(RESULT.Co";
_cat_dp_tipo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_TIPO"))))]);
 //BA.debugLineNum = 1792;BA.debugLine="Dim CAT_DP_PZAS As String = records(RESULT.Co";
_cat_dp_pzas = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_PZAS"))))]);
 //BA.debugLineNum = 1793;BA.debugLine="Dim CAT_DP_USUARIO  As String = records(RESUL";
_cat_dp_usuario = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_USUARIO"))))]);
 //BA.debugLineNum = 1794;BA.debugLine="Dim CAT_DP_FECHA As String = records(RESULT.C";
_cat_dp_fecha = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_FECHA"))))]);
 //BA.debugLineNum = 1795;BA.debugLine="Dim CAT_DP_REGALO  As String = records(RESULT";
_cat_dp_regalo = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_REGALO"))))]);
 //BA.debugLineNum = 1796;BA.debugLine="Dim CAT_DP_CLASIF  As String = records(RESULT";
_cat_dp_clasif = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_CLASIF"))))]);
 //BA.debugLineNum = 1797;BA.debugLine="Dim CAT_DP_PRECIO As String = records(RESULT.";
_cat_dp_precio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_PRECIO"))))]);
 //BA.debugLineNum = 1798;BA.debugLine="Dim CAT_DP_PRECIO_SIMPTOS As String = records";
_cat_dp_precio_simptos = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_PDP_PRECIO_SIMPTOS"))))]);
 //BA.debugLineNum = 1799;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_DETALLES_PAQ(CAT_DP_ALMACEN,CAT_DP_ID,CAT_DP_IDPROD,CAT_DP_TIPO,CAT_DP_PZAS,CAT_DP_USUARIO,CAT_DP_FECHA,CAT_DP_REGALO,CAT_DP_CLASIF,CAT_DP_PRECIO,CAT_DP_PRECIO_SIMPTOS) VALUES (?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_dp_almacen),(Object)(_cat_dp_id),(Object)(_cat_dp_idprod),(Object)(_cat_dp_tipo),(Object)(_cat_dp_pzas),(Object)(_cat_dp_usuario),(Object)(_cat_dp_fecha),(Object)(_cat_dp_regalo),(Object)(_cat_dp_clasif),(Object)(_cat_dp_precio),(Object)(_cat_dp_precio_simptos)}));
 }
};
 //BA.debugLineNum = 1801;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 1802;BA.debugLine="PB2.Progress = 30";
_pb2.setProgress((int) (30));
 //BA.debugLineNum = 1803;BA.debugLine="S_CP.Text = \"CARGANDO\"";
_s_cp.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb2.getProgress()==30) { 
 //BA.debugLineNum = 1805;BA.debugLine="PB2.Progress = 60";
_pb2.setProgress((int) (60));
 }else if(_pb2.getProgress()==60) { 
 //BA.debugLineNum = 1807;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1808;BA.debugLine="S_CP.Text = \"LISTO\"";
_s_cp.setText(BA.ObjectToCharSequence("LISTO"));
 };
 //BA.debugLineNum = 1810;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1811;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1812;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1813;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1814;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 }else if((_listo4).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_inve).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1816;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1817;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1818;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1824;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1825;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1826;BA.debugLine="If RESULT.Tag = \"hist_datos\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("hist_datos"))) { 
 //BA.debugLineNum = 1827;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group502 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen502 = group502.getSize()
;int index502 = 0;
;
for (; index502 < groupLen502;index502++){
_records = (Object[])(group502.Get(index502));
 //BA.debugLineNum = 1828;BA.debugLine="Dim HVD_CLIENTE As String = records(RESULT.Co";
_hvd_cliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CLIENTE"))))]);
 //BA.debugLineNum = 1829;BA.debugLine="Dim HVD_PRONOMBRE As String = records(RESULT.";
_hvd_pronombre = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_PRONOMBRE"))))]);
 //BA.debugLineNum = 1830;BA.debugLine="Dim HVD_CANT As String = records(RESULT.Colum";
_hvd_cant = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_CANT"))))]);
 //BA.debugLineNum = 1831;BA.debugLine="Dim HVD_COSTO_TOT As String = records(RESULT.";
_hvd_costo_tot = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HVD_COSTO_TOT"))))]);
 //BA.debugLineNum = 1832;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_VENTAS(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT) VALUES (?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_hvd_cliente),(Object)(_hvd_pronombre),(Object)(_hvd_cant),(Object)(_hvd_costo_tot)}));
 }
};
 //BA.debugLineNum = 1834;BA.debugLine="Listo3 =1";
_listo3 = BA.NumberToString(1);
 //BA.debugLineNum = 1835;BA.debugLine="If PB1.Progress = 0 Then";
if (_pb1.getProgress()==0) { 
 //BA.debugLineNum = 1836;BA.debugLine="PB1.Progress = 30";
_pb1.setProgress((int) (30));
 //BA.debugLineNum = 1837;BA.debugLine="S_CH.Text = \"CARGANDO\"";
_s_ch.setText(BA.ObjectToCharSequence("CARGANDO"));
 }else if(_pb1.getProgress()==30) { 
 //BA.debugLineNum = 1839;BA.debugLine="PB1.Progress = 60";
_pb1.setProgress((int) (60));
 }else if(_pb1.getProgress()==60) { 
 //BA.debugLineNum = 1841;BA.debugLine="PB1.Progress = 100";
_pb1.setProgress((int) (100));
 //BA.debugLineNum = 1842;BA.debugLine="S_CH.Text = \"LISTO\"";
_s_ch.setText(BA.ObjectToCharSequence("LISTO"));
 };
 //BA.debugLineNum = 1844;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessag";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Venta historico Actualizado."),__c.True);};
 //BA.debugLineNum = 1845;BA.debugLine="If Listo1 =1 And Listo2 =1 And Listo3 = 1 And";
if ((_listo1).equals(BA.NumberToString(1)) && (_listo2).equals(BA.NumberToString(1)) && (_listo3).equals(BA.NumberToString(1)) && (_listo4).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 1846;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 1847;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 1848;BA.debugLine="EJECUTANDO=0";
_ejecutando = BA.NumberToString(0);
 };
 };
 };
 //BA.debugLineNum = 1853;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1854;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1855;BA.debugLine="If RESULT.Tag = \"variables\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("variables"))) { 
 //BA.debugLineNum = 1856;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group530 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen530 = group530.getSize()
;int index530 = 0;
;
for (; index530 < groupLen530;index530++){
_records = (Object[])(group530.Get(index530));
 //BA.debugLineNum = 1857;BA.debugLine="Dim Cat_Va_Descripcion As String = records(RE";
_cat_va_descripcion = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VA_DESCRIPCION"))))]);
 //BA.debugLineNum = 1858;BA.debugLine="Dim Cat_Va_Valor As String = records(RESULT.C";
_cat_va_valor = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VA_VALOR"))))]);
 //BA.debugLineNum = 1859;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_va_descripcion),(Object)(_cat_va_valor)}));
 }
};
 };
 };
 //BA.debugLineNum = 1864;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1865;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1866;BA.debugLine="If RESULT.Tag = \"CUESTIONARIO\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("CUESTIONARIO"))) { 
 //BA.debugLineNum = 1867;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group540 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen540 = group540.getSize()
;int index540 = 0;
;
for (; index540 < groupLen540;index540++){
_records = (Object[])(group540.Get(index540));
 //BA.debugLineNum = 1868;BA.debugLine="Dim Cat_Va_Valor As String = records(RESULT.C";
_cat_va_valor = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VALOR"))))]);
 //BA.debugLineNum = 1869;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"DELETE";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("DELETE FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("CUESTIONARIO")}));
 //BA.debugLineNum = 1870;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("CUESTIONARIO"),(Object)(_cat_va_valor)}));
 }
};
 };
 };
 //BA.debugLineNum = 1875;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1876;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1877;BA.debugLine="If RESULT.Tag = \"valida_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedido"))) { 
 //BA.debugLineNum = 1878;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group550 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen550 = group550.getSize()
;int index550 = 0;
;
for (; index550 < groupLen550;index550++){
_records = (Object[])(group550.Get(index550));
 //BA.debugLineNum = 1879;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 = 1880;BA.debugLine="If cuantos_pedido <= CUANTOSP Then";
if ((double)(Double.parseDouble(_cuantos_pedido))<=_cuantosp) { 
 //BA.debugLineNum = 1882;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 //BA.debugLineNum = 1883;BA.debugLine="S_CP.Text = \"INFO OK\"";
_s_cp.setText(BA.ObjectToCharSequence("INFO OK"));
 }else {
 //BA.debugLineNum = 1885;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMess";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info P. Sync Nuevamente"+BA.NumberToString(_cuantosp)+" "+_cuantos_pedido),__c.True);};
 //BA.debugLineNum = 1886;BA.debugLine="S_CP.Text = \"ENVIAR DATOS (K-2)\"";
_s_cp.setText(BA.ObjectToCharSequence("ENVIAR DATOS (K-2)"));
 };
 }
};
 };
 };
 //BA.debugLineNum = 1892;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1893;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1894;BA.debugLine="If RESULT.Tag = \"valida_pedidoc\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_pedidoc"))) { 
 //BA.debugLineNum = 1895;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group565 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen565 = group565.getSize()
;int index565 = 0;
;
for (; index565 < groupLen565;index565++){
_records = (Object[])(group565.Get(index565));
 //BA.debugLineNum = 1896;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 = 1897;BA.debugLine="If cuantos_pedidosc = CUANTOSC Then";
if ((_cuantos_pedidosc).equals(BA.NumberToString(_cuantosc))) { 
 //BA.debugLineNum = 1899;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1901;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMess";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info C. Sync Nuevamente"+BA.NumberToString(_cuantosc)+" "+_cuantos_pedidosc),__c.True);};
 };
 }
};
 };
 };
 //BA.debugLineNum = 1907;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1908;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1909;BA.debugLine="If RESULT.Tag = \"valida_noventa\" Then 'query ta";
if ((_result.Tag /*Object*/ ).equals((Object)("valida_noventa"))) { 
 //BA.debugLineNum = 1910;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group578 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen578 = group578.getSize()
;int index578 = 0;
;
for (; index578 < groupLen578;index578++){
_records = (Object[])(group578.Get(index578));
 //BA.debugLineNum = 1911;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 = 1912;BA.debugLine="If cuantos_noventa = CUANTOSN Then";
if ((_cuantos_noventa).equals(BA.NumberToString(_cuantosn))) { 
 //BA.debugLineNum = 1914;BA.debugLine="datos_iguales = \"ok\"";
_datos_iguales = "ok";
 }else {
 //BA.debugLineNum = 1916;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMess";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("No se cargo bien la info N. Sync Nuevamente"+BA.NumberToString(_cuantosn)+" "+_cuantos_noventa),__c.True);};
 };
 }
};
 };
 };
 //BA.debugLineNum = 1922;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1923;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1924;BA.debugLine="If RESULT.Tag = \"ins_pedido\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_pedido"))) { 
 //BA.debugLineNum = 1925;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group591 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen591 = group591.getSize()
;int index591 = 0;
;
for (; index591 < groupLen591;index591++){
_records = (Object[])(group591.Get(index591));
 //BA.debugLineNum = 1926;BA.debugLine="PB2.Progress = PB2.Progress + 5";
_pb2.setProgress((int) (_pb2.getProgress()+5));
 //BA.debugLineNum = 1927;BA.debugLine="S_CP.Text = \"SUBIENDO\"";
_s_cp.setText(BA.ObjectToCharSequence("SUBIENDO"));
 }
};
 //BA.debugLineNum = 1929;BA.debugLine="PB2.Progress = 100";
_pb2.setProgress((int) (100));
 //BA.debugLineNum = 1930;BA.debugLine="S_CP.Text = \"REVISANDO ...\"";
_s_cp.setText(BA.ObjectToCharSequence("REVISANDO ..."));
 //BA.debugLineNum = 1931;BA.debugLine="Log(\"5\")";
__c.LogImpl("72556690","5",0);
 };
 };
 //BA.debugLineNum = 1935;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1936;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1937;BA.debugLine="If RESULT.Tag = \"version\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("version"))) { 
 //BA.debugLineNum = 1938;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group603 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen603 = group603.getSize()
;int index603 = 0;
;
for (; index603 < groupLen603;index603++){
_records = (Object[])(group603.Get(index603));
 //BA.debugLineNum = 1939;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete f";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from VERSION");
 //BA.debugLineNum = 1940;BA.debugLine="Dim CAT_VE_VERSION As String = records(RESULT";
_cat_ve_version = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("CAT_VE_VERSION"))))]);
 //BA.debugLineNum = 1941;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_cat_ve_version)}));
 }
};
 };
 };
 //BA.debugLineNum = 1946;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1947;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1948;BA.debugLine="If RESULT.Tag = \"count_cli\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("count_cli"))) { 
 //BA.debugLineNum = 1949;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group613 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen613 = group613.getSize()
;int index613 = 0;
;
for (; index613 < groupLen613;index613++){
_records = (Object[])(group613.Get(index613));
 //BA.debugLineNum = 1950;BA.debugLine="COUNT_CLIE = records(RESULT.Columns.Get(\"COUN";
_count_clie = (int)(BA.ObjectToNumber(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("COUNT_CLIE"))))]));
 }
};
 };
 };
 //BA.debugLineNum = 1955;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1956;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1957;BA.debugLine="If RESULT.Tag = \"ruta\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("ruta"))) { 
 //BA.debugLineNum = 1958;BA.debugLine="Log(\"JOBDONE PRINCIPAL RUTA\")";
__c.LogImpl("72556717","JOBDONE PRINCIPAL RUTA",0);
 //BA.debugLineNum = 1959;BA.debugLine="Log(RESULT.Rows.Size)";
__c.LogImpl("72556718",BA.NumberToString(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),0);
 //BA.debugLineNum = 1960;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group623 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen623 = group623.getSize()
;int index623 = 0;
;
for (; index623 < groupLen623;index623++){
_records = (Object[])(group623.Get(index623));
 //BA.debugLineNum = 1961;BA.debugLine="Dim VALIDO As String = records(RESULT.Columns";
_valido = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("VALIDO"))))]);
 //BA.debugLineNum = 1962;BA.debugLine="Log(\"|\"&VALIDO)";
__c.LogImpl("72556721","|"+_valido,0);
 //BA.debugLineNum = 1963;BA.debugLine="If VALIDO = \"OK\" Then";
if ((_valido).equals("OK")) { 
 //BA.debugLineNum = 1964;BA.debugLine="cargar.Visible = True";
_cargar.setVisible(__c.True);
 //BA.debugLineNum = 1965;BA.debugLine="Subir.Visible = True";
_subir.setVisible(__c.True);
 //BA.debugLineNum = 1966;BA.debugLine="inv.Visible = True";
_inv.setVisible(__c.True);
 //BA.debugLineNum = 1967;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 1968;BA.debugLine="If conn = \"1\" Then";
if ((_conn).equals("1")) { 
 //BA.debugLineNum = 1969;BA.debugLine="ToastMessageShow(\"Existe Conexión con el Se";
__c.ToastMessageShow(BA.ObjectToCharSequence("Existe Conexión con el Servidor."),__c.True);
 };
 }else {
 //BA.debugLineNum = 1972;BA.debugLine="cargar.Visible = False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 1973;BA.debugLine="Subir.Visible = False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 1974;BA.debugLine="inv.Visible = False";
_inv.setVisible(__c.False);
 //BA.debugLineNum = 1975;BA.debugLine="connecta.Visible = False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 1976;BA.debugLine="ToastMessageShow(\"Ruta invalida.\" , True)";
__c.ToastMessageShow(BA.ObjectToCharSequence("Ruta invalida."),__c.True);
 };
 }
};
 };
 };
 //BA.debugLineNum = 1982;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1983;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1984;BA.debugLine="If RESULT.Tag = \"usuario\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("usuario"))) { 
 //BA.debugLineNum = 1985;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group647 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen647 = group647.getSize()
;int index647 = 0;
;
for (; index647 < groupLen647;index647++){
_records = (Object[])(group647.Get(index647));
 //BA.debugLineNum = 1986;BA.debugLine="Dim name2 As String = records(RESULT.Columns.";
_name2 = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("VALIDO"))))]);
 }
};
 //BA.debugLineNum = 1988;BA.debugLine="If name2 = \"OK\" Then";
if ((_name2).equals("OK")) { 
 //BA.debugLineNum = 1989;BA.debugLine="PASO = 1";
_paso = BA.NumberToString(1);
 };
 //BA.debugLineNum = 1991;BA.debugLine="P1.Visible = False";
_p1.setVisible(__c.False);
 //BA.debugLineNum = 1992;BA.debugLine="p_mandaInfo.Visible = False";
_p_mandainfo.setVisible(__c.False);
 };
 };
 //BA.debugLineNum = 1996;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 1997;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 1998;BA.debugLine="If RESULT.Tag = \"fecha\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("fecha"))) { 
 //BA.debugLineNum = 1999;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group660 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen660 = group660.getSize()
;int index660 = 0;
;
for (; index660 < groupLen660;index660++){
_records = (Object[])(group660.Get(index660));
 //BA.debugLineNum = 2000;BA.debugLine="Dim FECHA_HOY As String = records(RESULT.Colu";
_fecha_hoy = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("FECHA"))))]);
 //BA.debugLineNum = 2001;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA")}));
 //BA.debugLineNum = 2002;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FECHA"),(Object)(_fecha_hoy)}));
 }
};
 };
 };
 //BA.debugLineNum = 2007;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2008;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(J";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2009;BA.debugLine="If RESULT.Tag = \"folio\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("folio"))) { 
 //BA.debugLineNum = 2010;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group670 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen670 = group670.getSize()
;int index670 = 0;
;
for (; index670 < groupLen670;index670++){
_records = (Object[])(group670.Get(index670));
 //BA.debugLineNum = 2011;BA.debugLine="Dim FOLIO As String = records(RESULT.Columns.";
_folio = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("FOLIO"))))]);
 //BA.debugLineNum = 2012;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FOLIO")}));
 //BA.debugLineNum = 2013;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("FOLIO"),(Object)(_folio)}));
 }
};
 };
 };
 };
 //BA.debugLineNum = 2044;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
 //BA.debugLineNum = 2045;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(Jo";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2046;BA.debugLine="If RESULT.Tag = \"ins_cuestionario\" Then 'query t";
if ((_result.Tag /*Object*/ ).equals((Object)("ins_cuestionario"))) { 
 //BA.debugLineNum = 2047;BA.debugLine="Subs.logJobDoneResultados(RESULT)";
_subs._logjobdoneresultados /*String*/ (ba,_result);
 };
 //BA.debugLineNum = 2050;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(Jo";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2051;BA.debugLine="If RESULT.Tag = \"test\" Then 'query tag";
if ((_result.Tag /*Object*/ ).equals((Object)("test"))) { 
 //BA.debugLineNum = 2052;BA.debugLine="Log(\">>>>>>>>>>>>>  TEST\")";
__c.LogImpl("72556811",">>>>>>>>>>>>>  TEST",0);
 //BA.debugLineNum = 2053;BA.debugLine="Subs.logJobDoneResultados(RESULT)";
_subs._logjobdoneresultados /*String*/ (ba,_result);
 };
 //BA.debugLineNum = 2056;BA.debugLine="Dim RESULT As DBResult = reqManager.HandleJob(Jo";
_result = _reqmanager._handlejob /*medicomed.keymon.com.mx.dbrequestmanager._dbresult*/ (_job);
 //BA.debugLineNum = 2057;BA.debugLine="If RESULT.Tag = \"clientes_cuestionario\" Then";
if ((_result.Tag /*Object*/ ).equals((Object)("clientes_cuestionario"))) { 
 //BA.debugLineNum = 2058;BA.debugLine="Log(\"Entramos a clientes_cuestionario - Regs:\"";
__c.LogImpl("72556817","Entramos a clientes_cuestionario - Regs:"+BA.NumberToString(_result.Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),0);
 //BA.debugLineNum = 2059;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from HIST_CUE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_CUESTIONARIO");
 //BA.debugLineNum = 2060;BA.debugLine="For Each records() As Object In RESULT.Rows";
{
final anywheresoftware.b4a.BA.IterableList group692 = _result.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen692 = group692.getSize()
;int index692 = 0;
;
for (; index692 < groupLen692;index692++){
_records = (Object[])(group692.Get(index692));
 //BA.debugLineNum = 2061;BA.debugLine="Dim idCliente As String = records(RESULT.Colum";
_idcliente = BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_result.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)("HC_CLIENTE"))))]);
 //BA.debugLineNum = 2062;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HIST_C";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_CUESTIONARIO(HC_CLIENTE) VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_idcliente)}));
 }
};
 };
 };
 //BA.debugLineNum = 2066;BA.debugLine="Job.Release";
_job._release /*String*/ ();
 //BA.debugLineNum = 2067;BA.debugLine="End Sub";
return "";
}
public String  _lv_pedidos_tot_itemclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 2686;BA.debugLine="Private Sub lv_pedidos_tot_ItemClick (Position As";
 //BA.debugLineNum = 2688;BA.debugLine="MostrarDatosPedidos";
_mostrardatospedidos();
 //BA.debugLineNum = 2689;BA.debugLine="End Sub";
return "";
}
public String  _lv_prod_prin_itemclick(int _position,Object _value) throws Exception{
 //BA.debugLineNum = 2739;BA.debugLine="Private Sub lv_prod_Prin_ItemClick (Position As In";
 //BA.debugLineNum = 2740;BA.debugLine="MostrarProductos";
_mostrarproductos();
 //BA.debugLineNum = 2741;BA.debugLine="End Sub";
return "";
}
public String  _mostrardatospedidos() throws Exception{
anywheresoftware.b4a.sql.SQL.CursorWrapper _sump = null;
int _i = 0;
String _itemtext = "";
 //BA.debugLineNum = 2691;BA.debugLine="Private Sub MostrarDatosPedidos";
 //BA.debugLineNum = 2692;BA.debugLine="Private sumP As Cursor = B4XPages.MainPage.skmt.E";
_sump = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_sump = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT PE_PRONOMBRE, PE_PROID, SUM(CASE WHEN PE_BCAJAS <> 1 THEN PE_CANT ELSE 0 END) AS PE_CANT, SUM(CASE WHEN PE_BCAJAS = 1 THEN PE_CANTC ELSE 0 END) AS PE_CANTC FROM PEDIDO GROUP BY PE_PRONOMBRE,PE_PROID")));
 //BA.debugLineNum = 2693;BA.debugLine="lv_pedidos_tot.SingleLineLayout.Label.TextColor =";
_lv_pedidos_tot.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2694;BA.debugLine="lv_pedidos_tot.Clear";
_lv_pedidos_tot.Clear();
 //BA.debugLineNum = 2695;BA.debugLine="If sumP.RowCount > 0 Then";
if (_sump.getRowCount()>0) { 
 //BA.debugLineNum = 2696;BA.debugLine="For i = 0 To sumP.RowCount - 1";
{
final int step5 = 1;
final int limit5 = (int) (_sump.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
 //BA.debugLineNum = 2697;BA.debugLine="sumP.Position = i";
_sump.setPosition(_i);
 //BA.debugLineNum = 2698;BA.debugLine="Dim itemText As String";
_itemtext = "";
 //BA.debugLineNum = 2699;BA.debugLine="itemText = $\"Nombre: ${sumP.GetString(\"PE_PRONO";
_itemtext = ("Nombre: "+__c.SmartStringFormatter("",(Object)(_sump.GetString("PE_PRONOMBRE")))+" "+__c.SmartStringFormatter("",(Object)(__c.CRLF))+" N° Piezas: "+__c.SmartStringFormatter("",(Object)(_sump.GetInt("PE_CANT")))+", \"N° Cajas: "+__c.SmartStringFormatter("",(Object)(_sump.GetString("PE_CANTC")))+"");
 //BA.debugLineNum = 2700;BA.debugLine="lv_pedidos_tot.AddSingleLine(itemText)";
_lv_pedidos_tot.AddSingleLine(BA.ObjectToCharSequence(_itemtext));
 }
};
 }else {
 //BA.debugLineNum = 2703;BA.debugLine="lv_pedidos_tot.AddSingleLine(\"No hay datos dispo";
_lv_pedidos_tot.AddSingleLine(BA.ObjectToCharSequence("No hay datos disponibles."));
 };
 //BA.debugLineNum = 2705;BA.debugLine="sumP.Close";
_sump.Close();
 //BA.debugLineNum = 2706;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
_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)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT SUM(PE_CANT) AS PE_CANT FROM PEDIDO WHERE PE_BCAJAS <> 1")));
 //BA.debugLineNum = 2707;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2708;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2709;BA.debugLine="l_tot_prod_p.Text = c.GetString(\"PE_CANT\")";
_l_tot_prod_p.setText(BA.ObjectToCharSequence(_c.GetString("PE_CANT")));
 };
 //BA.debugLineNum = 2711;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2712;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
_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)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT SUM(PE_CANTC) AS PE_CANTC FROM PEDIDO WHERE PE_BCAJAS = 1")));
 //BA.debugLineNum = 2713;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2714;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2715;BA.debugLine="l_tot_prod_c.Text = c.GetString(\"PE_CANTC\")";
_l_tot_prod_c.setText(BA.ObjectToCharSequence(_c.GetString("PE_CANTC")));
 };
 //BA.debugLineNum = 2717;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2718;BA.debugLine="End Sub";
return "";
}
public String  _mostrarproductos() throws Exception{
String _marcas = "";
anywheresoftware.b4a.sql.SQL.CursorWrapper _m = null;
int _i = 0;
String _itemtext = "";
String _precioformateado = "";
String _preciocaja = "";
 //BA.debugLineNum = 2743;BA.debugLine="Private Sub MostrarProductos";
 //BA.debugLineNum = 2744;BA.debugLine="Dim marcas As String = \"\"";
_marcas = "";
 //BA.debugLineNum = 2745;BA.debugLine="Dim m As Cursor = B4XPages.MainPage.skmt.ExecQuer";
_m = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_m = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = 'MARCAS'")));
 //BA.debugLineNum = 2746;BA.debugLine="If m.RowCount > 0 Then";
if (_m.getRowCount()>0) { 
 //BA.debugLineNum = 2747;BA.debugLine="m.Position = 0";
_m.setPosition((int) (0));
 //BA.debugLineNum = 2748;BA.debugLine="marcas = m.GetString(\"CAT_VA_VALOR\")";
_marcas = _m.GetString("CAT_VA_VALOR");
 };
 //BA.debugLineNum = 2751;BA.debugLine="Private c As Cursor = B4XPages.MainPage.skmt.Exec";
_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)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select CAT_GP_NOMBRE, CAT_GP_ALMACEN, CAT_GP_PRECIO, CAT_DP_PRECIO4 from CAT_GUNAPROD LEFT JOIN PEDIDO ON CAT_GP_ID = PE_PROID where CAT_GP_PRECIO > 0 And CAT_GP_ALMACEN > 0 And CAT_GP_CLASIF <> 'PROMOS' AND CAT_GP_CLASIF IN("+__c.SmartStringFormatter("",(Object)(_marcas))+") AND CAT_GP_CLASIF <> 'ALEN PROMOCIONES' union all Select CAT_GP_NOMBRE, CAT_GP_ALMACEN, CAT_GP_PRECIO, CAT_DP_PRECIO4 from CAT_GUNAPROD LEFT JOIN PEDIDO ON CAT_GP_ID = PE_PROID where CAT_GP_PRECIO > 0 And CAT_GP_ALMACEN = 0 And CAT_GP_CLASIF <> 'PROMOS' AND CAT_GP_CLASIF IN("+__c.SmartStringFormatter("",(Object)(_marcas))+") AND CAT_GP_CLASIF <> 'ALEN PROMOCIONES' and cat_gp_id in (select pe_proid from pedido where pe_cliente in (select cuenta from cuentaa)) order by 1"))));
 //BA.debugLineNum = 2753;BA.debugLine="lv_prod_Prin.SingleLineLayout.Label.TextColor = C";
_lv_prod_prin.getSingleLineLayout().Label.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2754;BA.debugLine="lv_prod_Prin.Clear";
_lv_prod_prin.Clear();
 //BA.debugLineNum = 2755;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2756;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step11 = 1;
final int limit11 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit11 ;_i = _i + step11 ) {
 //BA.debugLineNum = 2757;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 2758;BA.debugLine="Dim itemText As String";
_itemtext = "";
 //BA.debugLineNum = 2759;BA.debugLine="Dim precioFormateado As String = NumberFormat2(";
_precioformateado = __c.NumberFormat2(_c.GetDouble("CAT_GP_PRECIO"),(int) (0),(int) (2),(int) (2),__c.False);
 //BA.debugLineNum = 2760;BA.debugLine="Dim precioCaja As String = NumberFormat2(c.GetD";
_preciocaja = __c.NumberFormat2(_c.GetDouble("CAT_DP_PRECIO4"),(int) (0),(int) (2),(int) (2),__c.False);
 //BA.debugLineNum = 2761;BA.debugLine="itemText = $\"${c.GetString(\"CAT_GP_NOMBRE\")} ${";
_itemtext = (""+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_GP_NOMBRE")))+" "+__c.SmartStringFormatter("",(Object)(__c.CRLF))+"Existencias: "+__c.SmartStringFormatter("",(Object)(_c.GetInt("CAT_GP_ALMACEN")))+", P/C: "+__c.SmartStringFormatter("",(Object)(_preciocaja))+", P/U: "+__c.SmartStringFormatter("",(Object)(_precioformateado))+"");
 //BA.debugLineNum = 2762;BA.debugLine="lv_prod_Prin.AddSingleLine(itemText)";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence(_itemtext));
 }
};
 }else {
 //BA.debugLineNum = 2765;BA.debugLine="lv_prod_Prin.AddSingleLine(\"No hay datos disponi";
_lv_prod_prin.AddSingleLine(BA.ObjectToCharSequence("No hay datos disponibles."));
 };
 //BA.debugLineNum = 2767;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2768;BA.debugLine="End Sub";
return "";
}
public String  _nuevo_click() throws Exception{
 //BA.debugLineNum = 2405;BA.debugLine="Sub NUEVO_Click";
 //BA.debugLineNum = 2406;BA.debugLine="B4XPages.ShowPage(\"NuevoCliente\")";
_b4xpages._showpage /*String*/ (ba,"NuevoCliente");
 //BA.debugLineNum = 2407;BA.debugLine="End Sub";
return "";
}
public String  _nvo_cliente_click() throws Exception{
 //BA.debugLineNum = 2635;BA.debugLine="Sub nvo_cliente_Click";
 //BA.debugLineNum = 2636;BA.debugLine="B4XPages.ShowPage(\"NuevoCliente\")";
_b4xpages._showpage /*String*/ (ba,"NuevoCliente");
 //BA.debugLineNum = 2637;BA.debugLine="End Sub";
return "";
}
public String  _p_mandainfo_click() throws Exception{
 //BA.debugLineNum = 2897;BA.debugLine="Private Sub p_mandaInfo_Click";
 //BA.debugLineNum = 2899;BA.debugLine="End Sub";
return "";
}
public String  _p_resumen_click() throws Exception{
 //BA.debugLineNum = 2433;BA.debugLine="Sub P_RESUMEN_click";
 //BA.debugLineNum = 2435;BA.debugLine="End Sub";
return "";
}
public String  _resdia_click() throws Exception{
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
String _cuantos_obj = "";
 //BA.debugLineNum = 2441;BA.debugLine="Sub resdia_Click";
 //BA.debugLineNum = 2442;BA.debugLine="p_principal.Visible = False";
_p_principal.setVisible(__c.False);
 //BA.debugLineNum = 2443;BA.debugLine="Btn_Ubicar.Visible=False";
_btn_ubicar.setVisible(__c.False);
 //BA.debugLineNum = 2444;BA.debugLine="SCROLL_RESDIA.Visible = True";
_scroll_resdia.setVisible(__c.True);
 //BA.debugLineNum = 2445;BA.debugLine="SCROLL_RESDIA.Panel.LoadLayout(\"RESDIA\")";
_scroll_resdia.getPanel().LoadLayout("RESDIA",ba);
 //BA.debugLineNum = 2446;BA.debugLine="SCROLL_RESDIA.Panel.Height = Panel4.Height";
_scroll_resdia.getPanel().setHeight(_panel4.getHeight());
 //BA.debugLineNum = 2447;BA.debugLine="Panel4.Visible = True";
_panel4.setVisible(__c.True);
 //BA.debugLineNum = 2449;BA.debugLine="NUEVO.Visible =False";
_nuevo.setVisible(__c.False);
 //BA.debugLineNum = 2450;BA.debugLine="BUSCA.Visible=False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 2451;BA.debugLine="connecta.Visible=False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 2452;BA.debugLine="Subir.Visible=False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 2453;BA.debugLine="cargar.Visible=False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 2454;BA.debugLine="Resumen.Visible= False";
_resumen.setVisible(__c.False);
 //BA.debugLineNum = 2456;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"select COUNT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select COUNT(*) AS CUANTOS FROM HIST_ENCUESTA WHERE  HE_TIPO = ?",new String[]{"TELEFONO"})));
 //BA.debugLineNum = 2457;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2458;BA.debugLine="l_encuesta.Text = d.GetString(\"CUANTOS\")";
_l_encuesta.setText(BA.ObjectToCharSequence(_d.GetString("CUANTOS")));
 //BA.debugLineNum = 2459;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2461;BA.debugLine="L_MARCAS.CLEAR";
_l_marcas.Clear();
 //BA.debugLineNum = 2462;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"select disti";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("select distinct HE_CLIE AS CLIENTE FROM HIST_ENCUESTA WHERE  HE_TIPO = ?",new String[]{"TELEFONO"})));
 //BA.debugLineNum = 2463;BA.debugLine="If D.RowCount>0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 2464;BA.debugLine="For i=0 To D.RowCount -1";
{
final int step20 = 1;
final int limit20 = (int) (_d.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit20 ;_i = _i + step20 ) {
 //BA.debugLineNum = 2465;BA.debugLine="D.Position=i";
_d.setPosition(_i);
 //BA.debugLineNum = 2466;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  HE";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  HE_RES from HIST_ENCUESTA where  HE_CLIE = ?  AND HE_TIPO = ?",new String[]{_d.GetString("CLIENTE"),"TELEFONO"})));
 //BA.debugLineNum = 2467;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2468;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2469;BA.debugLine="label1 = L_MARCAS.TwoLinesLayout.Label";
_label1 = _l_marcas.getTwoLinesLayout().Label;
 //BA.debugLineNum = 2470;BA.debugLine="label1.TextSize = 13";
_label1.setTextSize((float) (13));
 //BA.debugLineNum = 2471;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2472;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 2473;BA.debugLine="label2 = L_MARCAS.TwoLinesLayout.SecondLabel";
_label2 = _l_marcas.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 2474;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
 //BA.debugLineNum = 2475;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 2476;BA.debugLine="L_MARCAS.AddTwoLines(d.GetString(\"CLIENTE\"),\"TE";
_l_marcas.AddTwoLines(BA.ObjectToCharSequence(_d.GetString("CLIENTE")),BA.ObjectToCharSequence("TELEFONO :"+_c.GetString("HE_RES")));
 //BA.debugLineNum = 2477;BA.debugLine="c.Close";
_c.Close();
 }
};
 };
 //BA.debugLineNum = 2480;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2482;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and pe_proid in (Select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = ? )",new String[]{"RTEC"})));
 //BA.debugLineNum = 2483;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2484;BA.debugLine="l_monto_k.Text = c.GetString(\"MONTO_DIA\")";
_l_monto_k.setText(BA.ObjectToCharSequence(_c.GetString("MONTO_DIA")));
 //BA.debugLineNum = 2485;BA.debugLine="If l_monto_k.Text = \"null\" Then";
if ((_l_monto_k.getText()).equals("null")) { 
 //BA.debugLineNum = 2486;BA.debugLine="l_monto_k.Text = \"0\"";
_l_monto_k.setText(BA.ObjectToCharSequence("0"));
 };
 //BA.debugLineNum = 2488;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2490;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 and pe_proid in (Select CAT_GP_ID from cat_gunaprod where CAT_GP_TIPO = ? )",new String[]{"PING"})));
 //BA.debugLineNum = 2491;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2492;BA.debugLine="l_monto_kp.Text = c.GetString(\"MONTO_DIA\")";
_l_monto_kp.setText(BA.ObjectToCharSequence(_c.GetString("MONTO_DIA")));
 //BA.debugLineNum = 2493;BA.debugLine="If l_monto_kp.Text = \"null\" Then";
if ((_l_monto_kp.getText()).equals("null")) { 
 //BA.debugLineNum = 2494;BA.debugLine="l_monto_kp.Text = \"0\"";
_l_monto_kp.setText(BA.ObjectToCharSequence("0"));
 };
 //BA.debugLineNum = 2496;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2506;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select  sum(P";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select  sum(PE_COSTO_TOT) As MONTO_DIA from pedido where PE_CLIENTE <> 0 ")));
 //BA.debugLineNum = 2507;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2508;BA.debugLine="l_monto_ks.Text = Subs.traeTotalCliente";
_l_monto_ks.setText(BA.ObjectToCharSequence(_subs._traetotalcliente /*double*/ (ba)));
 //BA.debugLineNum = 2510;BA.debugLine="If l_monto_ks.Text = \"null\" Then";
if ((_l_monto_ks.getText()).equals("null")) { 
 //BA.debugLineNum = 2511;BA.debugLine="l_monto_ks.Text = \"0\"";
_l_monto_ks.setText(BA.ObjectToCharSequence("0"));
 };
 //BA.debugLineNum = 2513;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2514;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  sum(PE_COSTO_TOT) As PREVENTA from pedido where PE_FOLIO = ? AND PE_CLIENTE <> 0",new String[]{"PREVENTA"})));
 //BA.debugLineNum = 2515;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2516;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2517;BA.debugLine="L_PREVENTA.Text = Subs.traeTotalClientepreventa";
_l_preventa.setText(BA.ObjectToCharSequence(_subs._traetotalclientepreventa /*double*/ (ba)));
 //BA.debugLineNum = 2518;BA.debugLine="If L_PREVENTA.TEXT = \"null\" Then";
if ((_l_preventa.getText()).equals("null")) { 
 //BA.debugLineNum = 2519;BA.debugLine="L_PREVENTA.Text = \"0\"";
_l_preventa.setText(BA.ObjectToCharSequence("0"));
 };
 };
 //BA.debugLineNum = 2522;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2523;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  sum(PE_COSTO_TOT) As VENTA from pedido where PE_FOLIO = ? AND PE_CLIENTE <> 0",new String[]{"PREVENTA_48"})));
 //BA.debugLineNum = 2524;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2525;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 };
 //BA.debugLineNum = 2531;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2532;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  sum(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  sum(PE_COSTO_TOT) As ABORDO from pedido where PE_FOLIO = ? AND PE_CLIENTE = ?",new String[]{"ABORDO","0"})));
 //BA.debugLineNum = 2533;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 2534;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2535;BA.debugLine="L_ABORDO.Text = Subs.traeTotalClienteabordo";
_l_abordo.setText(BA.ObjectToCharSequence(_subs._traetotalclienteabordo /*double*/ (ba)));
 //BA.debugLineNum = 2536;BA.debugLine="If L_ABORDO.TEXT = \"null\" Then";
if ((_l_abordo.getText()).equals("null")) { 
 //BA.debugLineNum = 2537;BA.debugLine="L_ABORDO.Text = \"0\"";
_l_abordo.setText(BA.ObjectToCharSequence("0"));
 };
 };
 //BA.debugLineNum = 2540;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2541;BA.debugLine="Dim cuantos_obj As String";
_cuantos_obj = "";
 //BA.debugLineNum = 2542;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select  count";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select  count(*) AS TOTAL from HIST_MARCAS_CUOTAS   ")));
 //BA.debugLineNum = 2543;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2544;BA.debugLine="cuantos_obj = c.GetString(\"TOTAL\")";
_cuantos_obj = _c.GetString("TOTAL");
 //BA.debugLineNum = 2545;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2547;BA.debugLine="If cuantos_obj > 0 Then";
if ((double)(Double.parseDouble(_cuantos_obj))>0) { 
 //BA.debugLineNum = 2548;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select SUM(H";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select SUM(HMC_TOTAL) AS TOTAL from HIST_MARCAS_CUOTAS")));
 //BA.debugLineNum = 2549;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2550;BA.debugLine="L_NES.Text = c.GetString(\"TOTAL\")";
_l_nes.setText(BA.ObjectToCharSequence(_c.GetString("TOTAL")));
 //BA.debugLineNum = 2551;BA.debugLine="c.Close";
_c.Close();
 };
 //BA.debugLineNum = 2553;BA.debugLine="L_REAL.Text = l_monto_ks.Text";
_l_real.setText(BA.ObjectToCharSequence(_l_monto_ks.getText()));
 //BA.debugLineNum = 2554;BA.debugLine="L_ALCANCE.Text = Round2((L_NES.Text / L_REAL.Text";
_l_alcance.setText(BA.ObjectToCharSequence(__c.Round2(((double)(Double.parseDouble(_l_nes.getText()))/(double)(double)(Double.parseDouble(_l_real.getText()))+1),(int) (2))));
 //BA.debugLineNum = 2555;BA.debugLine="L_VPLAN.Text = l_porvisitar.Text";
_l_vplan.setText(BA.ObjectToCharSequence(_l_porvisitar.getText()));
 //BA.debugLineNum = 2556;BA.debugLine="L_VREAL.Text = L_CUANTOST.text";
_l_vreal.setText(BA.ObjectToCharSequence(_l_cuantost.getText()));
 //BA.debugLineNum = 2557;BA.debugLine="L_EFEC_VIS.Text = Round2(L_VREAL.text / L_VPLAN.T";
_l_efec_vis.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_l_vreal.getText()))/(double)(double)(Double.parseDouble(_l_vplan.getText())),(int) (2))));
 //BA.debugLineNum = 2558;BA.debugLine="L_VISITCC.Text = l_cuantosc.text";
_l_visitcc.setText(BA.ObjectToCharSequence(_l_cuantosc.getText()));
 //BA.debugLineNum = 2559;BA.debugLine="L_EFEC_PV.Text = Round2(L_VISITCC.Text / L_VREAL.";
_l_efec_pv.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_l_visitcc.getText()))/(double)(double)(Double.parseDouble(_l_vreal.getText())),(int) (2))));
 //BA.debugLineNum = 2560;BA.debugLine="L_EFEC_PURA.Text = Round2(L_VISITCC.Text / L_VPLA";
_l_efec_pura.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_l_visitcc.getText()))/(double)(double)(Double.parseDouble(_l_vplan.getText())),(int) (2))));
 //BA.debugLineNum = 2561;BA.debugLine="L_LIN_TICK.Text = LPT";
_l_lin_tick.setText(BA.ObjectToCharSequence(_lpt));
 //BA.debugLineNum = 2562;BA.debugLine="If l_monto_ks.Text <> \"0\" Then";
if ((_l_monto_ks.getText()).equals("0") == false) { 
 //BA.debugLineNum = 2564;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery2(\"Select  COU";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select  COUNT(DISTINCT(PE_CLIENTE)) AS CUANTOS FROM PEDIDO WHERE PE_CEDIS =  ? ",new String[]{_almacen})));
 //BA.debugLineNum = 2565;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2566;BA.debugLine="L_CTE_PROMO.Text = c.GetString(\"CUANTOS\")";
_l_cte_promo.setText(BA.ObjectToCharSequence(_c.GetString("CUANTOS")));
 //BA.debugLineNum = 2567;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2568;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"Select sum(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select sum(PE_COSTO_TOT) AS MONTO_DIA FROM PEDIDO WHERE PE_PROID IN (select CAT_GP_ID from cat_gunaprod where  CAT_GP_TIPOPROD = ?) ",new String[]{"PRIORITARIO"})));
 //BA.debugLineNum = 2569;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2576;BA.debugLine="Log(\"|\"&d.GetString(\"MONTO_DIA\")&\"|\")";
__c.LogImpl("73539079","|"+_d.GetString("MONTO_DIA")+"|",0);
 //BA.debugLineNum = 2578;BA.debugLine="L_PRIO.Text = d.GetString(\"MONTO_DIA\")";
_l_prio.setText(BA.ObjectToCharSequence(_d.GetString("MONTO_DIA")));
 //BA.debugLineNum = 2579;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2581;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"Select sum(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select sum(PE_COSTO_TOT) AS MONTO_DIA FROM PEDIDO WHERE PE_PROID IN (select CAT_GP_ID from cat_gunaprod where  CAT_GP_TIPOPROD = ?) ",new String[]{"ESTRATEGICO"})));
 //BA.debugLineNum = 2582;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2583;BA.debugLine="L_SECUND.Text =d.GetString(\"MONTO_DIA\")";
_l_secund.setText(BA.ObjectToCharSequence(_d.GetString("MONTO_DIA")));
 //BA.debugLineNum = 2584;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2586;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery2(\"Select sum(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery2("Select sum(PE_COSTO_TOT) AS MONTO_DIA FROM PEDIDO WHERE PE_PROID IN (select CAT_GP_ID from cat_gunaprod where  CAT_GP_TIPOPROD = ?) ",new String[]{"COMPLEMENTARIO"})));
 //BA.debugLineNum = 2587;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2588;BA.debugLine="L_COMP.Text =d.GetString(\"MONTO_DIA\")";
_l_comp.setText(BA.ObjectToCharSequence(_d.GetString("MONTO_DIA")));
 //BA.debugLineNum = 2589;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 2591;BA.debugLine="L_PRIO.Text = \"0\"";
_l_prio.setText(BA.ObjectToCharSequence("0"));
 //BA.debugLineNum = 2592;BA.debugLine="L_SECUND.Text = \"0\"";
_l_secund.setText(BA.ObjectToCharSequence("0"));
 //BA.debugLineNum = 2593;BA.debugLine="L_COMP.Text = \"0\"";
_l_comp.setText(BA.ObjectToCharSequence("0"));
 };
 //BA.debugLineNum = 2596;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select COUNT(";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select COUNT(*) AS CUANTOS FROM PEDIDO WHERE PE_CEDIS = PE_PROID ")));
 //BA.debugLineNum = 2597;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 2598;BA.debugLine="If c.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_c.GetString("CUANTOS")))>0) { 
 //BA.debugLineNum = 2599;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"Select sum(p";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select sum(pe_cant) AS CUANTOS FROM PEDIDO WHERE PE_CEDIS = PE_PROID ")));
 //BA.debugLineNum = 2600;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2601;BA.debugLine="L_CTE_PROMO.Text = d.GetString(\"CUANTOS\")";
_l_cte_promo.setText(BA.ObjectToCharSequence(_d.GetString("CUANTOS")));
 //BA.debugLineNum = 2602;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2603;BA.debugLine="L_REDEN_PROMO.TEXT = Round2(L_VISITCC.Text / L_C";
_l_reden_promo.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_l_visitcc.getText()))/(double)(double)(Double.parseDouble(_l_cte_promo.getText())),(int) (2))));
 }else {
 //BA.debugLineNum = 2605;BA.debugLine="L_CTE_PROMO.Text = 0";
_l_cte_promo.setText(BA.ObjectToCharSequence(0));
 //BA.debugLineNum = 2606;BA.debugLine="L_REDEN_PROMO.Text = 0";
_l_reden_promo.setText(BA.ObjectToCharSequence(0));
 };
 //BA.debugLineNum = 2608;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 2609;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"Select COUNT(";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select COUNT(*) AS CUANTOS FROM PEDIDO ")));
 //BA.debugLineNum = 2610;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2611;BA.debugLine="L_LIN_TICK.Text = Round2(d.GetString(\"CUANTOS\") /";
_l_lin_tick.setText(BA.ObjectToCharSequence(__c.Round2((double)(Double.parseDouble(_d.GetString("CUANTOS")))/(double)(double)(Double.parseDouble(_l_visitcc.getText())),(int) (2))));
 //BA.debugLineNum = 2612;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2614;BA.debugLine="d=B4XPages.MainPage.skmt.ExecQuery(\"Select  count";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select  count(*) as CUANTOS  from HIST_CUOTAS ")));
 //BA.debugLineNum = 2615;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 2616;BA.debugLine="If d.GetString(\"CUANTOS\") > 0 Then";
if ((double)(Double.parseDouble(_d.GetString("CUANTOS")))>0) { 
 }else {
 //BA.debugLineNum = 2624;BA.debugLine="l_monto_c1.Text = 4000";
_l_monto_c1.setText(BA.ObjectToCharSequence(4000));
 //BA.debugLineNum = 2625;BA.debugLine="l_monto_c2.Text = 2000";
_l_monto_c2.setText(BA.ObjectToCharSequence(2000));
 //BA.debugLineNum = 2626;BA.debugLine="l_monto_c3.Text = 1000";
_l_monto_c3.setText(BA.ObjectToCharSequence(1000));
 };
 //BA.debugLineNum = 2628;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 2629;BA.debugLine="End Sub";
return "";
}
public String  _resumen_click() throws Exception{
 //BA.debugLineNum = 2422;BA.debugLine="Sub Resumen_Click";
 //BA.debugLineNum = 2423;BA.debugLine="P_RESUMEN.Visible = True";
_p_resumen.setVisible(__c.True);
 //BA.debugLineNum = 2431;BA.debugLine="End Sub";
return "";
}
public String  _subir_click() throws Exception{
int _i = 0;
byte[] _fotocn = null;
String _dirp = "";
String _dir = "";
String _dir2 = "";
int _dia = 0;
String _dialetra = "";
String _pcnoarts = "";
String _pcmonto = "";
 //BA.debugLineNum = 565;BA.debugLine="Sub Subir_Click";
 //BA.debugLineNum = 566;BA.debugLine="checaPedido";
_checapedido();
 //BA.debugLineNum = 567;BA.debugLine="CARGA = \"SUBIR\"";
_carga = "SUBIR";
 //BA.debugLineNum = 568;BA.debugLine="p_mandaInfo.Width = Root.Width";
_p_mandainfo.setWidth(_root.getWidth());
 //BA.debugLineNum = 569;BA.debugLine="p_mandaInfo.Height = Root.Height";
_p_mandainfo.setHeight(_root.getHeight());
 //BA.debugLineNum = 570;BA.debugLine="P1.Visible = True";
_p1.setVisible(__c.True);
 //BA.debugLineNum = 571;BA.debugLine="P1.Left = (p_mandaInfo.Width/2) - (P1.Width/2)";
_p1.setLeft((int) ((_p_mandainfo.getWidth()/(double)2)-(_p1.getWidth()/(double)2)));
 //BA.debugLineNum = 572;BA.debugLine="P1.top = (p_mandaInfo.Height/2) - (P1.Height/2)";
_p1.setTop((int) ((_p_mandainfo.getHeight()/(double)2)-(_p1.getHeight()/(double)2)));
 //BA.debugLineNum = 573;BA.debugLine="p_mandaInfo.Visible = True";
_p_mandainfo.setVisible(__c.True);
 //BA.debugLineNum = 574;BA.debugLine="P1.BringToFront";
_p1.BringToFront();
 //BA.debugLineNum = 575;BA.debugLine="p_mandaInfo.BringToFront";
_p_mandainfo.BringToFront();
 //BA.debugLineNum = 577;BA.debugLine="NUEVO.Visible =False";
_nuevo.setVisible(__c.False);
 //BA.debugLineNum = 578;BA.debugLine="BUSCA.Visible=False";
_busca.setVisible(__c.False);
 //BA.debugLineNum = 579;BA.debugLine="connecta.Visible=False";
_connecta.setVisible(__c.False);
 //BA.debugLineNum = 580;BA.debugLine="Subir.Visible=False";
_subir.setVisible(__c.False);
 //BA.debugLineNum = 581;BA.debugLine="cargar.Visible=False";
_cargar.setVisible(__c.False);
 //BA.debugLineNum = 582;BA.debugLine="L_P_1.Visible = False";
_l_p_1.setVisible(__c.False);
 //BA.debugLineNum = 583;BA.debugLine="S_CC.Visible = False";
_s_cc.setVisible(__c.False);
 //BA.debugLineNum = 584;BA.debugLine="L_P_3.Visible = False";
_l_p_3.setVisible(__c.False);
 //BA.debugLineNum = 585;BA.debugLine="S_CH.Visible = False";
_s_ch.setVisible(__c.False);
 //BA.debugLineNum = 586;BA.debugLine="PB1.Visible = False";
_pb1.setVisible(__c.False);
 //BA.debugLineNum = 587;BA.debugLine="Resumen.Visible= False";
_resumen.setVisible(__c.False);
 //BA.debugLineNum = 588;BA.debugLine="L_P_2.Text = \"Envio de Pedidos\"";
_l_p_2.setText(BA.ObjectToCharSequence("Envio de Pedidos"));
 //BA.debugLineNum = 589;BA.debugLine="L_P_3.Text = \"Envio de Pedidos\"";
_l_p_3.setText(BA.ObjectToCharSequence("Envio de Pedidos"));
 //BA.debugLineNum = 590;BA.debugLine="S_CH.Text = \"EN PROCESO\"";
_s_ch.setText(BA.ObjectToCharSequence("EN PROCESO"));
 //BA.debugLineNum = 591;BA.debugLine="S_CP.Text = \"EN PROCESO\"";
_s_cp.setText(BA.ObjectToCharSequence("EN PROCESO"));
 //BA.debugLineNum = 592;BA.debugLine="PB1.Progress = 0";
_pb1.setProgress((int) (0));
 //BA.debugLineNum = 593;BA.debugLine="PB2.Progress = 0";
_pb2.setProgress((int) (0));
 //BA.debugLineNum = 599;BA.debugLine="PASO = 1";
_paso = BA.NumberToString(1);
 //BA.debugLineNum = 601;BA.debugLine="If PASO = 1 Then";
if ((_paso).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 602;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"delete fro";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("delete from PEDIDO WHERE PE_PRONOMBRE = ? ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)("N/A")}));
 //BA.debugLineNum = 603;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente where PC_CLIENTE not In (select PE_CLIENTE from pedido)");
 //BA.debugLineNum = 604;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuar";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
 //BA.debugLineNum = 605;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 606;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 607;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 608;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select HGDAT";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select HGDATE, HGLAT, HGLON from HIST_GPS")));
 //BA.debugLineNum = 609;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 610;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step38 = 1;
final int limit38 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit38 ;_i = _i + step38 ) {
 //BA.debugLineNum = 611;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 612;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 613;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 614;BA.debugLine="cmd.Name = \"UPDATE_MEDI_ACTUAL2_GPS_V2\"";
_cmd.Name /*String*/  = "UPDATE_MEDI_ACTUAL2_GPS_V2";
 //BA.debugLineNum = 615;BA.debugLine="cmd.Parameters = Array As Object(L_MONTOD.Text";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_l_montod.getText()),(Object)(_l_cuantost.getText()),(Object)(_l_cuantosc.getText()),(Object)(_l_porvisitar.getText()),(Object)(_c.GetString("hglat")),(Object)(_c.GetString("hglon")),(Object)(_batterystatus[(int) (0)]),(Object)(_lpt),(Object)(_steyin),(Object)(_steyout),(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 616;BA.debugLine="reqManager.ExecuteCommand(cmd , \"update_gps\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("update_gps"));
 }
};
 };
 //BA.debugLineNum = 619;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 667;BA.debugLine="Dim fotocn() As Byte";
_fotocn = new byte[(int) (0)];
;
 //BA.debugLineNum = 668;BA.debugLine="Dim Dirp As String = File.DirInternal";
_dirp = __c.File.getDirInternal();
 //BA.debugLineNum = 669;BA.debugLine="Dim Dir As String";
_dir = "";
 //BA.debugLineNum = 670;BA.debugLine="Dim Dir2 As String";
_dir2 = "";
 //BA.debugLineNum = 671;BA.debugLine="Dir = \"/promotoriakmts\"";
_dir = "/promotoriakmts";
 //BA.debugLineNum = 673;BA.debugLine="c=Starter.skmt.ExecQuery(\"SELECT CN_ID, CN_FECHA";
_c = (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 CN_ID, CN_FECHA , CN_USER, CN_LAT, CN_LON, CN_NOMBRE, CN_DIRECCION, CN_FOTO, CN_ALMACEN, CN_RUTA, CN_GIRO, CN_SOLICITA, CN_COLONIA, CN_TELEFONO, CN_REFERENCIA, CN_HR_INICIO, CN_HR_FIN FROM CLIENTES_NUEVOS")));
 //BA.debugLineNum = 674;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 675;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step55 = 1;
final int limit55 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit55 ;_i = _i + step55 ) {
 //BA.debugLineNum = 676;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 677;BA.debugLine="Dim dia As Int = DateTime.GetDayOfWeek(DateTim";
_dia = __c.DateTime.GetDayOfWeek(__c.DateTime.getNow());
 //BA.debugLineNum = 678;BA.debugLine="If dia = 2  Then";
if (_dia==2) { 
 //BA.debugLineNum = 679;BA.debugLine="Dim dialetra As String = \"LUNES\"";
_dialetra = "LUNES";
 }else if(_dia==3) { 
 //BA.debugLineNum = 681;BA.debugLine="Dim dialetra As String = \"MARTES\"";
_dialetra = "MARTES";
 }else if(_dia==4) { 
 //BA.debugLineNum = 683;BA.debugLine="Dim dialetra As String = \"MIERCOLES\"";
_dialetra = "MIERCOLES";
 }else if(_dia==5) { 
 //BA.debugLineNum = 685;BA.debugLine="Dim dialetra As String = \"JUEVES\"";
_dialetra = "JUEVES";
 }else if(_dia==6) { 
 //BA.debugLineNum = 687;BA.debugLine="Dim dialetra As String = \"VIERNES\"";
_dialetra = "VIERNES";
 }else if(_dia==7) { 
 //BA.debugLineNum = 689;BA.debugLine="Dim dialetra As String = \"SABADO\"";
_dialetra = "SABADO";
 };
 //BA.debugLineNum = 691;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 692;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 693;BA.debugLine="cmd.Name = \"insert_clientesnuevos_MEDI_V2\"";
_cmd.Name /*String*/  = "insert_clientesnuevos_MEDI_V2";
 //BA.debugLineNum = 694;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("CN_ID")),(Object)(_c.GetString("CN_FECHA")),(Object)(_c.GetString("CN_USER")),(Object)(_c.GetString("CN_LAT")),(Object)(_c.GetString("CN_LON")),(Object)(_c.GetString("CN_NOMBRE")),(Object)(_c.GetString("CN_DIRECCION")),(Object)(_almacen),(Object)(_c.GetString("CN_RUTA")),(Object)("En espera"),(Object)(_c.GetString("CN_GIRO")),(Object)(_dialetra),(Object)(_c.GetString("CN_SOLICITA")),(Object)(_c.GetString("CN_COLONIA")),(Object)(_c.GetString("CN_TELEFONO")),(Object)(_c.GetString("CN_REFERENCIA")),(Object)(_c.GetString("CN_HR_INICIO")),(Object)(_c.GetString("CN_HR_FIN"))};
 //BA.debugLineNum = 695;BA.debugLine="Log($\"CN_ID: ${c.GetString(\"CN_ID\")}, FECHA: $";
__c.LogImpl("72424962",("CN_ID: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_ID")))+", FECHA: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_FECHA")))+", Usuario: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_USER")))+", Latitud: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_LAT")))+", Longitud: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_LON")))+", Nombre_ "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_NOMBRE")))+", Direccion: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_DIRECCION")))+", Almacen: "+__c.SmartStringFormatter("",(Object)(_almacen))+", Ruta: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_RUTA")))+", En espera, Giro: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_GIRO")))+", DiaLetra: "+__c.SmartStringFormatter("",(Object)(_dialetra))+", Solicita: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_SOLICITA")))+", Colonia: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_COLONIA")))+", Telefono: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_TELEFONO")))+", Referencia: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_REFERENCIA")))+", HrInicio: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_HR_INICIO")))+", HrFinal: "+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_HR_FIN")))+""),0);
 //BA.debugLineNum = 696;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_clientes";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_clientesn"));
 }
};
 };
 //BA.debugLineNum = 699;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 715;BA.debugLine="Dim PCNoArts As String";
_pcnoarts = "";
 //BA.debugLineNum = 716;BA.debugLine="Dim PCMonto As String";
_pcmonto = "";
 //BA.debugLineNum = 717;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT PC_";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .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,IFNULL(PC_IMPRESO,0) AS PC_IMPRESO FROM PEDIDO_CLIENTE WHERE PC_CLIENTE <> '1' ")));
 //BA.debugLineNum = 718;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery(\"SELECT COU";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE WHERE PC_CLIENTE <> 1 ")));
 //BA.debugLineNum = 719;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 720;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step85 = 1;
final int limit85 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit85 ;_i = _i + step85 ) {
 //BA.debugLineNum = 721;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 722;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 723;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 724;BA.debugLine="cmd.Name = \"insert_pedidos_MEDI_V2\"";
_cmd.Name /*String*/  = "insert_pedidos_MEDI_V2";
 //BA.debugLineNum = 725;BA.debugLine="PCNoArts = c.GetString(\"PC_NOART\")";
_pcnoarts = _c.GetString("PC_NOART");
 //BA.debugLineNum = 726;BA.debugLine="PCMonto = c.GetString(\"PC_MONTO\")";
_pcmonto = _c.GetString("PC_MONTO");
 //BA.debugLineNum = 727;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)(_subs._traeruta2 /*String*/ (ba,_c.GetString("PC_CLIENTE"))),(Object)(_c.GetString("PC_COSTO_SIN")),(Object)(_c.GetString("PC_FACTURA")),(Object)(_c.GetString("PC_IMPRESO"))};
 //BA.debugLineNum = 728;BA.debugLine="reqManager.ExecuteCommand(cmd , \"ins_pedidos\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("ins_pedidos"));
 //BA.debugLineNum = 729;BA.debugLine="Log(\">>>>>>  INSERT PEDIDO_CLIENTE\")";
__c.LogImpl("72424996",">>>>>>  INSERT PEDIDO_CLIENTE",0);
 }
};
 };
 //BA.debugLineNum = 732;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 733;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 734;BA.debugLine="cuantos_pedidosc = d.GetString(\"CUANTOS_PEDIDOSC";
_cuantos_pedidosc = _d.GetString("CUANTOS_PEDIDOSC");
 //BA.debugLineNum = 735;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 738;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT PE_";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .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, PE_CANTC, PE_BCAJAS,IFNULL(PE_IMPRESO,0) AS PE_IMPRESO FROM PEDIDO WHERE PE_FOLIO <> 'RECARGA'")));
 //BA.debugLineNum = 739;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery(\"SELECT COU";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")));
 //BA.debugLineNum = 740;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 741;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step104 = 1;
final int limit104 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit104 ;_i = _i + step104 ) {
 //BA.debugLineNum = 742;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 743;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 744;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 745;BA.debugLine="cmd.Name = \"insert_pedido_MEDI_V2\" 'CON TOTALE";
_cmd.Name /*String*/  = "insert_pedido_MEDI_V2";
 //BA.debugLineNum = 746;BA.debugLine="Log(c.GetString(\"PE_CEDIS\")&\", \"&ALMACEN&\", \"&";
__c.LogImpl("72425013",_c.GetString("PE_CEDIS")+", "+_almacen+", "+_c.GetString("PE_COSTO_TOT")+", "+_c.GetString("PE_COSTOU")+", "+_c.GetString("PE_CANT")+", "+_c.GetString("PE_PRONOMBRE")+", "+_c.GetString("PE_PROID")+", "+_c.GetString("PE_CLIENTE")+", "+_c.GetString("PE_FECHA")+", "+_c.GetString("PE_USUARIO")+", "+_subs._traeruta2 /*String*/ (ba,_c.GetString("PE_CLIENTE"))+", "+_c.GetString("PE_COSTO_SIN")+", "+_c.GetString("PE_DESC")+", "+_c.GetString("PE_FOLIO")+", "+_almacen,0);
 //BA.debugLineNum = 747;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)(_subs._traeruta2 /*String*/ (ba,_c.GetString("PE_CLIENTE"))),(Object)(_c.GetString("PE_COSTO_SIN")),(Object)(_c.GetString("PE_DESC")),(Object)(_c.GetString("PE_FOLIO")),(Object)(_c.GetString("PE_CANTC")),(Object)(_c.GetString("PE_BCAJAS")),(Object)(_c.GetString("PE_IMPRESO"))};
 //BA.debugLineNum = 748;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_pedidosP";
_reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_pedidosPendientes_prods_"+__c.SmartStringFormatter("",(Object)(_c.GetString("PE_CLIENTE")))+"_"+__c.SmartStringFormatter("",(Object)(_c.GetString("PE_PROID")))+"")));
 }
};
 };
 //BA.debugLineNum = 755;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 756;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 757;BA.debugLine="cuantos_pedido = D.GetString(\"CUANTOS_PEDIDO\")";
_cuantos_pedido = _d.GetString("CUANTOS_PEDIDO");
 //BA.debugLineNum = 758;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 761;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT NV_CL";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON FROM NOVENTA")));
 //BA.debugLineNum = 762;BA.debugLine="D=B4XPages.MainPage.skmt.ExecQuery(\"SELECT COUNT";
_d = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")));
 //BA.debugLineNum = 763;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 764;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step121 = 1;
final int limit121 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit121 ;_i = _i + step121 ) {
 //BA.debugLineNum = 765;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 766;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 767;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 768;BA.debugLine="cmd.Name = \"insert_noventa_MEDI_V2\"";
_cmd.Name /*String*/  = "insert_noventa_MEDI_V2";
 //BA.debugLineNum = 770;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)(_subs._traeruta2 /*String*/ (ba,_c.GetString("NV_CLIENTE"))),(Object)(_subs._traenombretienda /*String*/ (ba,("NV_CLIENTE")))};
 //BA.debugLineNum = 771;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 774;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 775;BA.debugLine="d.Position=0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 776;BA.debugLine="cuantos_noventa = D.GetString(\"CUANTOS_NOVENTA\")";
_cuantos_noventa = _d.GetString("CUANTOS_NOVENTA");
 //BA.debugLineNum = 777;BA.debugLine="d.Close";
_d.Close();
 //BA.debugLineNum = 780;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select HGCLI";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select HGCLIENTE, HGDATE, HGLAT, HGLON from HIST_GEOCERCA")));
 //BA.debugLineNum = 781;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 782;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step136 = 1;
final int limit136 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit136 ;_i = _i + step136 ) {
 //BA.debugLineNum = 783;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 784;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 785;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 786;BA.debugLine="cmd.Name = \"insert_geocerca_MEDI_V2\"";
_cmd.Name /*String*/  = "insert_geocerca_MEDI_V2";
 //BA.debugLineNum = 787;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 = 788;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 791;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 794;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"Select HFCLI";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("Select HFCLIENTE, HFALIAS,HFRUTA,HFALMACEN from HIST_FACE")));
 //BA.debugLineNum = 795;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 796;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step148 = 1;
final int limit148 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit148 ;_i = _i + step148 ) {
 //BA.debugLineNum = 797;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 798;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 799;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 800;BA.debugLine="cmd.Name = \"insert_face_like_MEDI_V2\"";
_cmd.Name /*String*/  = "insert_face_like_MEDI_V2";
 //BA.debugLineNum = 801;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 = 802;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\"";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 }
};
 };
 //BA.debugLineNum = 805;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 808;BA.debugLine="t1.Initialize(\"T1\", 30000) ' 1000 = 1 second";
_t1.Initialize(ba,"T1",(long) (30000));
 //BA.debugLineNum = 809;BA.debugLine="t1.Enabled = True";
_t1.setEnabled(__c.True);
 //BA.debugLineNum = 810;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 811;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 812;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 813;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 814;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 815;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 816;BA.debugLine="cmd.Name =\"insert_drop_MEDI_2_V2\"";
_cmd.Name /*String*/  = "insert_drop_MEDI_2_V2";
 //BA.debugLineNum = 817;BA.debugLine="cmd.Parameters = Array As Object(usuario,l_ruta.";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_usuario),(Object)(_l_ruta.getText()),(Object)(_sdate+_stime),(Object)(_l_porvisitar.getText()),(Object)(_l_drop.getText()),(Object)(_l_efectiva.getText()),(Object)(_l_cuantosc.getText()),(Object)(_l_cuantosn.getText()),(Object)(_l_montod.getText()),(Object)("ENVIO"),(Object)(_almacen),(Object)(__c.Application.getVersionName())};
 //BA.debugLineNum = 818;BA.debugLine="reqManager.ExecuteCommand(cmd , \"inst_noventa\")";
_reqmanager._executecommand /*String*/ (_cmd,(Object)("inst_noventa"));
 //BA.debugLineNum = 819;BA.debugLine="img2.Visible =True";
_img2.setVisible(__c.True);
 //BA.debugLineNum = 820;BA.debugLine="PORCENTAJE = Round(100/ (cuantos_noventa + cuant";
_porcentaje = BA.NumberToString(__c.Round(100/(double)((double)(Double.parseDouble(_cuantos_noventa))+(double)(Double.parseDouble(_cuantos_pedido))+(double)(Double.parseDouble(_cuantos_pedidosc))+1)));
 //BA.debugLineNum = 821;BA.debugLine="If Starter.marcaCel <> \"Sony\" Then ToastMessageS";
if ((_starter._marcacel /*String*/ ).equals("Sony") == false) { 
__c.ToastMessageShow(BA.ObjectToCharSequence("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias "+_l_ruta.getText()),__c.True);};
 //BA.debugLineNum = 839;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT * F";
_c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM PEDIDO_CLIENTE WHERE PC_CLIENTE <> 01")));
 //BA.debugLineNum = 840;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 841;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step174 = 1;
final int limit174 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit174 ;_i = _i + step174 ) {
 //BA.debugLineNum = 842;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 843;BA.debugLine="Dim cmd As DBCommand";
_cmd = new medicomed.keymon.com.mx.dbrequestmanager._dbcommand();
 //BA.debugLineNum = 844;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 845;BA.debugLine="cmd.Name = \"select_piezas_mazapa\"'IsaacVenAqui";
_cmd.Name /*String*/  = "select_piezas_mazapa";
 //BA.debugLineNum = 846;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_c.GetString("PC_CLIENTE")),(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 847;BA.debugLine="userpiezas = c.GetString(\"PC_CLIENTE\")";
_userpiezas = _c.GetString("PC_CLIENTE");
 //BA.debugLineNum = 848;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"piezas\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("piezas"));
 }
};
 };
 };
 //BA.debugLineNum = 854;BA.debugLine="End Sub";
return "";
}
public String  _t1_tick() throws Exception{
 //BA.debugLineNum = 2273;BA.debugLine="Sub t1_tick";
 //BA.debugLineNum = 2274;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2275;BA.debugLine="cmd.Name = \"select_cuantos_pedido_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cuantos_pedido_MEDI_V2";
 //BA.debugLineNum = 2276;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2277;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedido\")";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedido"));
 //BA.debugLineNum = 2279;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2280;BA.debugLine="cmd.Name = \"select_cuantos_noventa_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cuantos_noventa_MEDI_V2";
 //BA.debugLineNum = 2281;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2282;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_noventa\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_noventa"));
 //BA.debugLineNum = 2284;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
 //BA.debugLineNum = 2285;BA.debugLine="cmd.Name = \"select_cuantos_pedidoc_MEDI_V2\"";
_cmd.Name /*String*/  = "select_cuantos_pedidoc_MEDI_V2";
 //BA.debugLineNum = 2286;BA.debugLine="cmd.Parameters = Array As Object(ALMACEN,l_ruta.t";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(_almacen),(Object)(_l_ruta.getText())};
 //BA.debugLineNum = 2287;BA.debugLine="reqManager.ExecuteQuery(cmd , 0, \"valida_pedidoc\"";
_reqmanager._executequery /*String*/ (_cmd,(int) (0),(Object)("valida_pedidoc"));
 //BA.debugLineNum = 2289;BA.debugLine="If PB2.Progress = 0 Then";
if (_pb2.getProgress()==0) { 
 //BA.debugLineNum = 2290;BA.debugLine="S_CP.Text = \"ENVIAR DATOS (K-1)\"";
_s_cp.setText(BA.ObjectToCharSequence("ENVIAR DATOS (K-1)"));
 };
 //BA.debugLineNum = 2292;BA.debugLine="img2.Visible=False";
_img2.setVisible(__c.False);
 //BA.debugLineNum = 2293;BA.debugLine="t1.Enabled = False";
_t1.setEnabled(__c.False);
 //BA.debugLineNum = 2294;BA.debugLine="End Sub";
return "";
}
public String  _t2_tick() throws Exception{
 //BA.debugLineNum = 2170;BA.debugLine="Sub t2_tick";
 //BA.debugLineNum = 2171;BA.debugLine="e_ruta.Text = \"\"";
_e_ruta.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2172;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CAT_GIRO\")";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_GIRO");
 //BA.debugLineNum = 2173;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CLIENTE_NUEVO");
 //BA.debugLineNum = 2174;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PICKCIEGO_HECHO");
 //BA.debugLineNum = 2175;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido_cliente");
 //BA.debugLineNum = 2176;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from pedido");
 //BA.debugLineNum = 2177;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from PAGARES");
 //BA.debugLineNum = 2178;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from noventa");
 //BA.debugLineNum = 2179;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from clie_act");
 //BA.debugLineNum = 2180;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2181;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from kmt_info");
 //BA.debugLineNum = 2182;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod");
 //BA.debugLineNum = 2183;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from cat_gunaprod2");
 //BA.debugLineNum = 2184;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CAT_DETALLES_PAQ");
 //BA.debugLineNum = 2185;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VENTAS");
 //BA.debugLineNum = 2186;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from HIST_VERIFICACION");
 //BA.debugLineNum = 2187;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_ENCUESTA");
 //BA.debugLineNum = 2188;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_STAY_OUT");
 //BA.debugLineNum = 2189;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_GPS");
 //BA.debugLineNum = 2190;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_FACE");
 //BA.debugLineNum = 2191;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"INSERT INTO";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("INSERT INTO HIST_STAY_OUT(HSO_INI, HSO_FIN) VALUES (0,0)");
 //BA.debugLineNum = 2192;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM HIST_CODIGO_BARRAS");
 //BA.debugLineNum = 2193;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOSP");
 //BA.debugLineNum = 2194;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ABONOS");
 //BA.debugLineNum = 2195;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM PICK_CIEGO");
 //BA.debugLineNum = 2196;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTA_SUPLENCIA");
 //BA.debugLineNum = 2197;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM RUTAA");
 //BA.debugLineNum = 2198;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM CLIENTES_NUEVOS");
 //BA.debugLineNum = 2199;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"DELETE FROM";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("DELETE FROM ENV_MONTO_LIQ");
 //BA.debugLineNum = 2200;BA.debugLine="bitacora.borraDatosBitacora";
_bitacora._borradatosbitacora /*String*/ ();
 //BA.debugLineNum = 2201;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2202;BA.debugLine="l_rutasuplencia.Visible = False";
_l_rutasuplencia.setVisible(__c.False);
 //BA.debugLineNum = 2203;BA.debugLine="Label22.Visible = False";
_label22.setVisible(__c.False);
 //BA.debugLineNum = 2204;BA.debugLine="l_rutasuplencia.Text = \"\"";
_l_rutasuplencia.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 2206;BA.debugLine="t2.Enabled = False";
_t2.setEnabled(__c.False);
 //BA.debugLineNum = 2207;BA.debugLine="B4XPage_Appear";
_b4xpage_appear();
 //BA.debugLineNum = 2209;BA.debugLine="End Sub";
return "";
}
public String  _tickets_dia_click() throws Exception{
 //BA.debugLineNum = 2639;BA.debugLine="Sub tickets_dia_Click";
 //BA.debugLineNum = 2640;BA.debugLine="B4XPages.ShowPage(\"TicketsDia\")";
_b4xpages._showpage /*String*/ (ba,"TicketsDia");
 //BA.debugLineNum = 2641;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, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
if (BA.fastSubCompare(sub, "JOBDONE"))
	return _jobdone((medicomed.keymon.com.mx.httpjob) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
