package medicomed.keymon.com.mx;


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

public class c_nuevocliente 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_nuevocliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", medicomed.keymon.com.mx.c_nuevocliente.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.gps.GPS _g = null;
public String _ruta = "";
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cancela = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guarda = null;
public String _cuenta = "";
public String _usuario = "";
public String _sdate = "";
public String _stime = "";
public String _sdate2 = "";
public String _stime2 = "";
public String _no_cliente = "";
public String _no_ruta = "";
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_4 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_nombre = null;
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_sinubicacion = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_nuevocliente = null;
public anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_botones = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_cam = null;
public anywheresoftware.b4a.objects.PanelWrapper _p_camara = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_foto_inci = null;
public boolean _frontcamera = false;
public String _fototomada = "";
public String _almacen = "";
public anywheresoftware.b4a.objects.EditTextWrapper _et_direccion = null;
public anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
public double _lat = 0;
public double _lon = 0;
public anywheresoftware.b4a.objects.LabelWrapper _b_ubicacion = null;
public anywheresoftware.b4a.objects.LabelWrapper _label3 = null;
public medicomed.keymon.com.mx.b4xcombobox _cb_giro = null;
public String _giros = "";
public String _hr_ini = "";
public String _hr_fin = "";
public anywheresoftware.b4a.objects.LabelWrapper _l_atiende = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_atiende = null;
public anywheresoftware.b4a.objects.LabelWrapper _label5 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_colonia = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_telefono = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_referencia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_referecia = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_hora_final = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_hora_inicial = null;
public medicomed.keymon.com.mx.b4xcombobox _cb_hora_ini = null;
public medicomed.keymon.com.mx.b4xcombobox _cb_hora_fin = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_fin = null;
public anywheresoftware.b4a.objects.LabelWrapper _l_ini = 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  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.collections.List _items = null;
int _i = 0;
anywheresoftware.b4a.objects.collections.List _items2 = null;
String _hora = "";
anywheresoftware.b4a.objects.collections.List _item3 = null;
 //BA.debugLineNum = 80;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 81;BA.debugLine="et_direccion.Text = \"\"";
_et_direccion.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 82;BA.debugLine="E_NOMBRE.Text =  \"\"";
_e_nombre.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 83;BA.debugLine="ET_Atiende.Text = \"\"";
_et_atiende.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 84;BA.debugLine="et_colonia.Text = \"\"";
_et_colonia.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 85;BA.debugLine="et_telefono.Text = \"\"";
_et_telefono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 86;BA.debugLine="et_referencia.Text = \"\"";
_et_referencia.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 87;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 88;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
 //BA.debugLineNum = 89;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
 //BA.debugLineNum = 91;BA.debugLine="GUARDA.Visible = False";
_guarda.setVisible(__c.False);
 //BA.debugLineNum = 92;BA.debugLine="Subs.panelVisible(p_nuevoCliente, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_nuevocliente,(int) (0),(int) (0));
 //BA.debugLineNum = 93;BA.debugLine="p_nuevoCliente.Height = Root.Height";
_p_nuevocliente.setHeight(_root.getHeight());
 //BA.debugLineNum = 94;BA.debugLine="p_nuevoCliente.Width = Root.Width";
_p_nuevocliente.setWidth(_root.getWidth());
 //BA.debugLineNum = 95;BA.debugLine="Subs.centraEtiqueta(Label1, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label1,_root.getWidth());
 //BA.debugLineNum = 96;BA.debugLine="Subs.centraEtiqueta(Label5, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label5,_root.getWidth());
 //BA.debugLineNum = 97;BA.debugLine="Subs.centraEtiqueta(Label2, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label2,_root.getWidth());
 //BA.debugLineNum = 98;BA.debugLine="Subs.centraEtiqueta(Label3, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label3,_root.getWidth());
 //BA.debugLineNum = 99;BA.debugLine="Subs.centraEtiqueta(l_sinUbicacion, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_l_sinubicacion,_root.getWidth());
 //BA.debugLineNum = 100;BA.debugLine="Subs.centraEtiqueta(b_ubicacion, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_b_ubicacion,_root.getWidth());
 //BA.debugLineNum = 101;BA.debugLine="Subs.centraPanel(p_botones, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_botones,_root.getWidth());
 //BA.debugLineNum = 102;BA.debugLine="E_NOMBRE.Left = Round(Root.Width/2)-(E_NOMBRE.Wid";
_e_nombre.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_e_nombre.getWidth()/(double)2)));
 //BA.debugLineNum = 103;BA.debugLine="et_colonia.Left = Round(Root.Width/2)-(et_colonia";
_et_colonia.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_et_colonia.getWidth()/(double)2)));
 //BA.debugLineNum = 104;BA.debugLine="et_direccion.Left = Round(Root.Width/2)-(et_direc";
_et_direccion.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_et_direccion.getWidth()/(double)2)));
 //BA.debugLineNum = 105;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then";
if ((_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { 
 //BA.debugLineNum = 106;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostra";
_guarda.setVisible(__c.True);
 //BA.debugLineNum = 107;BA.debugLine="l_sinUbicacion.Visible = True";
_l_sinubicacion.setVisible(__c.True);
 };
 //BA.debugLineNum = 110;BA.debugLine="If Not(Starter.GPS.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 111;BA.debugLine="ToastMessageShow(\"Debe Activar el GPS del Equipo";
__c.ToastMessageShow(BA.ObjectToCharSequence("Debe Activar el GPS del Equipo."),__c.True);
 //BA.debugLineNum = 112;BA.debugLine="StartActivity(Starter.GPS.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 }else {
 //BA.debugLineNum = 114;BA.debugLine="Starter.GPS.Start(0, 0)";
_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .Start(ba,(long) (0),(float) (0));
 };
 //BA.debugLineNum = 116;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall");
 //BA.debugLineNum = 118;BA.debugLine="c = Starter.skmt.ExecQuery(\"SELECT GIRO FROM CAT_";
_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 GIRO FROM CAT_GIRO order by 1")));
 //BA.debugLineNum = 119;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 120;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 121;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCIÓN\")";
_items.Add((Object)("SELECCIONA UNA OPCIÓN"));
 //BA.debugLineNum = 122;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 123;BA.debugLine="For i = 0 To c.RowCount-1";
{
final int step41 = 1;
final int limit41 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit41 ;_i = _i + step41 ) {
 //BA.debugLineNum = 124;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 125;BA.debugLine="Items.Add(c.GetString(\"GIRO\"))";
_items.Add((Object)(_c.GetString("GIRO")));
 }
};
 //BA.debugLineNum = 127;BA.debugLine="cb_giro.SetItems(Items)";
_cb_giro._setitems /*String*/ (_items);
 };
 //BA.debugLineNum = 129;BA.debugLine="giros = \"SELECCIONA UNA OPCIÓN\"";
_giros = "SELECCIONA UNA OPCIÓN";
 //BA.debugLineNum = 130;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 132;BA.debugLine="Dim Items2 As List";
_items2 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 133;BA.debugLine="Items2.Initialize";
_items2.Initialize();
 //BA.debugLineNum = 134;BA.debugLine="Items2.Add(\"SELECCIONA UNA OPCIÓN\")";
_items2.Add((Object)("SELECCIONA UNA OPCIÓN"));
 //BA.debugLineNum = 135;BA.debugLine="For i = 7 To 23";
{
final int step52 = 1;
final int limit52 = (int) (23);
_i = (int) (7) ;
for (;_i <= limit52 ;_i = _i + step52 ) {
 //BA.debugLineNum = 136;BA.debugLine="Dim hora As String";
_hora = "";
 //BA.debugLineNum = 137;BA.debugLine="hora = i";
_hora = BA.NumberToString(_i);
 //BA.debugLineNum = 138;BA.debugLine="Items2.Add(hora)";
_items2.Add((Object)(_hora));
 }
};
 //BA.debugLineNum = 140;BA.debugLine="cb_hora_ini.SetItems(Items2)";
_cb_hora_ini._setitems /*String*/ (_items2);
 //BA.debugLineNum = 142;BA.debugLine="hr_ini = (\"SELECCIONA UNA OPCIÓN\")";
_hr_ini = ("SELECCIONA UNA OPCIÓN");
 //BA.debugLineNum = 144;BA.debugLine="Dim Item3 As List";
_item3 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 145;BA.debugLine="Item3.Initialize";
_item3.Initialize();
 //BA.debugLineNum = 146;BA.debugLine="Item3.Add(\"SELECCIONA UNA OPCIÓN\")";
_item3.Add((Object)("SELECCIONA UNA OPCIÓN"));
 //BA.debugLineNum = 147;BA.debugLine="cb_hora_fin.SetItems(Item3)";
_cb_hora_fin._setitems /*String*/ (_item3);
 //BA.debugLineNum = 148;BA.debugLine="hr_fin = \"SELECCIONA UNA OPCIÓN\"";
_hr_fin = "SELECCIONA UNA OPCIÓN";
 //BA.debugLineNum = 149;BA.debugLine="l_ini.Text=\"\"";
_l_ini.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 150;BA.debugLine="l_fin.Text=\"\"";
_l_fin.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 152;BA.debugLine="End Sub";
return "";
}
public void  _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
ResumableSub_B4XPage_Created rsub = new ResumableSub_B4XPage_Created(this,_root1);
rsub.resume(ba, null);
}
public static class ResumableSub_B4XPage_Created extends BA.ResumableSub {
public ResumableSub_B4XPage_Created(medicomed.keymon.com.mx.c_nuevocliente parent,anywheresoftware.b4a.objects.B4XViewWrapper _root1) {
this.parent = parent;
this._root1 = _root1;
}
medicomed.keymon.com.mx.c_nuevocliente parent;
anywheresoftware.b4a.objects.B4XViewWrapper _root1;
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 = 58;BA.debugLine="Root = Root1";
parent._root = _root1;
 //BA.debugLineNum = 59;BA.debugLine="Root.LoadLayout(\"nuevocliente\")";
parent._root.LoadLayout("nuevocliente",ba);
 //BA.debugLineNum = 60;BA.debugLine="ruta = File.DirInternal";
parent._ruta = parent.__c.File.getDirInternal();
 //BA.debugLineNum = 61;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (true) break;

case 1:
//if
this.state = 4;
if (parent.__c.File.Exists(parent._ruta,"kmt.db")==parent.__c.False) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 62;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
parent.__c.File.Copy(parent.__c.File.getDirAssets(),"kmt.db",parent._ruta,"kmt.db");
 if (true) break;

case 4:
//C
this.state = 5;
;
 //BA.debugLineNum = 64;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_WRITE_EXTERNAL_STORAGE);
 //BA.debugLineNum = 65;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 17;
return;
case 17:
//C
this.state = 5;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 66;BA.debugLine="If Result Then";
if (true) break;

case 5:
//if
this.state = 10;
if (_result) { 
this.state = 7;
}else {
this.state = 9;
}if (true) break;

case 7:
//C
this.state = 10;
 //BA.debugLineNum = 67;BA.debugLine="Log(\"Con permisos para escritura\")";
parent.__c.LogImpl("77864330","Con permisos para escritura",0);
 if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 69;BA.debugLine="ToastMessageShow(\"Sin permisos de escritura!!!\",";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Sin permisos de escritura!!!"),parent.__c.True);
 if (true) break;

case 10:
//C
this.state = 11;
;
 //BA.debugLineNum = 71;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .CheckAndRequest(ba,parent._starter._rp /*anywheresoftware.b4a.objects.RuntimePermissions*/ .PERMISSION_READ_EXTERNAL_STORAGE);
 //BA.debugLineNum = 72;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As";
parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null);
this.state = 18;
return;
case 18:
//C
this.state = 11;
_permission = (String) result[0];
_result = (Boolean) result[1];
;
 //BA.debugLineNum = 73;BA.debugLine="If Result Then";
if (true) break;

case 11:
//if
this.state = 16;
if (_result) { 
this.state = 13;
}else {
this.state = 15;
}if (true) break;

case 13:
//C
this.state = 16;
 //BA.debugLineNum = 74;BA.debugLine="Log(\"Con permisos para escritura\")";
parent.__c.LogImpl("77864337","Con permisos para escritura",0);
 if (true) break;

case 15:
//C
this.state = 16;
 //BA.debugLineNum = 76;BA.debugLine="ToastMessageShow(\"Sin permisos de lectura!!!\", T";
parent.__c.ToastMessageShow(BA.ObjectToCharSequence("Sin permisos de lectura!!!"),parent.__c.True);
 if (true) break;

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

            }
        }
    }
}
public void  _b4xpage_permissionresult(String _permission,boolean _result) throws Exception{
}
public String  _cancela_click() throws Exception{
 //BA.debugLineNum = 172;BA.debugLine="Sub CANCELA_Click";
 //BA.debugLineNum = 173;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 174;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP");
 //BA.debugLineNum = 175;BA.debugLine="End Sub";
return "";
}
public String  _cb_giro_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 256;BA.debugLine="Private Sub cb_giro_SelectedIndexChanged (Index As";
 //BA.debugLineNum = 257;BA.debugLine="giros = cb_giro.SelectedItem";
_giros = _cb_giro._getselecteditem /*String*/ ();
 //BA.debugLineNum = 258;BA.debugLine="End Sub";
return "";
}
public String  _cb_hora_fin_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 287;BA.debugLine="Private Sub cb_hora_fin_SelectedIndexChanged(Index";
 //BA.debugLineNum = 288;BA.debugLine="If Index = 0 Then";
if (_index==0) { 
 //BA.debugLineNum = 289;BA.debugLine="l_fin.Text = \"\"";
_l_fin.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 290;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 293;BA.debugLine="If cb_hora_fin.SelectedItem >= 7 And cb_hora_fin.";
if ((double)(Double.parseDouble(_cb_hora_fin._getselecteditem /*String*/ ()))>=7 && (double)(Double.parseDouble(_cb_hora_fin._getselecteditem /*String*/ ()))<=11) { 
 //BA.debugLineNum = 294;BA.debugLine="l_fin.Text = \"AM\"";
_l_fin.setText(BA.ObjectToCharSequence("AM"));
 }else if((double)(Double.parseDouble(_cb_hora_fin._getselecteditem /*String*/ ()))>=12 && (double)(Double.parseDouble(_cb_hora_fin._getselecteditem /*String*/ ()))<=23) { 
 //BA.debugLineNum = 296;BA.debugLine="l_fin.Text = \"PM\"";
_l_fin.setText(BA.ObjectToCharSequence("PM"));
 };
 //BA.debugLineNum = 298;BA.debugLine="End Sub";
return "";
}
public String  _cb_hora_ini_selectedindexchanged(int _index) throws Exception{
anywheresoftware.b4a.objects.collections.List _item3 = null;
int _horainicio = 0;
int _i = 0;
String _hora = "";
 //BA.debugLineNum = 261;BA.debugLine="Private Sub cb_hora_ini_SelectedIndexChanged(Index";
 //BA.debugLineNum = 262;BA.debugLine="Dim Item3 As List";
_item3 = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 263;BA.debugLine="Item3.Initialize";
_item3.Initialize();
 //BA.debugLineNum = 264;BA.debugLine="Item3.Add(\"SELECCIONA UNA OPCIÓN\")";
_item3.Add((Object)("SELECCIONA UNA OPCIÓN"));
 //BA.debugLineNum = 266;BA.debugLine="If Index = 0 Then";
if (_index==0) { 
 //BA.debugLineNum = 267;BA.debugLine="l_ini.Text = \"\"";
_l_ini.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 268;BA.debugLine="cb_hora_fin.SetItems(Item3)";
_cb_hora_fin._setitems /*String*/ (_item3);
 //BA.debugLineNum = 269;BA.debugLine="Return";
if (true) return "";
 };
 //BA.debugLineNum = 272;BA.debugLine="Dim horaInicio As Int = cb_hora_ini.SelectedItem";
_horainicio = (int) ((double)(Double.parseDouble(_cb_hora_ini._getselecteditem /*String*/ ()))+1);
 //BA.debugLineNum = 273;BA.debugLine="For i = horaInicio To 23";
{
final int step10 = 1;
final int limit10 = (int) (23);
_i = _horainicio ;
for (;_i <= limit10 ;_i = _i + step10 ) {
 //BA.debugLineNum = 274;BA.debugLine="Dim hora As String";
_hora = "";
 //BA.debugLineNum = 275;BA.debugLine="hora = i";
_hora = BA.NumberToString(_i);
 //BA.debugLineNum = 276;BA.debugLine="Item3.Add(hora)";
_item3.Add((Object)(_hora));
 }
};
 //BA.debugLineNum = 278;BA.debugLine="cb_hora_fin.SetItems(Item3)";
_cb_hora_fin._setitems /*String*/ (_item3);
 //BA.debugLineNum = 280;BA.debugLine="If cb_hora_ini.SelectedItem >= 7 And cb_hora_ini.";
if ((double)(Double.parseDouble(_cb_hora_ini._getselecteditem /*String*/ ()))>=7 && (double)(Double.parseDouble(_cb_hora_ini._getselecteditem /*String*/ ()))<=11) { 
 //BA.debugLineNum = 281;BA.debugLine="l_ini.Text = \"AM\"";
_l_ini.setText(BA.ObjectToCharSequence("AM"));
 }else if((double)(Double.parseDouble(_cb_hora_ini._getselecteditem /*String*/ ()))>=12 && (double)(Double.parseDouble(_cb_hora_ini._getselecteditem /*String*/ ()))<=23) { 
 //BA.debugLineNum = 283;BA.debugLine="l_ini.Text = \"PM\"";
_l_ini.setText(BA.ObjectToCharSequence("PM"));
 };
 //BA.debugLineNum = 285;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 = 4;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 5;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 6;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 7;BA.debugLine="Dim CANCELA As Button";
_cancela = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 8;BA.debugLine="Dim GUARDA As Button";
_guarda = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 9;BA.debugLine="Dim cuenta As String";
_cuenta = "";
 //BA.debugLineNum = 10;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 11;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 12;BA.debugLine="Dim sDate2,sTime2 As String";
_sdate2 = "";
_stime2 = "";
 //BA.debugLineNum = 13;BA.debugLine="Dim no_cliente As String";
_no_cliente = "";
 //BA.debugLineNum = 14;BA.debugLine="Dim no_ruta As String";
_no_ruta = "";
 //BA.debugLineNum = 15;BA.debugLine="Dim r_4 As RadioButton";
_r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
 //BA.debugLineNum = 16;BA.debugLine="Dim E_NOMBRE As EditText";
_e_nombre = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 17;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
 //BA.debugLineNum = 18;BA.debugLine="Private l_sinUbicacion As Label";
_l_sinubicacion = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 19;BA.debugLine="Private p_nuevoCliente As Panel";
_p_nuevocliente = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 20;BA.debugLine="Private Label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 21;BA.debugLine="Private p_botones As Panel";
_p_botones = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 22;BA.debugLine="Private p_cam As Panel";
_p_cam = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 23;BA.debugLine="Private p_camara As Panel";
_p_camara = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 24;BA.debugLine="Private b_foto_inci As Button";
_b_foto_inci = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 25;BA.debugLine="Dim frontCamera As Boolean = False";
_frontcamera = __c.False;
 //BA.debugLineNum = 26;BA.debugLine="Dim fototomada As String = \"0\"";
_fototomada = "0";
 //BA.debugLineNum = 27;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
 //BA.debugLineNum = 28;BA.debugLine="Private et_direccion As EditText";
_et_direccion = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 29;BA.debugLine="Private Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 30;BA.debugLine="Dim lat As Double = 0";
_lat = 0;
 //BA.debugLineNum = 31;BA.debugLine="Dim lon As Double = 0";
_lon = 0;
 //BA.debugLineNum = 32;BA.debugLine="Private b_ubicacion As Label";
_b_ubicacion = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 33;BA.debugLine="Private Label3 As Label";
_label3 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 34;BA.debugLine="Private cb_giro As B4XComboBox";
_cb_giro = new medicomed.keymon.com.mx.b4xcombobox();
 //BA.debugLineNum = 35;BA.debugLine="Dim giros As String";
_giros = "";
 //BA.debugLineNum = 36;BA.debugLine="Dim hr_ini As String";
_hr_ini = "";
 //BA.debugLineNum = 37;BA.debugLine="Dim hr_fin As String";
_hr_fin = "";
 //BA.debugLineNum = 38;BA.debugLine="Private L_Atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 39;BA.debugLine="Private ET_Atiende As EditText";
_et_atiende = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 40;BA.debugLine="Private Label5 As Label";
_label5 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 41;BA.debugLine="Private et_colonia As EditText";
_et_colonia = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 42;BA.debugLine="Private et_telefono As EditText";
_et_telefono = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 43;BA.debugLine="Private et_referencia As EditText";
_et_referencia = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 44;BA.debugLine="Private l_referecia As Label";
_l_referecia = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 45;BA.debugLine="Private l_hora_final As Label";
_l_hora_final = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 46;BA.debugLine="Private l_hora_inicial As Label";
_l_hora_inicial = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 47;BA.debugLine="Private cb_hora_ini As B4XComboBox";
_cb_hora_ini = new medicomed.keymon.com.mx.b4xcombobox();
 //BA.debugLineNum = 48;BA.debugLine="Private cb_hora_fin As B4XComboBox";
_cb_hora_fin = new medicomed.keymon.com.mx.b4xcombobox();
 //BA.debugLineNum = 49;BA.debugLine="Private l_fin As Label";
_l_fin = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 50;BA.debugLine="Private l_ini As Label";
_l_ini = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 51;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 154;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 155;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then";
if ((_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { 
 //BA.debugLineNum = 156;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostra";
_guarda.setVisible(__c.True);
 //BA.debugLineNum = 157;BA.debugLine="l_sinUbicacion.Visible = True";
_l_sinubicacion.setVisible(__c.True);
 //BA.debugLineNum = 158;BA.debugLine="lat = Location1.Latitude";
_lat = _location1.getLatitude();
 //BA.debugLineNum = 159;BA.debugLine="lon = Location1.Longitude";
_lon = _location1.getLongitude();
 //BA.debugLineNum = 160;BA.debugLine="l_sinUbicacion.Text = (\"Latitud: \" & lat & \", Lo";
_l_sinubicacion.setText(BA.ObjectToCharSequence(("Latitud: "+BA.NumberToString(_lat)+", Longotud: "+BA.NumberToString(_lon))));
 };
 //BA.debugLineNum = 163;BA.debugLine="b_ubicacion.TextSize = 13";
_b_ubicacion.setTextSize((float) (13));
 //BA.debugLineNum = 164;BA.debugLine="b_ubicacion.Text = $\"Precisión GPS $1.0{Location1";
_b_ubicacion.setText(BA.ObjectToCharSequence(("Precisión GPS "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
 //BA.debugLineNum = 165;BA.debugLine="If Location1.Accuracy > 200 Then";
if (_location1.getAccuracy()>200) { 
 //BA.debugLineNum = 166;BA.debugLine="b_ubicacion.TextColor = Colors.Red";
_b_ubicacion.setTextColor(__c.Colors.Red);
 //BA.debugLineNum = 167;BA.debugLine="b_ubicacion.TextSize = 16";
_b_ubicacion.setTextSize((float) (16));
 //BA.debugLineNum = 168;BA.debugLine="b_ubicacion.Text = $\"Mala señal $1.0{Location1.A";
_b_ubicacion.setText(BA.ObjectToCharSequence(("Mala señal "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
 };
 //BA.debugLineNum = 170;BA.debugLine="End Sub";
return "";
}
public String  _guarda_click() throws Exception{
String _hora = "";
String _mins = "";
String _segs = "";
 //BA.debugLineNum = 177;BA.debugLine="Sub GUARDA_Click";
 //BA.debugLineNum = 178;BA.debugLine="If E_NOMBRE.Text = \"\" Then";
if ((_e_nombre.getText()).equals("")) { 
 //BA.debugLineNum = 179;BA.debugLine="MsgboxAsync(\"Por favor captura el nombre de la T";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor captura el nombre de la Tienda"),BA.ObjectToCharSequence("Atención"),ba);
 }else if(_et_direccion.getText().length()>3) { 
 //BA.debugLineNum = 181;BA.debugLine="If lat <> 0 Then";
if (_lat!=0) { 
 //BA.debugLineNum = 182;BA.debugLine="If giros <> \"SELECCIONA UNA OPCIÓN\" Or cb_giro.";
if ((_giros).equals("SELECCIONA UNA OPCIÓN") == false || (_cb_giro._getselecteditem /*String*/ ()).equals("SELECCIONA UNA OPCIÓN") == false) { 
 //BA.debugLineNum = 183;BA.debugLine="If ET_Atiende.Text <> \"\" Then";
if ((_et_atiende.getText()).equals("") == false) { 
 //BA.debugLineNum = 184;BA.debugLine="If et_telefono.Text <> \"\" Then";
if ((_et_telefono.getText()).equals("") == false) { 
 //BA.debugLineNum = 185;BA.debugLine="If et_colonia.Text <> \"\" Then";
if ((_et_colonia.getText()).equals("") == false) { 
 //BA.debugLineNum = 186;BA.debugLine="If et_referencia.Text <> \"\" Then";
if ((_et_referencia.getText()).equals("") == false) { 
 //BA.debugLineNum = 187;BA.debugLine="If cb_hora_fin.SelectedItem <> \"SELECCIONA";
if ((_cb_hora_fin._getselecteditem /*String*/ ()).equals("SELECCIONA UNA OPCIÓN") == false && (_cb_hora_ini._getselecteditem /*String*/ ()).equals("SELECCIONA UNA OPCIÓN") == false) { 
 //BA.debugLineNum = 188;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 189;BA.debugLine="DateTime.Timeformat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 190;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 191;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 192;BA.debugLine="Log($\" ////////////   Date: ${sDate} - Tim";
__c.LogImpl("78126479",(" ////////////   Date: "+__c.SmartStringFormatter("",(Object)(_sdate))+" - Time: "+__c.SmartStringFormatter("",(Object)(_stime))+" ////////////////"),0);
 //BA.debugLineNum = 193;BA.debugLine="Private hora As String = sTime.SubString2(";
_hora = _stime.substring((int) (0),(int) (2));
 //BA.debugLineNum = 194;BA.debugLine="Private mins As String = sTime.SubString2(";
_mins = _stime.substring((int) (2),(int) (4));
 //BA.debugLineNum = 195;BA.debugLine="Private segs As String = sTime.SubString(4";
_segs = _stime.substring((int) (4));
 //BA.debugLineNum = 196;BA.debugLine="sTime = hora & \":\" & mins & \":\" & segs";
_stime = _hora+":"+_mins+":"+_segs;
 //BA.debugLineNum = 197;BA.debugLine="Log(\"////////////// sTime: \"&sTime&\" /////";
__c.LogImpl("78126484","////////////// sTime: "+_stime+" ////////////////",0);
 //BA.debugLineNum = 198;BA.debugLine="c = Starter.skmt.ExecQuery(\"select CAT_CL_";
_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 CAT_CL_RUTA FROM kmt_info")));
 //BA.debugLineNum = 199;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 200;BA.debugLine="no_ruta = c.GetString(\"CAT_CL_RUTA\")";
_no_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 201;BA.debugLine="no_cliente = \"N\" & sTime & no_ruta";
_no_cliente = "N"+_stime+_no_ruta;
 //BA.debugLineNum = 202;BA.debugLine="Log(\"++ ++ no_cliente = \"&no_cliente)";
__c.LogImpl("78126489","++ ++ no_cliente = "+_no_cliente,0);
 //BA.debugLineNum = 203;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 204;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO km";
_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, CAT_CL_GIRO) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,0,0,0,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_no_cliente),(Object)(_no_ruta),(Object)(_e_nombre.getText()),(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)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*medicomed.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_cb_giro._getselecteditem /*String*/ ())}));
 //BA.debugLineNum = 205;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO HI";
_starter._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)(_no_cliente)}));
 //BA.debugLineNum = 206;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from CUE";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 207;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CU";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_no_cliente)}));
 //BA.debugLineNum = 208;BA.debugLine="c = Starter.skmt.ExecQuery(\"select ID_ALMA";
_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 ID_ALMACEN from CAT_ALMACEN")));
 //BA.debugLineNum = 209;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 210;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 211;BA.debugLine="ALMACEN = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 };
 //BA.debugLineNum = 213;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 214;BA.debugLine="c = Starter.skmt.ExecQuery(\"select usuario";
_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 usuario from usuarioa")));
 //BA.debugLineNum = 215;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 216;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 217;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 218;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 219;BA.debugLine="DateTime.Timeformat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 220;BA.debugLine="sDate2 = DateTime.Date(DateTime.Now)";
_sdate2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 221;BA.debugLine="sTime2 = DateTime.Time(DateTime.Now)";
_stime2 = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 223;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO CL";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CLIENTES_NUEVOS(CN_ID, CN_FECHA, CN_USER, CN_LAT, CN_LON, CN_NOMBRE, CN_DIRECCION, CN_FOTO, CN_RUTA, CN_GIRO, CN_SOLICITA,CN_COLONIA, CN_TELEFONO, CN_REFERENCIA, CN_HR_INICIO, CN_HR_FIN) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_no_cliente,_sdate2+" "+_stime2,_usuario,BA.NumberToString(_lat),BA.NumberToString(_lon),_e_nombre.getText(),_et_direccion.getText(),_almacen,_no_ruta,_cb_giro._getselecteditem /*String*/ (),_et_atiende.getText(),_et_colonia.getText(),_et_telefono.getText(),_et_referencia.getText(),_cb_hora_ini._getselecteditem /*String*/ (),_cb_hora_fin._getselecteditem /*String*/ ()}));
 //BA.debugLineNum = 224;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 225;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP");
 }else {
 //BA.debugLineNum = 227;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar la";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar la apertura o el cierre del negocio."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 230;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar la r";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar la referencia del negocio."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 233;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar la co";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar la colonia el negocio."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 236;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar el tel";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar el telfono."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 239;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar al enca";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar al encargado que atiende el negocio."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 242;BA.debugLine="MsgboxAsync(\"Por favor captura el giro del cli";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor captura el giro del cliente"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 245;BA.debugLine="MsgboxAsync(\"Por favor revisa que tengas señal";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor revisa que tengas señal GPS"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 248;BA.debugLine="MsgboxAsync(\"Por favor captura la dirección del";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor captura la dirección del cliente"),BA.ObjectToCharSequence("Atención"),ba);
 };
 //BA.debugLineNum = 250;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 53;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 54;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 55;BA.debugLine="End Sub";
return null;
}
public String  _p_nuevocliente_click() throws Exception{
 //BA.debugLineNum = 252;BA.debugLine="Private Sub p_nuevoCliente_Click";
 //BA.debugLineNum = 254;BA.debugLine="End Sub";
return "";
}
public Object callSub(String sub, Object sender, Object[] args) throws Exception {
BA.senderHolder.set(sender);
if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED"))
	return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]);
return BA.SubDelegator.SubNotFound;
}
}
