package gunav2.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, "gunav2.keymon.com.mx.c_nuevocliente");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", gunav2.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.collections.List _lista_punta = null;
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 gunav2.keymon.com.mx.b4xcombobox _cb_giro = null;
public String _giros = "";
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_cp = null;
public anywheresoftware.b4a.objects.LabelWrapper _label6 = null;
public anywheresoftware.b4a.objects.PanelWrapper _panel1 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_calle1 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_calle2 = null;
public anywheresoftware.b4a.objects.ScrollViewWrapper _scv_nuevocliente = null;
public anywheresoftware.b4a.objects.LabelWrapper _label9 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_numeroint = null;
public anywheresoftware.b4a.objects.LabelWrapper _label10 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_numeroext = null;
public anywheresoftware.b4a.objects.LabelWrapper _label11 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _et_referencia = null;
public b4a.example.dateutils _dateutils = null;
public gunav2.keymon.com.mx.main _main = null;
public gunav2.keymon.com.mx.starter _starter = null;
public gunav2.keymon.com.mx.subs _subs = null;
public gunav2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public gunav2.keymon.com.mx.appupdater _appupdater = null;
public gunav2.keymon.com.mx.firebasemessaging _firebasemessaging = null;
public gunav2.keymon.com.mx.tracker _tracker = null;
public gunav2.keymon.com.mx.newinst2 _newinst2 = null;
public gunav2.keymon.com.mx.b4xpages _b4xpages = null;
public gunav2.keymon.com.mx.b4xcollections _b4xcollections = null;
public gunav2.keymon.com.mx.httputils2service _httputils2service = null;
public gunav2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public String  _b4xpage_appear() throws Exception{
anywheresoftware.b4a.objects.collections.List _items = null;
int _i = 0;
 //BA.debugLineNum = 247;BA.debugLine="Sub B4XPage_Appear";
 //BA.debugLineNum = 249;BA.debugLine="scv_nuevocliente.Panel.RemoveAllViews";
_scv_nuevocliente.getPanel().RemoveAllViews();
 //BA.debugLineNum = 250;BA.debugLine="scv_nuevocliente.Panel.LoadLayout(\"Panel_Nuevocli";
_scv_nuevocliente.getPanel().LoadLayout("Panel_Nuevocliente",ba);
 //BA.debugLineNum = 251;BA.debugLine="scv_nuevocliente.Panel.Height = 1100dip";
_scv_nuevocliente.getPanel().setHeight(__c.DipToCurrent((int) (1100)));
 //BA.debugLineNum = 253;BA.debugLine="Panel1.Visible = False";
_panel1.setVisible(__c.False);
 //BA.debugLineNum = 254;BA.debugLine="p_nuevoCliente.Visible = False";
_p_nuevocliente.setVisible(__c.False);
 //BA.debugLineNum = 255;BA.debugLine="p_nuevoCliente.Visible = True";
_p_nuevocliente.setVisible(__c.True);
 //BA.debugLineNum = 256;BA.debugLine="Panel1.Visible = True";
_panel1.setVisible(__c.True);
 //BA.debugLineNum = 257;BA.debugLine="et_direccion.Text = \"\"";
_et_direccion.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 258;BA.debugLine="E_NOMBRE.Text =  \"\"";
_e_nombre.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 259;BA.debugLine="ET_Atiende.Text = \"\"";
_et_atiende.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 260;BA.debugLine="et_colonia.Text = \"\"";
_et_colonia.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 261;BA.debugLine="et_telefono.Text = \"\"";
_et_telefono.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 262;BA.debugLine="et_cp.Text = \"\"";
_et_cp.setText(BA.ObjectToCharSequence(""));
 //BA.debugLineNum = 263;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 264;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
 //BA.debugLineNum = 265;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
 //BA.debugLineNum = 267;BA.debugLine="GUARDA.Visible = False";
_guarda.setVisible(__c.False);
 //BA.debugLineNum = 268;BA.debugLine="Subs.panelVisible(p_nuevoCliente, 0, 0)";
_subs._panelvisible /*String*/ (ba,_p_nuevocliente,(int) (0),(int) (0));
 //BA.debugLineNum = 269;BA.debugLine="Subs.panelVisible(Panel1, 0, 0)";
_subs._panelvisible /*String*/ (ba,_panel1,(int) (0),(int) (0));
 //BA.debugLineNum = 271;BA.debugLine="p_nuevoCliente.Width = Root.Width";
_p_nuevocliente.setWidth(_root.getWidth());
 //BA.debugLineNum = 272;BA.debugLine="Panel1.Width = Root.Width";
_panel1.setWidth(_root.getWidth());
 //BA.debugLineNum = 273;BA.debugLine="Panel1.Height = p_nuevoCliente.Height";
_panel1.setHeight(_p_nuevocliente.getHeight());
 //BA.debugLineNum = 274;BA.debugLine="Subs.centraEtiqueta(Label1, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label1,_root.getWidth());
 //BA.debugLineNum = 275;BA.debugLine="Subs.centraEtiqueta(Label5, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label5,_root.getWidth());
 //BA.debugLineNum = 276;BA.debugLine="Subs.centraEtiqueta(Label6, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label6,_root.getWidth());
 //BA.debugLineNum = 277;BA.debugLine="Subs.centraEtiqueta(Label2, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label2,_root.getWidth());
 //BA.debugLineNum = 278;BA.debugLine="Subs.centraEtiqueta(Label3, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_label3,_root.getWidth());
 //BA.debugLineNum = 279;BA.debugLine="Subs.centraEtiqueta(l_sinUbicacion, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_l_sinubicacion,_root.getWidth());
 //BA.debugLineNum = 280;BA.debugLine="Subs.centraEtiqueta(b_ubicacion, Root.Width)";
_subs._centraetiqueta /*String*/ (ba,_b_ubicacion,_root.getWidth());
 //BA.debugLineNum = 281;BA.debugLine="Subs.centraPanel(p_botones, Root.Width)";
_subs._centrapanel /*String*/ (ba,_p_botones,_root.getWidth());
 //BA.debugLineNum = 282;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 = 283;BA.debugLine="et_cp.Left = Round(Root.Width/2)-(E_NOMBRE.Width/";
_et_cp.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_e_nombre.getWidth()/(double)2)));
 //BA.debugLineNum = 284;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 = 285;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 = 286;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { 
 //BA.debugLineNum = 287;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostra";
_guarda.setVisible(__c.True);
 //BA.debugLineNum = 288;BA.debugLine="l_sinUbicacion.Visible = True";
_l_sinubicacion.setVisible(__c.True);
 };
 //BA.debugLineNum = 291;BA.debugLine="CallSubDelayed(Tracker, \"Track\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"Track");
 //BA.debugLineNum = 292;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall");
 //BA.debugLineNum = 293;BA.debugLine="If Tracker.FLP.IsInitialized And Tracker.FLP.GetL";
if (_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .IsInitialized() && _tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().IsInitialized()) { 
 //BA.debugLineNum = 294;BA.debugLine="B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLatitude());
 //BA.debugLineNum = 295;BA.debugLine="B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastK";
_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/  = BA.NumberToString(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation().getLongitude());
 //BA.debugLineNum = 297;BA.debugLine="GPS_LocationChanged(Tracker.FLP.GetLastKnownLoca";
_gps_locationchanged(_tracker._flp /*uk.co.martinpearman.b4a.fusedlocationprovider.FusedLocationProviderWrapper*/ .GetLastKnownLocation());
 };
 //BA.debugLineNum = 312;BA.debugLine="If Not(Starter.GPS.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
 //BA.debugLineNum = 313;BA.debugLine="ToastMessageShow(\"Debe Activar el GPS del Equipo";
__c.ToastMessageShow(BA.ObjectToCharSequence("Debe Activar el GPS del Equipo."),__c.True);
 //BA.debugLineNum = 314;BA.debugLine="StartActivity(Starter.GPS.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 }else {
 //BA.debugLineNum = 316;BA.debugLine="Starter.GPS.Start(0, 0)";
_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .Start(ba,(long) (0),(float) (0));
 };
 //BA.debugLineNum = 319;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall");
 //BA.debugLineNum = 321;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 = 322;BA.debugLine="Dim Items As List";
_items = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 323;BA.debugLine="Items.Initialize";
_items.Initialize();
 //BA.debugLineNum = 324;BA.debugLine="Items.Add(\"SELECCIONA UNA OPCIÓN\")";
_items.Add((Object)("SELECCIONA UNA OPCIÓN"));
 //BA.debugLineNum = 325;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 326;BA.debugLine="For i = 0 To c.RowCount-1";
{
final int step59 = 1;
final int limit59 = (int) (_c.getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit59 ;_i = _i + step59 ) {
 //BA.debugLineNum = 327;BA.debugLine="c.Position = i";
_c.setPosition(_i);
 //BA.debugLineNum = 328;BA.debugLine="Items.Add(c.GetString(\"GIRO\"))";
_items.Add((Object)(_c.GetString("GIRO")));
 }
};
 //BA.debugLineNum = 330;BA.debugLine="cb_giro.SetItems(Items)";
_cb_giro._setitems /*String*/ (_items);
 };
 //BA.debugLineNum = 332;BA.debugLine="giros = \"SELECCIONA UNA OPCIÓN\"";
_giros = "SELECCIONA UNA OPCIÓN";
 //BA.debugLineNum = 333;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 334;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(gunav2.keymon.com.mx.c_nuevocliente parent,anywheresoftware.b4a.objects.B4XViewWrapper _root1) {
this.parent = parent;
this._root1 = _root1;
}
gunav2.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 = 206;BA.debugLine="Root = Root1";
parent._root = _root1;
 //BA.debugLineNum = 208;BA.debugLine="Root.LoadLayout(\"nuevocliente\")";
parent._root.LoadLayout("nuevocliente",ba);
 //BA.debugLineNum = 209;BA.debugLine="scv_nuevocliente.Height = Root.Height";
parent._scv_nuevocliente.setHeight(parent._root.getHeight());
 //BA.debugLineNum = 210;BA.debugLine="scv_nuevocliente.Width = Root.Width";
parent._scv_nuevocliente.setWidth(parent._root.getWidth());
 //BA.debugLineNum = 212;BA.debugLine="ruta = File.DirInternal";
parent._ruta = parent.__c.File.getDirInternal();
 //BA.debugLineNum = 213;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 = 214;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 = 228;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 = 229;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 = 230;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 = 231;BA.debugLine="Log(\"Con permisos para escritura\")";
parent.__c.LogImpl("438338587","Con permisos para escritura",0);
 if (true) break;

case 9:
//C
this.state = 10;
 //BA.debugLineNum = 233;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 = 236;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 = 237;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 = 238;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 = 239;BA.debugLine="Log(\"Con permisos para escritura\")";
parent.__c.LogImpl("438338595","Con permisos para escritura",0);
 if (true) break;

case 15:
//C
this.state = 16;
 //BA.debugLineNum = 241;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 = 243;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 = 360;BA.debugLine="Sub CANCELA_Click";
 //BA.debugLineNum = 361;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
 //BA.debugLineNum = 362;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP");
 //BA.debugLineNum = 363;BA.debugLine="End Sub";
return "";
}
public String  _cb_giro_selectedindexchanged(int _index) throws Exception{
 //BA.debugLineNum = 633;BA.debugLine="Private Sub cb_giro_SelectedIndexChanged (Index As";
 //BA.debugLineNum = 634;BA.debugLine="giros = cb_giro.SelectedItem";
_giros = _cb_giro._getselecteditem /*String*/ ();
 //BA.debugLineNum = 635;BA.debugLine="End Sub";
return "";
}
public String  _class_globals() throws Exception{
 //BA.debugLineNum = 140;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 141;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
 //BA.debugLineNum = 142;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
 //BA.debugLineNum = 144;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
 //BA.debugLineNum = 145;BA.debugLine="Dim ruta As String";
_ruta = "";
 //BA.debugLineNum = 146;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
 //BA.debugLineNum = 148;BA.debugLine="Dim CANCELA As Button";
_cancela = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 149;BA.debugLine="Dim GUARDA As Button";
_guarda = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 150;BA.debugLine="Dim cuenta As String";
_cuenta = "";
 //BA.debugLineNum = 151;BA.debugLine="Dim usuario As String";
_usuario = "";
 //BA.debugLineNum = 152;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
 //BA.debugLineNum = 153;BA.debugLine="Dim sDate2,sTime2 As String";
_sdate2 = "";
_stime2 = "";
 //BA.debugLineNum = 154;BA.debugLine="Dim no_cliente As String";
_no_cliente = "";
 //BA.debugLineNum = 155;BA.debugLine="Dim no_ruta As String";
_no_ruta = "";
 //BA.debugLineNum = 156;BA.debugLine="Dim lista_punta As List";
_lista_punta = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 157;BA.debugLine="Dim r_4 As RadioButton";
_r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
 //BA.debugLineNum = 158;BA.debugLine="Dim E_NOMBRE As EditText";
_e_nombre = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 159;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
 //BA.debugLineNum = 160;BA.debugLine="Private l_sinUbicacion As Label";
_l_sinubicacion = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 161;BA.debugLine="Private p_nuevoCliente As Panel";
_p_nuevocliente = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 162;BA.debugLine="Private Label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 163;BA.debugLine="Private p_botones As Panel";
_p_botones = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 164;BA.debugLine="Private p_cam As Panel";
_p_cam = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 165;BA.debugLine="Private p_camara As Panel";
_p_camara = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 166;BA.debugLine="Private b_foto_inci As Button";
_b_foto_inci = new anywheresoftware.b4a.objects.ButtonWrapper();
 //BA.debugLineNum = 168;BA.debugLine="Dim frontCamera As Boolean = False";
_frontcamera = __c.False;
 //BA.debugLineNum = 169;BA.debugLine="Dim fototomada As String = \"0\"";
_fototomada = "0";
 //BA.debugLineNum = 170;BA.debugLine="Dim ALMACEN As String";
_almacen = "";
 //BA.debugLineNum = 171;BA.debugLine="Private et_direccion As EditText";
_et_direccion = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 172;BA.debugLine="Private Label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 173;BA.debugLine="Dim lat As Double = 0";
_lat = 0;
 //BA.debugLineNum = 174;BA.debugLine="Dim lon As Double = 0";
_lon = 0;
 //BA.debugLineNum = 175;BA.debugLine="Private b_ubicacion As Label";
_b_ubicacion = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 176;BA.debugLine="Private Label3 As Label";
_label3 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 177;BA.debugLine="Private cb_giro As B4XComboBox";
_cb_giro = new gunav2.keymon.com.mx.b4xcombobox();
 //BA.debugLineNum = 178;BA.debugLine="Dim giros As String";
_giros = "";
 //BA.debugLineNum = 179;BA.debugLine="Private L_Atiende As Label";
_l_atiende = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 180;BA.debugLine="Private ET_Atiende As EditText";
_et_atiende = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 181;BA.debugLine="Private Label5 As Label";
_label5 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 182;BA.debugLine="Private et_colonia As EditText";
_et_colonia = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 183;BA.debugLine="Private et_telefono As EditText";
_et_telefono = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 184;BA.debugLine="Private et_cp As EditText";
_et_cp = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 185;BA.debugLine="Private Label6 As Label";
_label6 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 186;BA.debugLine="Private Panel1 As Panel";
_panel1 = new anywheresoftware.b4a.objects.PanelWrapper();
 //BA.debugLineNum = 187;BA.debugLine="Private et_calle1 As EditText";
_et_calle1 = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 188;BA.debugLine="Private et_calle2 As EditText";
_et_calle2 = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 189;BA.debugLine="Private scv_nuevocliente As ScrollView";
_scv_nuevocliente = new anywheresoftware.b4a.objects.ScrollViewWrapper();
 //BA.debugLineNum = 190;BA.debugLine="Private Label9 As Label";
_label9 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 191;BA.debugLine="Private et_numeroint As EditText";
_et_numeroint = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 192;BA.debugLine="Private Label10 As Label";
_label10 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 193;BA.debugLine="Private et_numeroext As EditText";
_et_numeroext = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 194;BA.debugLine="Private Label11 As Label";
_label11 = new anywheresoftware.b4a.objects.LabelWrapper();
 //BA.debugLineNum = 195;BA.debugLine="Private et_referencia As EditText";
_et_referencia = new anywheresoftware.b4a.objects.EditTextWrapper();
 //BA.debugLineNum = 196;BA.debugLine="End Sub";
return "";
}
public String  _et_cp_textchanged(String _old,String _new) throws Exception{
 //BA.debugLineNum = 637;BA.debugLine="Private Sub et_cp_TextChanged (Old As String, New";
 //BA.debugLineNum = 638;BA.debugLine="If New.Length > 5 Then";
if (_new.length()>5) { 
 //BA.debugLineNum = 639;BA.debugLine="et_cp.Text = Old";
_et_cp.setText(BA.ObjectToCharSequence(_old));
 }else if(_new.length()>1 && _new.length()<=5) { 
 //BA.debugLineNum = 641;BA.debugLine="If New.Contains(Chr(10)) Or New.Contains(Chr(13)";
if (_new.contains(BA.ObjectToString(__c.Chr((int) (10)))) || _new.contains(BA.ObjectToString(__c.Chr((int) (13)))) || _new.contains(BA.ObjectToString(__c.Chr((int) (34))))) { 
 //BA.debugLineNum = 642;BA.debugLine="et_cp.Text = Old";
_et_cp.setText(BA.ObjectToCharSequence(_old));
 };
 };
 //BA.debugLineNum = 646;BA.debugLine="End Sub";
return "";
}
public String  _et_telefono_textchanged(String _old,String _new) throws Exception{
 //BA.debugLineNum = 648;BA.debugLine="Private Sub et_telefono_TextChanged (Old As String";
 //BA.debugLineNum = 649;BA.debugLine="If New.Length > 10 Then";
if (_new.length()>10) { 
 //BA.debugLineNum = 650;BA.debugLine="et_telefono.Text = Old";
_et_telefono.setText(BA.ObjectToCharSequence(_old));
 }else if(_new.length()>1 && _new.length()<=10) { 
 //BA.debugLineNum = 652;BA.debugLine="If New.Contains(Chr(10)) Or New.Contains(Chr(13)";
if (_new.contains(BA.ObjectToString(__c.Chr((int) (10)))) || _new.contains(BA.ObjectToString(__c.Chr((int) (13)))) || _new.contains(BA.ObjectToString(__c.Chr((int) (34))))) { 
 //BA.debugLineNum = 653;BA.debugLine="et_telefono.Text = Old";
_et_telefono.setText(BA.ObjectToCharSequence(_old));
 };
 };
 //BA.debugLineNum = 657;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
 //BA.debugLineNum = 336;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
 //BA.debugLineNum = 337;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then";
if ((_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { 
 //BA.debugLineNum = 338;BA.debugLine="If GUARDA.IsInitialized Then";
if (_guarda.IsInitialized()) { 
 //BA.debugLineNum = 339;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostr";
_guarda.setVisible(__c.True);
 //BA.debugLineNum = 340;BA.debugLine="l_sinUbicacion.Visible = True";
_l_sinubicacion.setVisible(__c.True);
 //BA.debugLineNum = 342;BA.debugLine="lat = Location1.Latitude";
_lat = _location1.getLatitude();
 //BA.debugLineNum = 343;BA.debugLine="lon = Location1.Longitude";
_lon = _location1.getLongitude();
 //BA.debugLineNum = 344;BA.debugLine="l_sinUbicacion.Text = (\"Latitud: \" & lat & \", L";
_l_sinubicacion.setText(BA.ObjectToCharSequence(("Latitud: "+BA.NumberToString(_lat)+", Longotud: "+BA.NumberToString(_lon))));
 };
 };
 //BA.debugLineNum = 348;BA.debugLine="If b_ubicacion.IsInitialized Then";
if (_b_ubicacion.IsInitialized()) { 
 //BA.debugLineNum = 349;BA.debugLine="b_ubicacion.TextSize = 13";
_b_ubicacion.setTextSize((float) (13));
 //BA.debugLineNum = 350;BA.debugLine="b_ubicacion.Text = $\"Precisión GPS $1.0{Location";
_b_ubicacion.setText(BA.ObjectToCharSequence(("Precisión GPS "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
 //BA.debugLineNum = 351;BA.debugLine="If Location1.Accuracy > 200 Then";
if (_location1.getAccuracy()>200) { 
 //BA.debugLineNum = 352;BA.debugLine="b_ubicacion.TextColor = Colors.Red";
_b_ubicacion.setTextColor(__c.Colors.Red);
 //BA.debugLineNum = 353;BA.debugLine="b_ubicacion.TextSize = 16";
_b_ubicacion.setTextSize((float) (16));
 //BA.debugLineNum = 354;BA.debugLine="b_ubicacion.Text = $\"Mala señal $1.0{Location1.";
_b_ubicacion.setText(BA.ObjectToCharSequence(("Mala señal "+__c.SmartStringFormatter("1.0",(Object)(_location1.getAccuracy()))+" m")));
 };
 };
 //BA.debugLineNum = 358;BA.debugLine="End Sub";
return "";
}
public String  _guarda_click() throws Exception{
String _hora = "";
String _mins = "";
String _segs = "";
String[] _fechacliente = null;
 //BA.debugLineNum = 391;BA.debugLine="Sub GUARDA_Click";
 //BA.debugLineNum = 401;BA.debugLine="B4XPages.ShowPage(\"NuevoCliente\")";
_b4xpages._showpage /*String*/ (ba,"NuevoCliente");
 //BA.debugLineNum = 419;BA.debugLine="If E_NOMBRE.Text = \"\" Then";
if ((_e_nombre.getText()).equals("")) { 
 //BA.debugLineNum = 420;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 = 424;BA.debugLine="If lat <> 0 Then";
if (_lat!=0) { 
 //BA.debugLineNum = 426;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 = 428;BA.debugLine="If ET_Atiende.Text <> \"\" Then";
if ((_et_atiende.getText()).equals("") == false) { 
 //BA.debugLineNum = 429;BA.debugLine="If et_telefono.Text <> \"\" Then";
if ((_et_telefono.getText()).equals("") == false) { 
 //BA.debugLineNum = 430;BA.debugLine="If et_colonia.Text <> \"\" Then";
if ((_et_colonia.getText()).equals("") == false) { 
 //BA.debugLineNum = 431;BA.debugLine="If et_cp.Text <> \"\" Then";
if ((_et_cp.getText()).equals("") == false) { 
 //BA.debugLineNum = 432;BA.debugLine="If et_calle1.Text <> \"\" Then";
if ((_et_calle1.getText()).equals("") == false) { 
 //BA.debugLineNum = 433;BA.debugLine="If et_calle2.Text <> \"\" Then";
if ((_et_calle2.getText()).equals("") == false) { 
 //BA.debugLineNum = 434;BA.debugLine="If et_numeroint.Text <> \"\" Then";
if ((_et_numeroint.getText()).equals("") == false) { 
 //BA.debugLineNum = 435;BA.debugLine="If et_numeroext.Text <> \"\" Then";
if ((_et_numeroext.getText()).equals("") == false) { 
 //BA.debugLineNum = 436;BA.debugLine="If et_referencia.Text <> \"\" Then";
if ((_et_referencia.getText()).equals("") == false) { 
 //BA.debugLineNum = 440;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
 //BA.debugLineNum = 441;BA.debugLine="DateTime.Timeformat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
 //BA.debugLineNum = 442;BA.debugLine="sDate = DateTime.Date(DateTime.Now)";
_sdate = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 443;BA.debugLine="sTime = DateTime.Time(DateTime.Now)";
_stime = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 444;BA.debugLine="Log($\" ////////////   Date: ${sDate} - T";
__c.LogImpl("438666293",(" ////////////   Date: "+__c.SmartStringFormatter("",(Object)(_sdate))+" - Time: "+__c.SmartStringFormatter("",(Object)(_stime))+" ////////////////"),0);
 //BA.debugLineNum = 446;BA.debugLine="Private hora As String = sTime.SubString";
_hora = _stime.substring((int) (0),(int) (2));
 //BA.debugLineNum = 447;BA.debugLine="Private mins As String = sTime.SubString";
_mins = _stime.substring((int) (2),(int) (4));
 //BA.debugLineNum = 448;BA.debugLine="Private segs As String = sTime.SubString";
_segs = _stime.substring((int) (4));
 //BA.debugLineNum = 449;BA.debugLine="sTime = hora & \":\" & mins & \":\" & segs";
_stime = _hora+":"+_mins+":"+_segs;
 //BA.debugLineNum = 450;BA.debugLine="Dim Fechacliente() As String = Regex.Spl";
_fechacliente = __c.Regex.Split("/",_sdate);
 //BA.debugLineNum = 451;BA.debugLine="Log(\"////////////// sTime: \"&sTime&\" ///";
__c.LogImpl("438666300","////////////// sTime: "+_stime+" ////////////////",0);
 //BA.debugLineNum = 452;BA.debugLine="c = Starter.skmt.ExecQuery(\"select CAT_C";
_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_info3")));
 //BA.debugLineNum = 453;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 454;BA.debugLine="no_ruta = c.GetString(\"CAT_CL_RUTA\")";
_no_ruta = _c.GetString("CAT_CL_RUTA");
 //BA.debugLineNum = 455;BA.debugLine="no_cliente = \"N\" & sTime & no_ruta";
_no_cliente = "N"+_stime+_no_ruta;
 //BA.debugLineNum = 456;BA.debugLine="Log(\"++ ++ no_cliente = \"&no_cliente)";
__c.LogImpl("438666305","++ ++ no_cliente = "+_no_cliente,0);
 //BA.debugLineNum = 457;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 459;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO";
_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 = 460;BA.debugLine="Starter.skmt.ExecNonQuery(\"delete from C";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
 //BA.debugLineNum = 461;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_no_cliente)}));
 //BA.debugLineNum = 462;BA.debugLine="c = Starter.skmt.ExecQuery(\"select ID_AL";
_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 = 463;BA.debugLine="If c.RowCount > 0 Then";
if (_c.getRowCount()>0) { 
 //BA.debugLineNum = 464;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 465;BA.debugLine="ALMACEN = c.GetString(\"ID_ALMACEN\")";
_almacen = _c.GetString("ID_ALMACEN");
 };
 //BA.debugLineNum = 467;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 468;BA.debugLine="c = Starter.skmt.ExecQuery(\"select usuar";
_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 = 469;BA.debugLine="c.Position = 0";
_c.setPosition((int) (0));
 //BA.debugLineNum = 470;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
_usuario = _c.GetString("USUARIO");
 //BA.debugLineNum = 471;BA.debugLine="c.Close";
_c.Close();
 //BA.debugLineNum = 475;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\"";
__c.DateTime.setDateFormat("dd/MM/yyyy");
 //BA.debugLineNum = 476;BA.debugLine="DateTime.Timeformat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
 //BA.debugLineNum = 477;BA.debugLine="sDate2 = DateTime.Date(DateTime.Now)";
_sdate2 = __c.DateTime.Date(__c.DateTime.getNow());
 //BA.debugLineNum = 478;BA.debugLine="sTime2 = DateTime.Time(DateTime.Now)";
_stime2 = __c.DateTime.Time(__c.DateTime.getNow());
 //BA.debugLineNum = 480;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info3(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,CAT_CL_CP,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_NUMEROINT,CAT_CL_NUMEROEXT,CAT_CL_REFERENCIA) 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 /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*gunav2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_cb_giro._getselecteditem /*String*/ ()),(Object)(_et_cp.getText()),(Object)(_et_calle1.getText()),(Object)(_et_calle2.getText()),(Object)(_et_numeroint.getText()),(Object)(_et_numeroext.getText()),(Object)(_et_referencia.getText())}));
 //BA.debugLineNum = 481;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO";
_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_ALMACEN, CN_RUTA, CN_GIRO, CN_SOLICITA,CN_COLONIA, CN_TELEFONO,CN_CP,CN_CALLE1,CN_CALLE2,CN_NUMEROINT,CN_NUMEROEXT,CN_REFERENCIA) 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_cp.getText(),_et_calle1.getText(),_et_calle2.getText(),_et_numeroint.getText(),_et_numeroext.getText(),_et_referencia.getText()}));
 //BA.debugLineNum = 483;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
 //BA.debugLineNum = 484;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")";
__c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP");
 }else {
 //BA.debugLineNum = 486;BA.debugLine="MsgboxAsync(\"Por favor, captura la re";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, captura la referencia"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 489;BA.debugLine="MsgboxAsync(\"Por favor, captura el nú";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, captura el número ext"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 492;BA.debugLine="MsgboxAsync(\"Por favor, captura el núm";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, captura el número int"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 496;BA.debugLine="MsgboxAsync(\"Por favor, captura  Entre c";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, captura  Entre calle2"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 499;BA.debugLine="MsgboxAsync(\"Por favor, captura Entre ca";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, captura Entre calle1"),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 503;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar el C";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar el C.P. el negocio."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 506;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 = 509;BA.debugLine="MsgboxAsync(\"Por favor, debe capturar el tel";
__c.MsgboxAsync(BA.ObjectToCharSequence("Por favor, debe capturar el telefono."),BA.ObjectToCharSequence("Atención"),ba);
 };
 }else {
 //BA.debugLineNum = 513;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 = 516;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 = 519;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 = 522;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 = 529;BA.debugLine="End Sub";
return "";
}
public Object  _initialize(anywheresoftware.b4a.BA _ba) throws Exception{
innerInitialize(_ba);
 //BA.debugLineNum = 199;BA.debugLine="Public Sub Initialize As Object";
 //BA.debugLineNum = 200;BA.debugLine="Return Me";
if (true) return this;
 //BA.debugLineNum = 201;BA.debugLine="End Sub";
return null;
}
public String  _p_nuevocliente_click() throws Exception{
 //BA.debugLineNum = 534;BA.debugLine="Private Sub p_nuevoCliente_Click";
 //BA.debugLineNum = 536;BA.debugLine="End Sub";
return "";
}
public boolean  _pointinpolygon(anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper _point,anywheresoftware.b4a.objects.collections.List _polygon) throws Exception{
double _x = 0;
double _y = 0;
boolean _inside = false;
int _i = 0;
int _j = 0;
anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper _p1_1 = null;
anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper _p2_1 = null;
double _xi = 0;
double _yi = 0;
double _xj = 0;
double _yj = 0;
boolean _intersect = false;
 //BA.debugLineNum = 365;BA.debugLine="Sub PointInPolygon(point As LatLng, polygon As Lis";
 //BA.debugLineNum = 366;BA.debugLine="Dim x As Double = point.Longitude";
_x = _point.getLongitude();
 //BA.debugLineNum = 367;BA.debugLine="Dim y As Double = point.Latitude";
_y = _point.getLatitude();
 //BA.debugLineNum = 369;BA.debugLine="Dim inside As Boolean = False";
_inside = __c.False;
 //BA.debugLineNum = 370;BA.debugLine="For i = 0 To polygon.Size - 1";
{
final int step4 = 1;
final int limit4 = (int) (_polygon.getSize()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
 //BA.debugLineNum = 371;BA.debugLine="Dim j As Int = (i + 1) Mod polygon.Size";
_j = (int) ((_i+1)%_polygon.getSize());
 //BA.debugLineNum = 372;BA.debugLine="Dim p1_1 As LatLng = polygon.Get(i)";
_p1_1 = new anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper();
_p1_1 = (anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper(), (com.google.android.gms.maps.model.LatLng)(_polygon.Get(_i)));
 //BA.debugLineNum = 373;BA.debugLine="Dim p2_1 As LatLng = polygon.Get(j)";
_p2_1 = new anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper();
_p2_1 = (anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.MapFragmentWrapper.LatLngWrapper(), (com.google.android.gms.maps.model.LatLng)(_polygon.Get(_j)));
 //BA.debugLineNum = 375;BA.debugLine="Dim xi As Double = p1_1.Longitude";
_xi = _p1_1.getLongitude();
 //BA.debugLineNum = 376;BA.debugLine="Dim yi As Double = p1_1.Latitude";
_yi = _p1_1.getLatitude();
 //BA.debugLineNum = 377;BA.debugLine="Dim xj As Double = p2_1.Longitude";
_xj = _p2_1.getLongitude();
 //BA.debugLineNum = 378;BA.debugLine="Dim yj As Double = p2_1.Latitude";
_yj = _p2_1.getLatitude();
 //BA.debugLineNum = 380;BA.debugLine="Dim intersect As Boolean = ((yi > y) <> (yj > y)";
_intersect = ((_yi>_y)!=(_yj>_y)) && (_x<(_xj-_xi)*(_y-_yi)/(double)(_yj-_yi)+_xi);
 //BA.debugLineNum = 381;BA.debugLine="If intersect Then";
if (_intersect) { 
 //BA.debugLineNum = 382;BA.debugLine="inside = Not(inside)";
_inside = __c.Not(_inside);
 };
 }
};
 //BA.debugLineNum = 386;BA.debugLine="Return inside";
if (true) return _inside;
 //BA.debugLineNum = 389;BA.debugLine="End Sub";
return false;
}
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;
}
}
