package medicomed.keymon.com.mx;


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

public class c_clientes 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_clientes");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", medicomed.keymon.com.mx.c_clientes.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 public anywheresoftware.b4a.keywords.Common __c = null;
public anywheresoftware.b4a.objects.B4XViewWrapper _root = null;
public anywheresoftware.b4a.objects.B4XViewWrapper.XUI _xui = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c2 = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _d = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public String _entro = "";
public anywheresoftware.b4a.objects.ButtonWrapper _gest = null;
public anywheresoftware.b4a.objects.LabelWrapper _lfila = null;
public anywheresoftware.b4a.objects.EditTextWrapper _busca = null;
public String _colonia = "";
public anywheresoftware.b4a.objects.ButtonWrapper _b_qr = null;
public com.inforpires.baQRCode.baQRCode _qr = null;
public String _codigo = "";
public String _stime = "";
public String _ruta = "";
public String _q_buscar = "";
public anywheresoftware.b4a.objects.PanelWrapper _p_clientes = null;
public b4a.example3.customlistview _customlistview1 = null;
public anywheresoftware.b4a.objects.LabelWrapper _numerocliente = null;
public anywheresoftware.b4a.objects.LabelWrapper _nombrecliente = null;
public anywheresoftware.b4a.objects.LabelWrapper _direccion = null;
public anywheresoftware.b4a.objects.LabelWrapper _cxc = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_datosclie = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_buscar = null;
public int _check = 0;
public anywheresoftware.b4a.objects.LabelWrapper _l_baseodia = null;
public anywheresoftware.b4a.objects.LabelWrapper _credito = 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 String  _b_buscar_click() throws Exception{
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
 //BA.debugLineNum = 410;BA.debugLine="Private Sub b_buscar_Click";
 //BA.debugLineNum = 411;BA.debugLine="Log(CHECK)";
__c.LogImpl("746202881",BA.NumberToString(_check),0);
 //BA.debugLineNum = 412;BA.debugLine="If CHECK = 0 Then";
if (_check==0) { 
 //BA.debugLineNum = 413;BA.debugLine="l_baseodia.Text = \"Clientes de base de datos\"";
_l_baseodia.setText(BA.ObjectToCharSequence("Clientes de base de datos"));
 //BA.debugLineNum = 414;BA.debugLine="CHECK = 1";
_check = (int) (1);
 //BA.debugLineNum = 415;BA.debugLine="busca.Text = \"\"";
_busca.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 416;BA.debugLine="entro =\"2\"";
_entro = "2";
 //BA.debugLineNum = 417;BA.debugLine="colonia = 0";
_colonia = BA.NumberToString(0);
 //BA.debugLineNum = 418;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where  gestion = 0 AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("0"))+" AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("1"))+" ORDER BY CAT_CL_CODIGO"))));
 //BA.debugLineNum = 419;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 420;BA.debugLine="lfila.Text = \"NOMBRE\"";
_lfila.setText(BA.ObjectToCharSequence("NOMBRE"));
 //BA.debugLineNum = 421;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 422;BA.debugLine="CustomListView1.Clear";
_customlistview1._clear();
 //BA.debugLineNum = 423;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step13 = 1;
final int limit13 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit13 ;_i = _i + step13 ) {
 //BA.debugLineNum = 424;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 425;BA.debugLine="CustomListView1.Add(CreateListItem(c.GetString(";
_customlistview1._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c.GetString("CAT_CL_NOMBRE"),_c.GetString("CAT_CL_CALLE"),_c.GetString("CAT_CL_CODIGO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 426;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select CLIENTE FROM ABONOSP WHERE CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 427;BA.debugLine="If d.RowCount = 0 Then";
if (_d.getRowCount()==0) { 
 //BA.debugLineNum = 428;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 430;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 };
 //BA.debugLineNum = 433;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select I";
_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 IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 435;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 436;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 437;BA.debugLine="LogColor(d.GetString(\"CAT_CL_BCREDITO\"),Colors";
__c.LogImpl("746202907",_d.GetString("CAT_CL_BCREDITO"),__c.Colors.Blue);
 //BA.debugLineNum = 438;BA.debugLine="If d.GetString(\"CAT_CL_BCREDITO\") = \"1\" Then";
if ((_d.GetString("CAT_CL_BCREDITO")).equals("1")) { 
 //BA.debugLineNum = 439;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 442;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 //BA.debugLineNum = 444;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 446;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 }
};
 //BA.debugLineNum = 449;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 450;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step37 = 1;
final int limit37 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit37 ;_i = _i + step37 ) {
 //BA.debugLineNum = 451;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 452;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 453;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 454;BA.debugLine="label1.TextSize = 13";
_label1.setTextSize((float) (13));
 //BA.debugLineNum = 455;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 456;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 457;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 458;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
 //BA.debugLineNum = 459;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 460;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"CAT_CL_CODI";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 }
};
 };
 //BA.debugLineNum = 463;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 464;BA.debugLine="entro = \"4\"";
_entro = "4";
 }else if(_check==1) { 
 //BA.debugLineNum = 467;BA.debugLine="l_baseodia.Text = \"Clientes del día de visita\"";
_l_baseodia.setText(BA.ObjectToCharSequence("Clientes del día de visita"));
 //BA.debugLineNum = 468;BA.debugLine="CHECK = 0";
_check = (int) (0);
 //BA.debugLineNum = 469;BA.debugLine="busca.Text = \"\"";
_busca.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 470;BA.debugLine="entro =\"2\"";
_entro = "2";
 //BA.debugLineNum = 471;BA.debugLine="colonia = 0";
_colonia = BA.NumberToString(0);
 //BA.debugLineNum = 472;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where  gestion = 0 AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("0"))+" AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("1"))+" ORDER BY CAT_CL_CODIGO"))));
 //BA.debugLineNum = 473;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 474;BA.debugLine="lfila.Text = \"NOMBRE\"";
_lfila.setText(BA.ObjectToCharSequence("NOMBRE"));
 //BA.debugLineNum = 475;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 476;BA.debugLine="CustomListView1.Clear";
_customlistview1._clear();
 //BA.debugLineNum = 477;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step63 = 1;
final int limit63 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit63 ;_i = _i + step63 ) {
 //BA.debugLineNum = 478;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 479;BA.debugLine="CustomListView1.Add(CreateListItem(c.GetString(";
_customlistview1._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c.GetString("CAT_CL_NOMBRE"),_c.GetString("CAT_CL_CALLE"),_c.GetString("CAT_CL_CODIGO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 480;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select CLIENTE FROM ABONOSP WHERE CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 481;BA.debugLine="If d.RowCount = 0 Then";
if (_d.getRowCount()==0) { 
 //BA.debugLineNum = 482;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 484;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 };
 //BA.debugLineNum = 487;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select I";
_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 IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 489;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 490;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 491;BA.debugLine="LogColor(d.GetString(\"CAT_CL_BCREDITO\"),Colors";
__c.LogImpl("746202961",_d.GetString("CAT_CL_BCREDITO"),__c.Colors.Blue);
 //BA.debugLineNum = 492;BA.debugLine="If d.GetString(\"CAT_CL_BCREDITO\") = \"1\" Then";
if ((_d.GetString("CAT_CL_BCREDITO")).equals("1")) { 
 //BA.debugLineNum = 493;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 495;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 //BA.debugLineNum = 497;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 499;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 }
};
 //BA.debugLineNum = 502;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 503;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step87 = 1;
final int limit87 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit87 ;_i = _i + step87 ) {
 //BA.debugLineNum = 504;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 505;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 506;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 507;BA.debugLine="label1.TextSize = 13";
_label1.setTextSize((float) (13));
 //BA.debugLineNum = 508;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 509;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 510;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 511;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
 //BA.debugLineNum = 512;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 513;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"CAT_CL_CODI";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 }
};
 };
 //BA.debugLineNum = 516;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 517;BA.debugLine="entro = \"4\"";
_entro = "4";
 };
 //BA.debugLineNum = 520;BA.debugLine="End Sub";
return "";
}
public String  _b_qr_click() throws Exception{
int _scan_width = 0;
int _scan_height = 0;
 //BA.debugLineNum = 309;BA.debugLine="Sub b_qr_Click";
 //BA.debugLineNum = 310;BA.debugLine="Dim scan_width As Int";
_scan_width = 0;
 //BA.debugLineNum = 311;BA.debugLine="Dim scan_height As Int";
_scan_height = 0;
 //BA.debugLineNum = 312;BA.debugLine="scan_width = 400";
_scan_width = (int) (400);
 //BA.debugLineNum = 313;BA.debugLine="scan_height = 400";
_scan_height = (int) (400);
 //BA.debugLineNum = 314;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear() throws Exception{
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
 //BA.debugLineNum = 67;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 68;BA.debugLine="If B4XPages.MainPage.cliente.IsInitialized Then";
if (_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*medicomed.keymon.com.mx.c_cliente*/ .IsInitialized /*boolean*/ ()) { 
 //BA.debugLineNum = 69;BA.debugLine="B4XPages.MainPage.cliente.bitacora.enVenta = Fal";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*medicomed.keymon.com.mx.c_cliente*/ ._bitacora /*medicomed.keymon.com.mx.c_bitacora*/ ._enventa /*boolean*/  = __c.False;
 };
 //BA.debugLineNum = 71;BA.debugLine="l_baseodia.Text = \"Clientes del día de visita\"";
_l_baseodia.setText(BA.ObjectToCharSequence("Clientes del día de visita"));
 //BA.debugLineNum = 72;BA.debugLine="CHECK = 0";
_check = (int) (0);
 //BA.debugLineNum = 73;BA.debugLine="busca.Text = \"\"";
_busca.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 74;BA.debugLine="entro =\"2\"";
_entro = "2";
 //BA.debugLineNum = 75;BA.debugLine="colonia = 0";
_colonia = BA.NumberToString(0);
 //BA.debugLineNum = 76;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where  gestion = 0 AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("0"))+" AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("1"))+" AND CAT_CL_CODIGO NOT LIKE '%N%' ORDER BY CAST(CAT_CL_NUM_SERIEFISICO AS INTEGER) ASC"))));
 //BA.debugLineNum = 77;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 78;BA.debugLine="lfila.Text = \"NOMBRE\"";
_lfila.setText(BA.ObjectToCharSequence("NOMBRE"));
 //BA.debugLineNum = 80;BA.debugLine="CustomListView1.Clear";
_customlistview1._clear();
 //BA.debugLineNum = 81;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step13 = 1;
final int limit13 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit13 ;_i = _i + step13 ) {
 //BA.debugLineNum = 82;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 83;BA.debugLine="CustomListView1.Add(CreateListItem(c.GetString(\"";
_customlistview1._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c.GetString("CAT_CL_NOMBRE"),_c.GetString("CAT_CL_CALLE"),_c.GetString("CAT_CL_CODIGO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 84;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select CL";
_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 CLIENTE FROM ABONOSP WHERE CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 85;BA.debugLine="If d.RowCount = 0 Then";
if (_d.getRowCount()==0) { 
 //BA.debugLineNum = 86;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 88;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 };
 //BA.debugLineNum = 92;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select IF";
_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 IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 94;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 95;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 96;BA.debugLine="If d.GetString(\"CAT_CL_BCREDITO\") = \"1\" Then";
if ((_d.GetString("CAT_CL_BCREDITO")).equals("1")) { 
 //BA.debugLineNum = 97;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 99;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 //BA.debugLineNum = 101;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 103;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 }
};
 //BA.debugLineNum = 106;BA.debugLine="If c.RowCount>0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 107;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step36 = 1;
final int limit36 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit36 ;_i = _i + step36 ) {
 //BA.debugLineNum = 108;BA.debugLine="c.Position=i";
_c.setPosition(_i);
 //BA.debugLineNum = 109;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 110;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 111;BA.debugLine="label1.TextSize = 13";
_label1.setTextSize((float) (13));
 //BA.debugLineNum = 112;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 113;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 114;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 115;BA.debugLine="label2.TextSize = 13";
_label2.setTextSize((float) (13));
 //BA.debugLineNum = 116;BA.debugLine="label2.TextColor = Colors.Black";
_label2.setTextColor(__c.Colors.Black);
 //BA.debugLineNum = 117;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"CAT_CL_CODIG";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c.GetString("CAT_CL_NOMBRE")));
 }
};
 };
 //BA.debugLineNum = 120;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 121;BA.debugLine="entro = \"4\"";
_entro = "4";
 //BA.debugLineNum = 123;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_clientes parent) {
this.parent = parent;
}
medicomed.keymon.com.mx.c_clientes 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 = 202;BA.debugLine="Return True";
if (true) {
parent.__c.ReturnFromResumableSub(this,(Object)(parent.__c.True));return;};
 //BA.debugLineNum = 203;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public String  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
 //BA.debugLineNum = 44;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
 //BA.debugLineNum = 45;BA.debugLine="Root = Root1";
_root = _root1;
 //BA.debugLineNum = 47;BA.debugLine="Root.LoadLayout(\"clientes\")";
_root.LoadLayout("clientes",ba);
 //BA.debugLineNum = 49;BA.debugLine="entro =\"2\"";
_entro = "2";
 //BA.debugLineNum = 54;BA.debugLine="ruta = File.DirInternal";
_ruta = __c.File.getDirInternal();
 //BA.debugLineNum = 61;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(_ruta,"kmt.db")==__c.False) { 
 //BA.debugLineNum = 62;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",_ruta,"kmt.db");
 };
 //BA.debugLineNum = 64;BA.debugLine="qr.initialize";
_qr.initialize();
 //BA.debugLineNum = 65;BA.debugLine="End Sub";
return "";
}
public String  _busca_textchanged(String _old,String _new) throws Exception{
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
 //BA.debugLineNum = 205;BA.debugLine="Sub BUSCA_TextChanged (Old As String, New As Strin";
 //BA.debugLineNum = 206;BA.debugLine="If CHECK = 0 Then";
if (_check==0) { 
 //BA.debugLineNum = 207;BA.debugLine="q_buscar = \"%\" & busca.Text & \"%\"";
_q_buscar = "%"+_busca.getText()+"%";
 //BA.debugLineNum = 208;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2($\"select  C";
_c2 = (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_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("0"))+" AND CAT_CL_CODIGO <> "+__c.SmartStringFormatter("",(Object)("1"))+" AND CAT_CL_CODIGO NOT LIKE '%N%' order by CAT_CL_CODIGO "),new String[]{_q_buscar,_q_buscar,_q_buscar})));
 //BA.debugLineNum = 209;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 210;BA.debugLine="lfila.text = \"Nombre y Calle\"";
_lfila.setText(BA.ObjectToCharSequence("Nombre y Calle"));
 //BA.debugLineNum = 212;BA.debugLine="CustomListView1.Clear";
_customlistview1._clear();
 //BA.debugLineNum = 213;BA.debugLine="For i = 0 To c2.RowCount - 1";
{
final int step7 = 1;
final int limit7 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
 //BA.debugLineNum = 214;BA.debugLine="c2.Position = i";
_c2.setPosition(_i);
 //BA.debugLineNum = 215;BA.debugLine="CustomListView1.Add(CreateListItem(c2.GetString";
_customlistview1._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c2.GetString("CAT_CL_NOMBRE"),_c2.GetString("CAT_CL_CALLE"),_c2.GetString("CAT_CL_CODIGO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 216;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select CLIENTE FROM ABONOSP WHERE CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 217;BA.debugLine="If d.RowCount = 0 Then";
if (_d.getRowCount()==0) { 
 //BA.debugLineNum = 218;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 220;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 };
 //BA.debugLineNum = 224;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select I";
_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 IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 226;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 227;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 229;BA.debugLine="If d.GetString(\"CAT_CL_BCREDITO\") = \"1\" Then";
if ((_d.GetString("CAT_CL_BCREDITO")).equals("1")) { 
 //BA.debugLineNum = 230;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 232;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 //BA.debugLineNum = 234;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 236;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 }
};
 //BA.debugLineNum = 241;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 242;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step30 = 1;
final int limit30 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit30 ;_i = _i + step30 ) {
 //BA.debugLineNum = 243;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 244;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 245;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 246;BA.debugLine="label1.TextSize = 9";
_label1.setTextSize((float) (9));
 //BA.debugLineNum = 247;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
 //BA.debugLineNum = 248;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 249;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 250;BA.debugLine="label2.TextSize = 17";
_label2.setTextSize((float) (17));
 //BA.debugLineNum = 251;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
 //BA.debugLineNum = 252;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c2.GetString("CAT_CL_NOMBRE")+" CALLE:  "+_c2.GetString("CAT_CL_CALLE")));
 }
};
 };
 //BA.debugLineNum = 255;BA.debugLine="entro = \"4\"";
_entro = "4";
 //BA.debugLineNum = 256;BA.debugLine="c2.Close";
_c2.Close();
 }else if(_check==1) { 
 //BA.debugLineNum = 258;BA.debugLine="q_buscar = \"%\" & busca.Text & \"%\"";
_q_buscar = "%"+_busca.getText()+"%";
 //BA.debugLineNum = 259;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CA";
_c2 = (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_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 order by CAT_CL_CODIGO ",new String[]{_q_buscar,_q_buscar,_q_buscar})));
 //BA.debugLineNum = 260;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 261;BA.debugLine="lfila.text = \"Nombre y Calle\"";
_lfila.setText(BA.ObjectToCharSequence("Nombre y Calle"));
 //BA.debugLineNum = 263;BA.debugLine="CustomListView1.Clear";
_customlistview1._clear();
 //BA.debugLineNum = 264;BA.debugLine="For i = 0 To c2.RowCount - 1";
{
final int step51 = 1;
final int limit51 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit51 ;_i = _i + step51 ) {
 //BA.debugLineNum = 265;BA.debugLine="c2.Position = i";
_c2.setPosition(_i);
 //BA.debugLineNum = 266;BA.debugLine="CustomListView1.Add(CreateListItem(c2.GetString";
_customlistview1._add((anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(_createlistitem(_c2.GetString("CAT_CL_NOMBRE"),_c2.GetString("CAT_CL_CALLE"),_c2.GetString("CAT_CL_CODIGO")).getObject())),(Object)(_i));
 //BA.debugLineNum = 267;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"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*/ .ExecQuery(("select CLIENTE FROM ABONOSP WHERE CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 268;BA.debugLine="If d.RowCount = 0 Then";
if (_d.getRowCount()==0) { 
 //BA.debugLineNum = 269;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 271;BA.debugLine="cxc.Visible = False";
_cxc.setVisible(__c.False);
 };
 //BA.debugLineNum = 273;BA.debugLine="d = B4XPages.MainPage.skmt.ExecQuery($\"select I";
_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 IFNULL(CAT_CL_BCREDITO,0) AS CAT_CL_BCREDITO FROM kmt_info WHERE CAT_CL_CODIGO = '"+__c.SmartStringFormatter("",(Object)(_c2.GetString("CAT_CL_CODIGO")))+"'"))));
 //BA.debugLineNum = 275;BA.debugLine="If d.RowCount > 0 Then";
if (_d.getRowCount()>0) { 
 //BA.debugLineNum = 276;BA.debugLine="d.Position = 0";
_d.setPosition((int) (0));
 //BA.debugLineNum = 277;BA.debugLine="LogColor(d.GetString(\"CAT_CL_BCREDITO\"),Colors";
__c.LogImpl("745744200",_d.GetString("CAT_CL_BCREDITO"),__c.Colors.Blue);
 //BA.debugLineNum = 278;BA.debugLine="If d.GetString(\"CAT_CL_BCREDITO\") = \"1\" Then";
if ((_d.GetString("CAT_CL_BCREDITO")).equals("1")) { 
 //BA.debugLineNum = 279;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 }else {
 //BA.debugLineNum = 281;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 //BA.debugLineNum = 283;BA.debugLine="d.Close";
_d.Close();
 }else {
 //BA.debugLineNum = 285;BA.debugLine="CREDITO.Visible = False";
_credito.setVisible(__c.False);
 };
 }
};
 //BA.debugLineNum = 290;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 291;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step75 = 1;
final int limit75 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit75 ;_i = _i + step75 ) {
 //BA.debugLineNum = 292;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 293;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 294;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = _listview1.getTwoLinesLayout().Label;
 //BA.debugLineNum = 295;BA.debugLine="label1.TextSize = 9";
_label1.setTextSize((float) (9));
 //BA.debugLineNum = 296;BA.debugLine="label1.TextColor = Colors.White";
_label1.setTextColor(__c.Colors.White);
 //BA.debugLineNum = 297;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 298;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = _listview1.getTwoLinesLayout().SecondLabel;
 //BA.debugLineNum = 299;BA.debugLine="label2.TextSize = 17";
_label2.setTextSize((float) (17));
 //BA.debugLineNum = 300;BA.debugLine="label2.TextColor = Colors.White";
_label2.setTextColor(__c.Colors.White);
 //BA.debugLineNum = 301;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c2.GetString("CAT_CL_NOMBRE")+" CALLE:  "+_c2.GetString("CAT_CL_CALLE")));
 }
};
 };
 //BA.debugLineNum = 304;BA.debugLine="entro = \"4\"";
_entro = "4";
 //BA.debugLineNum = 305;BA.debugLine="c2.Close";
_c2.Close();
 };
 //BA.debugLineNum = 307;BA.debugLine="End Sub";
return "";
}
public String  _calc_ean_checksum(String _number) throws Exception{
int _i = 0;
char _co = '\0';
int _soma = 0;
int _n = 0;
float _digit = 0f;
 //BA.debugLineNum = 337;BA.debugLine="Sub calc_ean_checksum(number As String) As String";
 //BA.debugLineNum = 338;BA.debugLine="Dim i As Int";
_i = 0;
 //BA.debugLineNum = 339;BA.debugLine="Dim cO As Char";
_co = '\0';
 //BA.debugLineNum = 340;BA.debugLine="Dim soma As Int";
_soma = 0;
 //BA.debugLineNum = 341;BA.debugLine="Dim n As Int";
_n = 0;
 //BA.debugLineNum = 342;BA.debugLine="Dim digit As Float";
_digit = 0f;
 //BA.debugLineNum = 343;BA.debugLine="soma = 0";
_soma = (int) (0);
 //BA.debugLineNum = 344;BA.debugLine="For i=0 To number.Length - 1";
{
final int step7 = 1;
final int limit7 = (int) (_number.length()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
 //BA.debugLineNum = 345;BA.debugLine="digit = number.SubString2(i,i+1)";
_digit = (float)(Double.parseDouble(_number.substring(_i,(int) (_i+1))));
 //BA.debugLineNum = 346;BA.debugLine="n= digit * ((i Mod 2) * 2 + 1)";
_n = (int) (_digit*((_i%2)*2+1));
 //BA.debugLineNum = 347;BA.debugLine="soma=soma+n";
_soma = (int) (_soma+_n);
 }
};
 //BA.debugLineNum = 349;BA.debugLine="Return number & ( ( 10 - ( soma Mod 10 )) Mod 10";
if (true) return _number+BA.NumberToString(((10-(_soma%10))%10));
 //BA.debugLineNum = 350;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 6;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 7;BA.debugLine="Dim c2 As Cursor";
_c2 = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 8;BA.debugLine="Dim d As Cursor";
_d = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 9;BA.debugLine="Dim s As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 10;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
 //BA.debugLineNum = 11;BA.debugLine="Dim entro As String";
_entro = "";
 //BA.debugLineNum = 12;BA.debugLine="Dim gest As Button";
_gest = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 13;BA.debugLine="Dim lfila As Label";
_lfila = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 14;BA.debugLine="Dim busca As EditText";
_busca = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 15;BA.debugLine="Dim colonia As String";
_colonia = "";
 //BA.debugLineNum = 16;BA.debugLine="Private b_qr As Button";
_b_qr = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Private qr As QRCode";
_qr = new com.inforpires.baQRCode.baQRCode();
 //BA.debugLineNum = 19;BA.debugLine="Dim CODIGO As String";
_codigo = "";
 //BA.debugLineNum = 20;BA.debugLine="Dim STIME As String";
_stime = "";
 //BA.debugLineNum = 22;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 23;BA.debugLine="Dim q_buscar As String";
_q_buscar = "";
 //BA.debugLineNum = 24;BA.debugLine="Private p_clientes As Panel";
_p_clientes = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Private CustomListView1 As CustomListView";
_customlistview1 = new b4a.example3.customlistview();
 //BA.debugLineNum = 26;BA.debugLine="Private numerocliente As Label";
_numerocliente = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 27;BA.debugLine="Private nombrecliente As Label";
_nombrecliente = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 28;BA.debugLine="Private direccion As Label";
_direccion = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 29;BA.debugLine="Private cxc As Label";
_cxc = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Private p_datosclie As Panel";
_p_datosclie = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 31;BA.debugLine="Private b_buscar As Button";
_b_buscar = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 32;BA.debugLine="Private CHECK As Int";
_check = 0;
 //BA.debugLineNum = 33;BA.debugLine="Private l_baseodia As Label";
_l_baseodia = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 35;BA.debugLine="Private CREDITO As Label";
_credito = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 36;BA.debugLine="End Sub";
return "";
}
public anywheresoftware.b4a.objects.PanelWrapper  _createlistitem(String _mostrar,String _mostrar1,String _mostrar2) throws Exception{
anywheresoftware.b4a.objects.B4XViewWrapper _p = null;
 //BA.debugLineNum = 125;BA.debugLine="Sub CreateListItem(mostrar As String, mostrar1 As";
 //BA.debugLineNum = 126;BA.debugLine="Dim p As B4XView = xui.CreatePanel(\"\")";
_p = new anywheresoftware.b4a.objects.B4XViewWrapper();
_p = _xui.CreatePanel(ba,"");
 //BA.debugLineNum = 127;BA.debugLine="p.SetLayoutAnimated(0, 0, 0, 1, 220)";
_p.SetLayoutAnimated((int) (0),(int) (0),(int) (0),(int) (1),(int) (220));
 //BA.debugLineNum = 128;BA.debugLine="p.LoadLayout(\"datoscliente\")";
_p.LoadLayout("datoscliente",ba);
 //BA.debugLineNum = 129;BA.debugLine="p.Height= 60dip";
_p.setHeight(__c.DipToCurrent((int) (60)));
 //BA.debugLineNum = 131;BA.debugLine="nombrecliente.Text = mostrar";
_nombrecliente.setText(BA.ObjectToCharSequence(_mostrar));
 //BA.debugLineNum = 132;BA.debugLine="direccion.Text = mostrar1";
_direccion.setText(BA.ObjectToCharSequence(_mostrar1));
 //BA.debugLineNum = 133;BA.debugLine="numerocliente.Text = mostrar2";
_numerocliente.setText(BA.ObjectToCharSequence(_mostrar2));
 //BA.debugLineNum = 134;BA.debugLine="p_datosclie.Tag = mostrar2";
_p_datosclie.setTag((Object)(_mostrar2));
 //BA.debugLineNum = 137;BA.debugLine="Return p";
if (true) return (anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(_p.getObject()));
 //BA.debugLineNum = 138;BA.debugLine="End Sub";
return null;
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 39;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 40;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 41;BA.debugLine="End Sub";
return null;
}
public String  _listview1_itemclick(int _position,Object _value) throws Exception{
int _i = 0;
 //BA.debugLineNum = 140;BA.debugLine="Sub ListView1_ItemClick (Position As Int, value As";
 //BA.debugLineNum = 141;BA.debugLine="If colonia = 0 Then";
if ((_colonia).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 142;BA.debugLine="colonia = value";
_colonia = BA.ObjectToString(_value);
 };
 //BA.debugLineNum = 144;BA.debugLine="If entro = \"2\" Then";
if ((_entro).equals("2")) { 
 //BA.debugLineNum = 145;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select CAT";
_c2 = (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_CL_CALLE, CAT_CL_COLONIA, count(*) as cuantos from kmt_info where gestion = 0 and CAT_CL_COLONIA = ? GROUP BY CAT_CL_CALLE, CAT_CL_COLONIA order by CAT_CL_CALLE ",new String[]{BA.ObjectToString(_value)})));
 //BA.debugLineNum = 146;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 147;BA.debugLine="lfila.text = \"Calle\"";
_lfila.setText(BA.ObjectToCharSequence("Calle"));
 //BA.debugLineNum = 148;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 149;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step9 = 1;
final int limit9 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit9 ;_i = _i + step9 ) {
 //BA.debugLineNum = 150;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 151;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_CAL";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CALLE")),BA.ObjectToCharSequence(_c2.GetString("cuantos")));
 }
};
 };
 //BA.debugLineNum = 154;BA.debugLine="entro = \"3\"";
_entro = "3";
 }else if((_entro).equals("3")) { 
 //BA.debugLineNum = 156;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CA";
_c2 = (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_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where  gestion = 0 and  CAT_CL_CALLE = ? AND CAT_CL_COLONIA = ? order by CAT_CL_NOMBRE ",new String[]{BA.ObjectToString(_value),_colonia})));
 //BA.debugLineNum = 157;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 158;BA.debugLine="lfila.text = \"Nombre\"";
_lfila.setText(BA.ObjectToCharSequence("Nombre"));
 //BA.debugLineNum = 159;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 160;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step20 = 1;
final int limit20 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit20 ;_i = _i + step20 ) {
 //BA.debugLineNum = 161;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 162;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c2.GetString("CAT_CL_NOMBRE")));
 }
};
 };
 //BA.debugLineNum = 165;BA.debugLine="entro = \"4\"";
_entro = "4";
 }else if((_entro).equals("4")) { 
 //BA.debugLineNum = 167;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 168;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
 //BA.debugLineNum = 169;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 170;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 171;BA.debugLine="Starter.pre_viejo = Subs.traeTotalClienteprevent";
_starter._pre_viejo /*float*/  = (float) (_subs._traetotalclientepreventaparacredito /*double*/ (ba,BA.ObjectToString(_value)));
 //BA.debugLineNum = 172;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COUN";
_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*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = ? AND HSS_CODIGO In (select cuenta from cuentaa)",new String[]{"0"})));
 //BA.debugLineNum = 173;BA.debugLine="s.Position = 0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 174;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
if ((_s.GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 175;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 }else {
 //BA.debugLineNum = 177;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_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[]{_value}));
 //BA.debugLineNum = 178;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 };
 //BA.debugLineNum = 180;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_INI = ?  where HSO_INI = 0 ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 //BA.debugLineNum = 181;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 183;BA.debugLine="Subs.guardaClienteHoraInicio(value)";
_subs._guardaclientehorainicio /*String*/ (ba,BA.ObjectToString(_value));
 //BA.debugLineNum = 185;BA.debugLine="If B4XPages.MainPage.cliente.bitacora.IsInitiali";
if (_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*medicomed.keymon.com.mx.c_cliente*/ ._bitacora /*medicomed.keymon.com.mx.c_bitacora*/ .IsInitialized /*boolean*/ ()) { 
 //BA.debugLineNum = 186;BA.debugLine="Log(\"VAMOS A CLIENTE CON ENVENTA = FALSO\")";
__c.LogImpl("745613102","VAMOS A CLIENTE CON ENVENTA = FALSO",0);
 //BA.debugLineNum = 187;BA.debugLine="B4XPages.MainPage.cliente.bitacora.iniciamosVen";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*medicomed.keymon.com.mx.c_cliente*/ ._bitacora /*medicomed.keymon.com.mx.c_bitacora*/ ._iniciamosventa /*String*/ ();
 //BA.debugLineNum = 188;BA.debugLine="Log(B4XPages.MainPage.cliente.bitacora.enVenta)";
__c.LogImpl("745613104",BA.ObjectToString(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._cliente /*medicomed.keymon.com.mx.c_cliente*/ ._bitacora /*medicomed.keymon.com.mx.c_bitacora*/ ._enventa /*boolean*/ ),0);
 };
 //BA.debugLineNum = 191;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 };
 //BA.debugLineNum = 193;BA.debugLine="End Sub";
return "";
}
public String  _p_clientes_click() throws Exception{
 //BA.debugLineNum = 354;BA.debugLine="Private Sub p_clientes_Click";
 //BA.debugLineNum = 356;BA.debugLine="End Sub";
return "";
}
public String  _p_datosclie_click() throws Exception{
int _i = 0;
 //BA.debugLineNum = 358;BA.debugLine="Private Sub p_datosclie_Click";
 //BA.debugLineNum = 359;BA.debugLine="If colonia = 0 Then";
if ((_colonia).equals(BA.NumberToString(0))) { 
 //BA.debugLineNum = 360;BA.debugLine="colonia = Sender.As(Panel).tag";
_colonia = BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag());
 };
 //BA.debugLineNum = 362;BA.debugLine="If entro = \"2\" Then";
if ((_entro).equals("2")) { 
 //BA.debugLineNum = 363;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select CAT";
_c2 = (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_CL_CALLE, CAT_CL_COLONIA, count(*) as cuantos from kmt_info where gestion = 0 and CAT_CL_COLONIA = ? GROUP BY CAT_CL_CALLE, CAT_CL_COLONIA order by CAT_CL_CALLE ",new String[]{BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag())})));
 //BA.debugLineNum = 364;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 365;BA.debugLine="lfila.text = \"Calle\"";
_lfila.setText(BA.ObjectToCharSequence("Calle"));
 //BA.debugLineNum = 366;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 367;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step9 = 1;
final int limit9 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit9 ;_i = _i + step9 ) {
 //BA.debugLineNum = 368;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 369;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_CAL";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CALLE")),BA.ObjectToCharSequence(_c2.GetString("cuantos")));
 }
};
 };
 //BA.debugLineNum = 372;BA.debugLine="entro = \"3\"";
_entro = "3";
 }else if((_entro).equals("3")) { 
 //BA.debugLineNum = 374;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CA";
_c2 = (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_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where  gestion = 0 and  CAT_CL_CALLE = ? AND CAT_CL_COLONIA = ? order by CAT_CL_NOMBRE ",new String[]{BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()),_colonia})));
 //BA.debugLineNum = 375;BA.debugLine="ListView1.Clear";
_listview1.Clear();
 //BA.debugLineNum = 376;BA.debugLine="lfila.text = \"Nombre\"";
_lfila.setText(BA.ObjectToCharSequence("Nombre"));
 //BA.debugLineNum = 377;BA.debugLine="If c2.RowCount>0 Then";
if (_c2.getRowCount()>0) { 
 //BA.debugLineNum = 378;BA.debugLine="For i=0 To c2.RowCount -1";
{
final int step20 = 1;
final int limit20 = (int) (_c2.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit20 ;_i = _i + step20 ) {
 //BA.debugLineNum = 379;BA.debugLine="c2.Position=i";
_c2.setPosition(_i);
 //BA.debugLineNum = 380;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_COD";
_listview1.AddTwoLines(BA.ObjectToCharSequence(_c2.GetString("CAT_CL_CODIGO")),BA.ObjectToCharSequence(_c2.GetString("CAT_CL_NOMBRE")));
 }
};
 };
 //BA.debugLineNum = 383;BA.debugLine="entro = \"4\"";
_entro = "4";
 }else if((_entro).equals("4")) { 
 //BA.debugLineNum = 385;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 386;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()}));
 //BA.debugLineNum = 387;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 388;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 390;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery2(\"SELECT COUN";
_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*/ .ExecQuery2("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = ? AND HSS_CODIGO In (select cuenta from cuentaa)",new String[]{"0"})));
 //BA.debugLineNum = 391;BA.debugLine="s.Position = 0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 392;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
if ((_s.GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
 //BA.debugLineNum = 393;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 }else {
 //BA.debugLineNum = 395;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT IN";
_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[]{((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()}));
 //BA.debugLineNum = 396;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HI";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 };
 //BA.debugLineNum = 398;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_INI = ?  where HSO_INI = 0 ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_stime)}));
 //BA.debugLineNum = 399;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 401;BA.debugLine="Subs.guardaClienteHoraInicio(Sender.As(Panel).ta";
_subs._guardaclientehorainicio /*String*/ (ba,BA.ObjectToString(((anywheresoftware.b4a.objects.PanelWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.PanelWrapper(), (android.view.ViewGroup)(__c.Sender(ba)))).getTag()));
 //BA.debugLineNum = 403;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 };
 //BA.debugLineNum = 408;BA.debugLine="End Sub";
return "";
}
public String  _sc_noscan() throws Exception{
 //BA.debugLineNum = 333;BA.debugLine="Sub sc_noScan";
 //BA.debugLineNum = 334;BA.debugLine="Log(\"nothing returned from the scan !!!!!\")";
__c.LogImpl("745940737","nothing returned from the scan !!!!!",0);
 //BA.debugLineNum = 335;BA.debugLine="End Sub";
return "";
}
public String  _sc_result(String _atype,String _values) throws Exception{
 //BA.debugLineNum = 316;BA.debugLine="Sub sc_result(atype As String,Values As String)";
 //BA.debugLineNum = 317;BA.debugLine="CODIGO = Values";
_codigo = _values;
 //BA.debugLineNum = 318;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select   CO";
_c2 = (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 ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ?  order by CAT_CL_NOMBRE ",new String[]{_codigo})));
 //BA.debugLineNum = 319;BA.debugLine="c2.Position =0";
_c2.setPosition((int) (0));
 //BA.debugLineNum = 320;BA.debugLine="If c2.GetString(\"ENCONTRADO\") > 0 Then";
if ((double)(Double.parseDouble(_c2.GetString("ENCONTRADO")))>0) { 
 //BA.debugLineNum = 321;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery2(\"select   CA";
_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*/ .ExecQuery2("select   CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ?  order by CAT_CL_NOMBRE ",new String[]{_codigo})));
 //BA.debugLineNum = 322;BA.debugLine="s.Position =0";
_s.setPosition((int) (0));
 //BA.debugLineNum = 323;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 324;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_s.GetString("CAT_CL_CODIGO"))}));
 //BA.debugLineNum = 325;BA.debugLine="s.Close";
_s.Close();
 //BA.debugLineNum = 327;BA.debugLine="B4XPages.ShowPage(\"clientes\")";
_b4xpages._showpage /*String*/ (ba,"clientes");
 }else {
 //BA.debugLineNum = 329;BA.debugLine="Msgbox(\"CODIGO \" & CODIGO & \" NO ENCONTRADO\",\"AV";
__c.Msgbox(BA.ObjectToCharSequence("CODIGO "+_codigo+" NO ENCONTRADO"),BA.ObjectToCharSequence("AVISO"),ba);
 };
 //BA.debugLineNum = 331;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]);
return BA.SubDelegator.SubNotFound;
}
}
