package keymon.lat.medicomed; 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 htSubs; private void innerInitialize(BA _ba) throws Exception { if (ba == null) { ba = new BA(_ba, this, htSubs, "keymon.lat.medicomed.c_nuevocliente"); if (htSubs == null) { ba.loadHtSubs(this.getClass()); htSubs = ba.htSubs; } } if (BA.isShellModeRuntimeCheck(ba)) this.getClass().getMethod("_class_globals", keymon.lat.medicomed.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 keymon.lat.medicomed.dbrequestmanager _reqmanager = 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 boolean _desdebd = false; 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 keymon.lat.medicomed.cameraexclass2 _camex2 = 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 anywheresoftware.b4a.objects.EditTextWrapper _et_colonia = null; public anywheresoftware.b4a.objects.LabelWrapper _label4 = null; public anywheresoftware.b4a.objects.EditTextWrapper _et_cp = null; public anywheresoftware.b4a.objects.ListViewWrapper _lv_colonia = null; public int _banderasepo = 0; public b4a.example.dateutils _dateutils = null; public keymon.lat.medicomed.main _main = null; public keymon.lat.medicomed.starter _starter = null; public keymon.lat.medicomed.subs _subs = null; public keymon.lat.medicomed.appupdater _appupdater = null; public keymon.lat.medicomed.mapa_rutas _mapa_rutas = null; public keymon.lat.medicomed.tracker _tracker = null; public keymon.lat.medicomed.newinst2 _newinst2 = null; public keymon.lat.medicomed.b4xpages _b4xpages = null; public keymon.lat.medicomed.b4xcollections _b4xcollections = null; public keymon.lat.medicomed.httputils2service _httputils2service = null; public keymon.lat.medicomed.xuiviewsutils _xuiviewsutils = null; public String _b_foto_click() throws Exception{ //BA.debugLineNum = 400;BA.debugLine="Private Sub B_FOTO_Click"; //BA.debugLineNum = 401;BA.debugLine="DateTime.DateFormat=\"ddMMyyyyHHmmss\""; __c.DateTime.setDateFormat("ddMMyyyyHHmmss"); //BA.debugLineNum = 402;BA.debugLine="InitializeCamera2"; _initializecamera2(); //BA.debugLineNum = 403;BA.debugLine="Subs.panelVisible(p_camara, 0, 0)"; _subs._panelvisible /*String*/ (ba,_p_camara,(int) (0),(int) (0)); //BA.debugLineNum = 404;BA.debugLine="fototomada = DateTime.Now & \"_cliente.jpg\""; _fototomada = BA.NumberToString(__c.DateTime.getNow())+"_cliente.jpg"; //BA.debugLineNum = 405;BA.debugLine="End Sub"; return ""; } public String _b_foto_inci_click() throws Exception{ //BA.debugLineNum = 312;BA.debugLine="Private Sub b_foto_inci_Click"; //BA.debugLineNum = 313;BA.debugLine="camEx2.TakePicture"; _camex2._takepicture /*String*/ (); //BA.debugLineNum = 314;BA.debugLine="p_camara.Visible = False"; _p_camara.setVisible(__c.False); //BA.debugLineNum = 316;BA.debugLine="End Sub"; return ""; } public String _b4xpage_appear() throws Exception{ //BA.debugLineNum = 67;BA.debugLine="Sub B4XPage_Appear"; //BA.debugLineNum = 68;BA.debugLine="E_NOMBRE.Text = \"\""; _e_nombre.setText(BA.ObjectToCharSequence("")); //BA.debugLineNum = 69;BA.debugLine="et_colonia.Text = \"\""; _et_colonia.setText(BA.ObjectToCharSequence("")); //BA.debugLineNum = 70;BA.debugLine="et_cp.Text = \"\""; _et_cp.setText(BA.ObjectToCharSequence("")); //BA.debugLineNum = 71;BA.debugLine="et_direccion.Text = \"\""; _et_direccion.setText(BA.ObjectToCharSequence("")); //BA.debugLineNum = 72;BA.debugLine="lv_colonia.Visible = False"; _lv_colonia.setVisible(__c.False); //BA.debugLineNum = 73;BA.debugLine="lv_colonia.Clear"; _lv_colonia.Clear(); //BA.debugLineNum = 74;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then"; if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { //BA.debugLineNum = 75;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence"; __c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True); //BA.debugLineNum = 76;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent"; __c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent())); }; //BA.debugLineNum = 78;BA.debugLine="GUARDA.Visible = False"; _guarda.setVisible(__c.False); //BA.debugLineNum = 79;BA.debugLine="Subs.panelVisible(p_nuevoCliente, 0, 0)"; _subs._panelvisible /*String*/ (ba,_p_nuevocliente,(int) (0),(int) (0)); //BA.debugLineNum = 80;BA.debugLine="p_nuevoCliente.Height = Root.Height"; _p_nuevocliente.setHeight(_root.getHeight()); //BA.debugLineNum = 81;BA.debugLine="p_nuevoCliente.Width = Root.Width"; _p_nuevocliente.setWidth(_root.getWidth()); //BA.debugLineNum = 82;BA.debugLine="Subs.centraEtiqueta(Label1, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_label1,_root.getWidth()); //BA.debugLineNum = 83;BA.debugLine="Subs.centraEtiqueta(Label2, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_label2,_root.getWidth()); //BA.debugLineNum = 84;BA.debugLine="Subs.centraEtiqueta(Label3, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_label3,_root.getWidth()); //BA.debugLineNum = 85;BA.debugLine="Subs.centraEtiqueta(Label4, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_label4,_root.getWidth()); //BA.debugLineNum = 86;BA.debugLine="Subs.centraEtiqueta(l_sinUbicacion, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_l_sinubicacion,_root.getWidth()); //BA.debugLineNum = 87;BA.debugLine="Subs.centraEtiqueta(b_ubicacion, Root.Width)"; _subs._centraetiqueta /*String*/ (ba,_b_ubicacion,_root.getWidth()); //BA.debugLineNum = 88;BA.debugLine="Subs.centraPanel(p_botones, Root.Width)"; _subs._centrapanel /*String*/ (ba,_p_botones,_root.getWidth()); //BA.debugLineNum = 89;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 = 90;BA.debugLine="et_direccion.Left = Round(Root.Width/2)-(E_NOMBRE"; _et_direccion.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_e_nombre.getWidth()/(double)2))); //BA.debugLineNum = 91;BA.debugLine="et_colonia.Left = Round(Root.Width/2)-(E_NOMBRE.W"; _et_colonia.setLeft((int) (__c.Round(_root.getWidth()/(double)2)-(_e_nombre.getWidth()/(double)2))); //BA.debugLineNum = 92;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 = 93;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then"; if ((_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { //BA.debugLineNum = 94;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostra"; _guarda.setVisible(__c.True); //BA.debugLineNum = 95;BA.debugLine="l_sinUbicacion.Visible = False"; _l_sinubicacion.setVisible(__c.False); }; //BA.debugLineNum = 98;BA.debugLine="If Not(Starter.GPS.GPSEnabled) Then"; if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { //BA.debugLineNum = 99;BA.debugLine="ToastMessageShow(\"Debe Activar el GPS del Equipo"; __c.ToastMessageShow(BA.ObjectToCharSequence("Debe Activar el GPS del Equipo."),__c.True); //BA.debugLineNum = 100;BA.debugLine="StartActivity(Starter.GPS.LocationSettingsIntent"; __c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent())); }else { //BA.debugLineNum = 102;BA.debugLine="Starter.GPS.Start(0, 0)"; _starter._gps /*anywheresoftware.b4a.gps.GPS*/ .Start(ba,(long) (0),(float) (0)); }; //BA.debugLineNum = 105;BA.debugLine="CallSubDelayed(Tracker, \"StartFLPSmall\")"; __c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLPSmall"); //BA.debugLineNum = 106;BA.debugLine="desdeBD = False"; _desdebd = __c.False; //BA.debugLineNum = 107;BA.debugLine="End Sub"; return ""; } public String _b4xpage_created(anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{ //BA.debugLineNum = 51;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)"; //BA.debugLineNum = 52;BA.debugLine="Root = Root1"; _root = _root1; //BA.debugLineNum = 54;BA.debugLine="Root.LoadLayout(\"nuevocliente\")"; _root.LoadLayout("nuevocliente",ba); //BA.debugLineNum = 55;BA.debugLine="ruta = File.DirInternal"; _ruta = __c.File.getDirInternal(); //BA.debugLineNum = 56;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then"; if (__c.File.Exists(_ruta,"kmt.db")==__c.False) { //BA.debugLineNum = 57;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d"; __c.File.Copy(__c.File.getDirAssets(),"kmt.db",_ruta,"kmt.db"); }; //BA.debugLineNum = 62;BA.debugLine="reqManager.Initialize(Me, B4XPages.MainPage.SERVE"; _reqmanager._initialize /*String*/ (ba,this,_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._server /*String*/ ); //BA.debugLineNum = 63;BA.debugLine="End Sub"; return ""; } public String _camera1_picturetaken(byte[] _data) throws Exception{ String _filename = ""; String _dirp = ""; String _dir = ""; String _dir2 = ""; //BA.debugLineNum = 359;BA.debugLine="Sub Camera1_PictureTaken (Data()As Byte)"; //BA.debugLineNum = 360;BA.debugLine="Log(\"tome foto\")"; __c.LogImpl("355115777","tome foto",0); //BA.debugLineNum = 361;BA.debugLine="Dim filename As String = fototomada"; _filename = _fototomada; //BA.debugLineNum = 362;BA.debugLine="Dim Dirp As String = File.DirInternal"; _dirp = __c.File.getDirInternal(); //BA.debugLineNum = 363;BA.debugLine="Dim Dir As String"; _dir = ""; //BA.debugLineNum = 364;BA.debugLine="Dim Dir2 As String"; _dir2 = ""; //BA.debugLineNum = 365;BA.debugLine="Try"; try { //BA.debugLineNum = 366;BA.debugLine="File.MakeDir(Dirp,\"/promotoriakmts\")"; __c.File.MakeDir(_dirp,"/promotoriakmts"); //BA.debugLineNum = 367;BA.debugLine="Dir = \"/promotoriakmts\""; _dir = "/promotoriakmts"; //BA.debugLineNum = 368;BA.debugLine="Log(\"creado en promotoria \" & Dirp & Dir)"; __c.LogImpl("355115785","creado en promotoria "+_dirp+_dir,0); } catch (Exception e11) { ba.setLastException(e11); //BA.debugLineNum = 370;BA.debugLine="Dir = \"\""; _dir = ""; //BA.debugLineNum = 371;BA.debugLine="Log(\"creado en raiz\")"; __c.LogImpl("355115788","creado en raiz",0); }; //BA.debugLineNum = 374;BA.debugLine="Try"; try { //BA.debugLineNum = 375;BA.debugLine="File.MakeDir(Dirp & Dir,\"/reduccion\")"; __c.File.MakeDir(_dirp+_dir,"/reduccion"); //BA.debugLineNum = 376;BA.debugLine="Dir2 = \"/reduccion\""; _dir2 = "/reduccion"; //BA.debugLineNum = 377;BA.debugLine="Log(\"creado en promotoria \" & Dirp & Dir & Dir2)"; __c.LogImpl("355115794","creado en promotoria "+_dirp+_dir+_dir2,0); } catch (Exception e19) { ba.setLastException(e19); //BA.debugLineNum = 379;BA.debugLine="Dir = \"\""; _dir = ""; //BA.debugLineNum = 380;BA.debugLine="Log(\"creado en raiz\")"; __c.LogImpl("355115797","creado en raiz",0); }; //BA.debugLineNum = 383;BA.debugLine="camEx2.SavePictureToFile(Data, Dirp&Dir, filename"; _camex2._savepicturetofile /*String*/ (_data,_dirp+_dir,_filename); //BA.debugLineNum = 384;BA.debugLine="camEx2.StartPreview 'restart preview"; _camex2._startpreview /*String*/ (); //BA.debugLineNum = 385;BA.debugLine="ToastMessageShow(\"Picture saved.\" & CRLF & \"File"; __c.ToastMessageShow(BA.ObjectToCharSequence("Picture saved."+__c.CRLF+"File size: "+BA.NumberToString(__c.File.Size(_dir,_filename))+_dir+","+_filename),__c.True); //BA.debugLineNum = 386;BA.debugLine="Log(\"Picture saved.\" & CRLF & \"File size: \" & Fi"; __c.LogImpl("355115803","Picture saved."+__c.CRLF+"File size: "+BA.NumberToString(__c.File.Size(_dir,_filename))+_dir+","+_filename,0); //BA.debugLineNum = 387;BA.debugLine="p_camara.Visible = False"; _p_camara.setVisible(__c.False); //BA.debugLineNum = 388;BA.debugLine="StopCamera2"; _stopcamera2(); //BA.debugLineNum = 390;BA.debugLine="End Sub"; return ""; } public String _camera1_ready(boolean _success) throws Exception{ //BA.debugLineNum = 345;BA.debugLine="Sub Camera1_Ready (Success As Boolean)"; //BA.debugLineNum = 346;BA.debugLine="Log(\"Camara ready\")"; __c.LogImpl("355050241","Camara ready",0); //BA.debugLineNum = 347;BA.debugLine="If Success Then"; if (_success) { //BA.debugLineNum = 348;BA.debugLine="camEx2.SetJpegQuality(90)"; _camex2._setjpegquality /*String*/ ((int) (90)); //BA.debugLineNum = 349;BA.debugLine="camEx2.SetContinuousAutoFocus"; _camex2._setcontinuousautofocus /*String*/ (); //BA.debugLineNum = 350;BA.debugLine="camEx2.CommitParameters"; _camex2._commitparameters /*String*/ (); //BA.debugLineNum = 351;BA.debugLine="camEx2.StartPreview"; _camex2._startpreview /*String*/ (); //BA.debugLineNum = 352;BA.debugLine="Log(camEx2.GetPreviewSize)"; __c.LogImpl("355050247",BA.ObjectToString(_camex2._getpreviewsize /*keymon.lat.medicomed.main._camerasize*/ ()),0); }else { //BA.debugLineNum = 354;BA.debugLine="ToastMessageShow(\"Cannot open camera.\", True)"; __c.ToastMessageShow(BA.ObjectToCharSequence("Cannot open camera."),__c.True); //BA.debugLineNum = 355;BA.debugLine="Log(\"Cannot open camera\")"; __c.LogImpl("355050250","Cannot open camera",0); }; //BA.debugLineNum = 357;BA.debugLine="End Sub"; return ""; } public String _cancela_click() throws Exception{ //BA.debugLineNum = 127;BA.debugLine="Sub CANCELA_Click"; //BA.debugLineNum = 128;BA.debugLine="B4XPages.ShowPage(\"Principal\")"; _b4xpages._showpage /*String*/ (ba,"Principal"); //BA.debugLineNum = 129;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")"; __c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP"); //BA.debugLineNum = 130;BA.debugLine="lv_colonia.Clear"; _lv_colonia.Clear(); //BA.debugLineNum = 131;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 = 5;BA.debugLine="Dim g As GPS"; _g = new anywheresoftware.b4a.gps.GPS(); //BA.debugLineNum = 6;BA.debugLine="Dim ruta As String"; _ruta = ""; //BA.debugLineNum = 7;BA.debugLine="Dim c As Cursor"; _c = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); //BA.debugLineNum = 8;BA.debugLine="Dim reqManager As DBRequestManager"; _reqmanager = new keymon.lat.medicomed.dbrequestmanager(); //BA.debugLineNum = 9;BA.debugLine="Dim CANCELA As Button"; _cancela = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 10;BA.debugLine="Dim GUARDA As Button"; _guarda = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 11;BA.debugLine="Dim cuenta As String"; _cuenta = ""; //BA.debugLineNum = 12;BA.debugLine="Dim usuario As String"; _usuario = ""; //BA.debugLineNum = 13;BA.debugLine="Dim sDate,sTime As String"; _sdate = ""; _stime = ""; //BA.debugLineNum = 14;BA.debugLine="Dim sDate2,sTime2 As String"; _sdate2 = ""; _stime2 = ""; //BA.debugLineNum = 15;BA.debugLine="Dim no_cliente As String"; _no_cliente = ""; //BA.debugLineNum = 16;BA.debugLine="Dim no_ruta As String"; _no_ruta = ""; //BA.debugLineNum = 17;BA.debugLine="Dim desdeBD As Boolean"; _desdebd = false; //BA.debugLineNum = 18;BA.debugLine="Dim r_4 As RadioButton"; _r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper(); //BA.debugLineNum = 19;BA.debugLine="Dim E_NOMBRE As EditText"; _e_nombre = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 20;BA.debugLine="Dim tgl As Toggle"; _tgl = new com.rootsoft.togglelibrary.ToggleLibrary(); //BA.debugLineNum = 21;BA.debugLine="Private l_sinUbicacion As Label"; _l_sinubicacion = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 22;BA.debugLine="Private p_nuevoCliente As Panel"; _p_nuevocliente = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 23;BA.debugLine="Private Label1 As Label"; _label1 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 24;BA.debugLine="Private p_botones As Panel"; _p_botones = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 25;BA.debugLine="Private p_cam As Panel"; _p_cam = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 26;BA.debugLine="Private p_camara As Panel"; _p_camara = new anywheresoftware.b4a.objects.PanelWrapper(); //BA.debugLineNum = 27;BA.debugLine="Private b_foto_inci As Button"; _b_foto_inci = new anywheresoftware.b4a.objects.ButtonWrapper(); //BA.debugLineNum = 28;BA.debugLine="Private camEx2 As CameraExClass2"; _camex2 = new keymon.lat.medicomed.cameraexclass2(); //BA.debugLineNum = 29;BA.debugLine="Dim frontCamera As Boolean = False"; _frontcamera = __c.False; //BA.debugLineNum = 30;BA.debugLine="Dim fototomada As String = \"0\""; _fototomada = "0"; //BA.debugLineNum = 31;BA.debugLine="Dim ALMACEN As String"; _almacen = ""; //BA.debugLineNum = 32;BA.debugLine="Private et_direccion As EditText"; _et_direccion = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 33;BA.debugLine="Private Label2 As Label"; _label2 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 34;BA.debugLine="Dim lat As Double = 0"; _lat = 0; //BA.debugLineNum = 35;BA.debugLine="Dim lon As Double = 0"; _lon = 0; //BA.debugLineNum = 36;BA.debugLine="Private b_ubicacion As Label"; _b_ubicacion = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 37;BA.debugLine="Private Label3 As Label"; _label3 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 38;BA.debugLine="Private et_colonia As EditText"; _et_colonia = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 39;BA.debugLine="Private Label4 As Label"; _label4 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 40;BA.debugLine="Private et_cp As EditText"; _et_cp = new anywheresoftware.b4a.objects.EditTextWrapper(); //BA.debugLineNum = 41;BA.debugLine="Private lv_colonia As ListView"; _lv_colonia = new anywheresoftware.b4a.objects.ListViewWrapper(); //BA.debugLineNum = 42;BA.debugLine="Dim banderasepo As Int"; _banderasepo = 0; //BA.debugLineNum = 43;BA.debugLine="End Sub"; return ""; } public String _et_colonia_click() throws Exception{ //BA.debugLineNum = 137;BA.debugLine="Private Sub et_colonia_Click"; //BA.debugLineNum = 138;BA.debugLine="Sender.As(EditText).InputType = 524288"; ((anywheresoftware.b4a.objects.EditTextWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.EditTextWrapper(), (android.widget.EditText)(__c.Sender(ba)))).setInputType((int) (524288)); //BA.debugLineNum = 139;BA.debugLine="If lv_colonia.Visible = False Then"; if (_lv_colonia.getVisible()==__c.False) { //BA.debugLineNum = 140;BA.debugLine="lv_colonia.Visible = True"; _lv_colonia.setVisible(__c.True); }else { //BA.debugLineNum = 142;BA.debugLine="lv_colonia.Visible = False"; _lv_colonia.setVisible(__c.False); }; //BA.debugLineNum = 144;BA.debugLine="End Sub"; return ""; } public String _et_colonia_focuschanged(boolean _hasfocus) throws Exception{ anywheresoftware.b4a.sql.SQL.CursorWrapper _cc = null; int _i = 0; //BA.debugLineNum = 162;BA.debugLine="Private Sub et_colonia_FocusChanged (HasFocus As B"; //BA.debugLineNum = 163;BA.debugLine="If HasFocus Then"; if (_hasfocus) { //BA.debugLineNum = 164;BA.debugLine="Private cc As Cursor = B4XPages.MainPage.skmt.Ex"; _cc = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _cc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select colonia from sepomex where codigo = '"+__c.SmartStringFormatter("",(Object)(_et_cp.getText()))+"'")))); //BA.debugLineNum = 165;BA.debugLine="lv_colonia.Clear"; _lv_colonia.Clear(); //BA.debugLineNum = 166;BA.debugLine="lv_colonia.BringToFront"; _lv_colonia.BringToFront(); //BA.debugLineNum = 167;BA.debugLine="Private Label1 As Label"; _label1 = new anywheresoftware.b4a.objects.LabelWrapper(); //BA.debugLineNum = 168;BA.debugLine="Label1 = lv_colonia.SingleLineLayout.Label"; _label1 = _lv_colonia.getSingleLineLayout().Label; //BA.debugLineNum = 169;BA.debugLine="Label1.TextColor = Colors.White"; _label1.setTextColor(__c.Colors.White); //BA.debugLineNum = 170;BA.debugLine="Label1.TextSize = 14"; _label1.setTextSize((float) (14)); //BA.debugLineNum = 172;BA.debugLine="If cc.RowCount > 0 Then"; if (_cc.getRowCount()>0) { //BA.debugLineNum = 173;BA.debugLine="For i = 0 To cc.RowCount - 1"; { final int step10 = 1; final int limit10 = (int) (_cc.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit10 ;_i = _i + step10 ) { //BA.debugLineNum = 174;BA.debugLine="cc.Position = i"; _cc.setPosition(_i); //BA.debugLineNum = 175;BA.debugLine="lv_colonia.AddSingleLine(cc.GetString(\"COLONIA"; _lv_colonia.AddSingleLine(BA.ObjectToCharSequence(_cc.GetString("COLONIA"))); } }; //BA.debugLineNum = 178;BA.debugLine="lv_colonia.AddSingleLine(\"Ingrese colonia manua"; _lv_colonia.AddSingleLine(BA.ObjectToCharSequence("Ingrese colonia manualmente.")); }else { //BA.debugLineNum = 180;BA.debugLine="lv_colonia.AddSingleLine(\"Código no encontrado."; _lv_colonia.AddSingleLine(BA.ObjectToCharSequence("Código no encontrado.")); //BA.debugLineNum = 181;BA.debugLine="lv_colonia.AddSingleLine(\"Ingrese colonia manua"; _lv_colonia.AddSingleLine(BA.ObjectToCharSequence("Ingrese colonia manualmente.")); }; //BA.debugLineNum = 183;BA.debugLine="lv_colonia.Visible = True"; _lv_colonia.setVisible(__c.True); }; //BA.debugLineNum = 185;BA.debugLine="End Sub"; return ""; } public String _et_cp_click() throws Exception{ //BA.debugLineNum = 133;BA.debugLine="Sub et_cp_click"; //BA.debugLineNum = 134;BA.debugLine="lv_colonia.Visible = False"; _lv_colonia.setVisible(__c.False); //BA.debugLineNum = 135;BA.debugLine="End Sub"; return ""; } public String _et_cp_textchanged(String _old,String _new) throws Exception{ anywheresoftware.b4a.sql.SQL.CursorWrapper _cc = null; int _x = 0; //BA.debugLineNum = 146;BA.debugLine="Private Sub et_cp_TextChanged (Old As String, New"; //BA.debugLineNum = 147;BA.debugLine="If Not(desdeBD) And New.Length = 5 Then"; if (__c.Not(_desdebd) && _new.length()==5) { //BA.debugLineNum = 148;BA.debugLine="Private cc As Cursor = B4XPages.MainPage.skmt.Ex"; _cc = new anywheresoftware.b4a.sql.SQL.CursorWrapper(); _cc = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("select estado, municipio, colonia from sepomex where codigo = '"+__c.SmartStringFormatter("",(Object)(_et_cp.getText()))+"'")))); //BA.debugLineNum = 150;BA.debugLine="If cc.RowCount > 0 Then"; if (_cc.getRowCount()>0) { //BA.debugLineNum = 151;BA.debugLine="For x = 0 To cc.RowCount - 1"; { final int step4 = 1; final int limit4 = (int) (_cc.getRowCount()-1); _x = (int) (0) ; for (;_x <= limit4 ;_x = _x + step4 ) { //BA.debugLineNum = 152;BA.debugLine="cc.Position = x"; _cc.setPosition(_x); } }; }; }else if(_new.length()<5) { //BA.debugLineNum = 156;BA.debugLine="lv_colonia.Visible = False"; _lv_colonia.setVisible(__c.False); }; //BA.debugLineNum = 158;BA.debugLine="desdeBD = False"; _desdebd = __c.False; //BA.debugLineNum = 159;BA.debugLine="End Sub"; return ""; } public String _gps_locationchanged(anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{ //BA.debugLineNum = 109;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)"; //BA.debugLineNum = 110;BA.debugLine="If B4XPages.MainPage.lat_gps <> \"0.0\" Then"; if ((_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ ).equals("0.0") == false) { //BA.debugLineNum = 111;BA.debugLine="GUARDA.Visible = True 'Si hay ubicaccion, mostra"; _guarda.setVisible(__c.True); //BA.debugLineNum = 112;BA.debugLine="l_sinUbicacion.Visible = True"; _l_sinubicacion.setVisible(__c.True); //BA.debugLineNum = 113;BA.debugLine="lat = Location1.Latitude"; _lat = _location1.getLatitude(); //BA.debugLineNum = 114;BA.debugLine="lon = Location1.Longitude"; _lon = _location1.getLongitude(); //BA.debugLineNum = 115;BA.debugLine="l_sinUbicacion.Text = (\"Latitud: \" & lat & \", Lo"; _l_sinubicacion.setText(BA.ObjectToCharSequence(("Latitud: "+BA.NumberToString(_lat)+", Longotud: "+BA.NumberToString(_lon)))); }; //BA.debugLineNum = 118;BA.debugLine="b_ubicacion.TextSize = 13"; _b_ubicacion.setTextSize((float) (13)); //BA.debugLineNum = 119;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 = 120;BA.debugLine="If Location1.Accuracy > 200 Then"; if (_location1.getAccuracy()>200) { //BA.debugLineNum = 121;BA.debugLine="b_ubicacion.TextColor = Colors.Red"; _b_ubicacion.setTextColor(__c.Colors.Red); //BA.debugLineNum = 122;BA.debugLine="b_ubicacion.TextSize = 16"; _b_ubicacion.setTextSize((float) (16)); //BA.debugLineNum = 123;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 = 125;BA.debugLine="End Sub"; return ""; } public String _guarda_click() throws Exception{ String _hora = ""; String _mins = ""; String _segs = ""; //BA.debugLineNum = 197;BA.debugLine="Sub GUARDA_Click"; //BA.debugLineNum = 198;BA.debugLine="If E_NOMBRE.Text = \"\" Then"; if ((_e_nombre.getText()).equals("")) { //BA.debugLineNum = 199;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 { //BA.debugLineNum = 201;BA.debugLine="If et_direccion.Text.Length > 3 Then"; if (_et_direccion.getText().length()>3) { //BA.debugLineNum = 202;BA.debugLine="If lat <> 0 Then"; if (_lat!=0) { //BA.debugLineNum = 203;BA.debugLine="If et_colonia.Text.Length > 3 Then"; if (_et_colonia.getText().length()>3) { //BA.debugLineNum = 204;BA.debugLine="If et_cp.Text.Length > 3 Then"; if (_et_cp.getText().length()>3) { //BA.debugLineNum = 206;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\""; __c.DateTime.setDateFormat("MM/dd/yyyy"); //BA.debugLineNum = 207;BA.debugLine="DateTime.Timeformat = \"HHmmss\""; __c.DateTime.setTimeFormat("HHmmss"); //BA.debugLineNum = 208;BA.debugLine="sDate=DateTime.Date(DateTime.Now)"; _sdate = __c.DateTime.Date(__c.DateTime.getNow()); //BA.debugLineNum = 209;BA.debugLine="sTime=DateTime.Time(DateTime.Now)"; _stime = __c.DateTime.Time(__c.DateTime.getNow()); //BA.debugLineNum = 210;BA.debugLine="Log($\" //////////// Date: ${sDate} - Time:"; __c.LogImpl("354657037",(" //////////// Date: "+__c.SmartStringFormatter("",(Object)(_sdate))+" - Time: "+__c.SmartStringFormatter("",(Object)(_stime))+" ////////////////"),0); //BA.debugLineNum = 212;BA.debugLine="Private hora As String = sTime.SubString2(0,"; _hora = _stime.substring((int) (0),(int) (2)); //BA.debugLineNum = 213;BA.debugLine="Private mins As String = sTime.SubString2(2,"; _mins = _stime.substring((int) (2),(int) (4)); //BA.debugLineNum = 214;BA.debugLine="Private segs As String = sTime.SubString(4)"; _segs = _stime.substring((int) (4)); //BA.debugLineNum = 215;BA.debugLine="sTime = hora&\":\"&mins&\":\"&segs"; _stime = _hora+":"+_mins+":"+_segs; //BA.debugLineNum = 216;BA.debugLine="Log(\"////////////// sTime: \"&sTime&\" ///////"; __c.LogImpl("354657043","////////////// sTime: "+_stime+" ////////////////",0); //BA.debugLineNum = 217;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select C"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CAT_CL_RUTA FROM kmt_info"))); //BA.debugLineNum = 218;BA.debugLine="c.Position=0"; _c.setPosition((int) (0)); //BA.debugLineNum = 219;BA.debugLine="no_ruta= c.GetString(\"CAT_CL_RUTA\")"; _no_ruta = _c.GetString("CAT_CL_RUTA"); //BA.debugLineNum = 220;BA.debugLine="no_cliente= \"N\" & sTime & no_ruta"; _no_cliente = "N"+_stime+_no_ruta; //BA.debugLineNum = 221;BA.debugLine="Log(\"++ ++ no_cliente = \"&no_cliente)"; __c.LogImpl("354657048","++ ++ no_cliente = "+_no_cliente,0); //BA.debugLineNum = 222;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 223;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO kmt_info(CAT_CL_CODIGO,CAT_CL_RUTA,CAT_CL_NOMBRE,CAT_CL_ATIENDE1,CAT_CL_ATIENTE2,CAT_CL_TELEFONO,CAT_CL_EMAIL,CAT_CL_CALLE,CAT_CL_NOEXT,CAT_CL_NOINT,CAT_CL_CALLE1,CAT_CL_CALLE2,CAT_CL_COLONIA,CAT_CL_MUNI,CAT_CL_EDO,CAT_CL_CP,CAT_CL_LONG,CAT_CL_LAT,CAT_CL_MTOCOMPRA,CAT_CL_NUM_SERIEFISICO, gestion) 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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lon_gps /*String*/ ),(Object)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._lat_gps /*String*/ )})); //BA.debugLineNum = 224;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO, HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_no_cliente)})); //BA.debugLineNum = 225;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA"); //BA.debugLineNum = 226;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(_no_cliente)})); //BA.debugLineNum = 227;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select I"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select ID_ALMACEN from CAT_ALMACEN"))); //BA.debugLineNum = 228;BA.debugLine="If c.RowCount>0 Then"; if (_c.getRowCount()>0) { //BA.debugLineNum = 229;BA.debugLine="C.Position=0"; _c.setPosition((int) (0)); //BA.debugLineNum = 230;BA.debugLine="ALMACEN = C.GetString(\"ID_ALMACEN\")"; _almacen = _c.GetString("ID_ALMACEN"); }; //BA.debugLineNum = 232;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 233;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select u"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa"))); //BA.debugLineNum = 234;BA.debugLine="c.Position = 0"; _c.setPosition((int) (0)); //BA.debugLineNum = 235;BA.debugLine="usuario = c.GetString(\"USUARIO\")"; _usuario = _c.GetString("USUARIO"); //BA.debugLineNum = 236;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 239;BA.debugLine="DateTime.DateFormat = \"dd/MM/yyyy\""; __c.DateTime.setDateFormat("dd/MM/yyyy"); //BA.debugLineNum = 240;BA.debugLine="DateTime.Timeformat = \"HH:mm:ss\""; __c.DateTime.setTimeFormat("HH:mm:ss"); //BA.debugLineNum = 241;BA.debugLine="sDate2=DateTime.Date(DateTime.Now)"; _sdate2 = __c.DateTime.Date(__c.DateTime.getNow()); //BA.debugLineNum = 242;BA.debugLine="sTime2=DateTime.Time(DateTime.Now)"; _stime2 = __c.DateTime.Time(__c.DateTime.getNow()); //BA.debugLineNum = 244;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CLIENTES_NUEVOS(CN_ID, CN_FECHA, CN_USER, CN_LAT, CN_LON, CN_NOMBRE, CN_DIRECCION, COLONIA, CP, CN_ALMACEN, CN_RUTA, CN_ENVIO,CN_BANDERA) VALUES (?,?,?,?,?,?,?,?,?,?,?,0,?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{_no_cliente,_sdate2+" "+_stime2,_usuario,BA.NumberToString(_lat),BA.NumberToString(_lon),_e_nombre.getText(),_et_direccion.getText(),_et_colonia.getText(),_et_cp.getText(),_almacen,_no_ruta,BA.NumberToString(_banderasepo)})); //BA.debugLineNum = 245;BA.debugLine="fototomada = \"0\""; _fototomada = "0"; //BA.debugLineNum = 246;BA.debugLine="B4XPages.ShowPage(\"cliente\")"; _b4xpages._showpage /*String*/ (ba,"cliente"); //BA.debugLineNum = 247;BA.debugLine="CallSubDelayed(Tracker, \"StartFLP\")"; __c.CallSubDelayed(ba,(Object)(_tracker.getObject()),"StartFLP"); //BA.debugLineNum = 249;BA.debugLine="mandaPendientesclientesnuevos"; _mandapendientesclientesnuevos(); }else { //BA.debugLineNum = 251;BA.debugLine="MsgboxAsync(\"Por favor captura el C.P. del c"; __c.MsgboxAsync(BA.ObjectToCharSequence("Por favor captura el C.P. del cliente"),BA.ObjectToCharSequence("Atención"),ba); }; }else { //BA.debugLineNum = 254;BA.debugLine="MsgboxAsync(\"Por favor captura la colonia del"; __c.MsgboxAsync(BA.ObjectToCharSequence("Por favor captura la colonia del cliente"),BA.ObjectToCharSequence("Atención"),ba); }; }else { //BA.debugLineNum = 257;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 = 260;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 = 263;BA.debugLine="End Sub"; return ""; } public Object _initialize(anywheresoftware.b4a.BA _ba) throws Exception{ innerInitialize(_ba); //BA.debugLineNum = 46;BA.debugLine="Public Sub Initialize As Object"; //BA.debugLineNum = 47;BA.debugLine="Return Me"; if (true) return this; //BA.debugLineNum = 48;BA.debugLine="End Sub"; return null; } public void _initializecamera2() throws Exception{ ResumableSub_InitializeCamera2 rsub = new ResumableSub_InitializeCamera2(this); rsub.resume(ba, null); } public static class ResumableSub_InitializeCamera2 extends BA.ResumableSub { public ResumableSub_InitializeCamera2(keymon.lat.medicomed.c_nuevocliente parent) { this.parent = parent; } keymon.lat.medicomed.c_nuevocliente parent; String _permission = ""; boolean _result = false; @Override public void resume(BA ba, Object[] result) throws Exception{ while (true) { switch (state) { case -1: return; case 0: //C this.state = 1; //BA.debugLineNum = 319;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_CAMERA); //BA.debugLineNum = 320;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As"; parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null); this.state = 19; return; case 19: //C this.state = 1; _permission = (String) result[0]; _result = (Boolean) result[1]; ; //BA.debugLineNum = 321;BA.debugLine="If Result Then"; if (true) break; case 1: //if this.state = 6; if (_result) { this.state = 3; }else { this.state = 5; }if (true) break; case 3: //C this.state = 6; //BA.debugLineNum = 322;BA.debugLine="camEx2.Initialize(p_cam, frontCamera, Me, \"Camer"; parent._camex2._initialize /*String*/ (ba,parent._p_cam,parent._frontcamera,parent,"Camera1"); //BA.debugLineNum = 323;BA.debugLine="frontCamera = camEx2.Front"; parent._frontcamera = parent._camex2._front /*boolean*/ ; //BA.debugLineNum = 324;BA.debugLine="Log(\"inicializamos Camara\")"; parent.__c.LogImpl("354984710","inicializamos Camara",0); if (true) break; case 5: //C this.state = 6; //BA.debugLineNum = 326;BA.debugLine="ToastMessageShow(\"No permission!!!\", True)"; parent.__c.ToastMessageShow(BA.ObjectToCharSequence("No permission!!!"),parent.__c.True); if (true) break; case 6: //C this.state = 7; ; //BA.debugLineNum = 328;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 = 329;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As"; parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null); this.state = 20; return; case 20: //C this.state = 7; _permission = (String) result[0]; _result = (Boolean) result[1]; ; //BA.debugLineNum = 330;BA.debugLine="If Result Then"; if (true) break; case 7: //if this.state = 12; if (_result) { this.state = 9; }else { this.state = 11; }if (true) break; case 9: //C this.state = 12; //BA.debugLineNum = 331;BA.debugLine="Log(\"conpermisos para escritura\")"; parent.__c.LogImpl("354984717","conpermisos para escritura",0); if (true) break; case 11: //C this.state = 12; //BA.debugLineNum = 333;BA.debugLine="ToastMessageShow(\"No permission!!!\", True)"; parent.__c.ToastMessageShow(BA.ObjectToCharSequence("No permission!!!"),parent.__c.True); if (true) break; case 12: //C this.state = 13; ; //BA.debugLineNum = 336;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 = 337;BA.debugLine="Wait For B4XPage_PermissionResult (Permission As"; parent.__c.WaitFor("b4xpage_permissionresult", ba, this, null); this.state = 21; return; case 21: //C this.state = 13; _permission = (String) result[0]; _result = (Boolean) result[1]; ; //BA.debugLineNum = 338;BA.debugLine="If Result Then"; if (true) break; case 13: //if this.state = 18; if (_result) { this.state = 15; }else { this.state = 17; }if (true) break; case 15: //C this.state = 18; //BA.debugLineNum = 339;BA.debugLine="Log(\"conpermisos para escritura\")"; parent.__c.LogImpl("354984725","conpermisos para escritura",0); if (true) break; case 17: //C this.state = 18; //BA.debugLineNum = 341;BA.debugLine="ToastMessageShow(\"No permission!!!\", True)"; parent.__c.ToastMessageShow(BA.ObjectToCharSequence("No permission!!!"),parent.__c.True); if (true) break; case 18: //C this.state = -1; ; //BA.debugLineNum = 343;BA.debugLine="End Sub"; if (true) break; } } } } public void _b4xpage_permissionresult(String _permission,boolean _result) throws Exception{ } public String _jobdone(keymon.lat.medicomed.httpjob _job) throws Exception{ keymon.lat.medicomed.dbrequestmanager._dbresult _resultado = null; String _cliente = ""; Object[] _records = null; String _k = ""; //BA.debugLineNum = 283;BA.debugLine="Sub JobDone(Job As HttpJob)"; //BA.debugLineNum = 284;BA.debugLine="Log(Job.Success)"; __c.LogImpl("354788097",BA.ObjectToString(_job._success /*boolean*/ ),0); //BA.debugLineNum = 285;BA.debugLine="If Job.Success = False Then"; if (_job._success /*boolean*/ ==__c.False) { }else { //BA.debugLineNum = 288;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job"; __c.LogImpl("354788101","JobDone: '"+BA.ObjectToString(_reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(_reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green); //BA.debugLineNum = 289;BA.debugLine="If Job.JobName = \"DBRequest\" Then"; if ((_job._jobname /*String*/ ).equals("DBRequest")) { //BA.debugLineNum = 290;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJo"; _resultado = _reqmanager._handlejob /*keymon.lat.medicomed.dbrequestmanager._dbresult*/ (_job); //BA.debugLineNum = 291;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"ins_CNUEVO"; if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("ins_CNUEVOSPendientes_head_")>-1) { //BA.debugLineNum = 292;BA.debugLine="Private cliente As String= resultado.Tag"; _cliente = BA.ObjectToString(_resultado.Tag /*Object*/ ); //BA.debugLineNum = 293;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_"; _cliente = _cliente.substring((int) (_cliente.indexOf("_")+24)); //BA.debugLineNum = 294;BA.debugLine="Log($\"Cliente1:${cliente}\"$)"; __c.LogImpl("354788107",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0); //BA.debugLineNum = 295;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update C"; _b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update CLIENTES_NUEVOS SET CN_ENVIO = ? WHERE CN_ID = ? AND CN_ENVIO <> 1",anywheresoftware.b4a.keywords.Common.ArrayToList(new String[]{"1",_cliente})); //BA.debugLineNum = 296;BA.debugLine="For Each records() As Object In resultado.Rows"; { final anywheresoftware.b4a.BA.IterableList group12 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ; final int groupLen12 = group12.getSize() ;int index12 = 0; ; for (; index12 < groupLen12;index12++){ _records = (Object[])(group12.Get(index12)); //BA.debugLineNum = 297;BA.debugLine="For Each k As String In resultado.Columns.Key"; { final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys(); final int groupLen13 = group13.getSize() ;int index13 = 0; ; for (; index13 < groupLen13;index13++){ _k = BA.ObjectToString(group13.Get(index13)); //BA.debugLineNum = 298;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & record"; __c.LogImpl("354788111",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0); } }; } }; }; }; //BA.debugLineNum = 303;BA.debugLine="Job.Release"; _job._release /*String*/ (); }; //BA.debugLineNum = 305;BA.debugLine="End Sub"; return ""; } public String _lv_colonia_itemclick(int _position,Object _value) throws Exception{ //BA.debugLineNum = 187;BA.debugLine="Private Sub lv_colonia_ItemClick (Position As Int,"; //BA.debugLineNum = 188;BA.debugLine="lv_colonia.Visible = False"; _lv_colonia.setVisible(__c.False); //BA.debugLineNum = 189;BA.debugLine="If Value <> \"Código no encontrado.\" And Value <>"; if ((_value).equals((Object)("Código no encontrado.")) == false && (_value).equals((Object)("Ingrese colonia manualmente.")) == false) { //BA.debugLineNum = 190;BA.debugLine="et_colonia.Text = Value"; _et_colonia.setText(BA.ObjectToCharSequence(_value)); //BA.debugLineNum = 191;BA.debugLine="banderasepo = 0"; _banderasepo = (int) (0); }else { //BA.debugLineNum = 193;BA.debugLine="banderasepo = 1"; _banderasepo = (int) (1); }; //BA.debugLineNum = 195;BA.debugLine="End Sub"; return ""; } public String _mandapendientesclientesnuevos() throws Exception{ int _i = 0; keymon.lat.medicomed.dbrequestmanager._dbcommand _cmd = null; //BA.debugLineNum = 266;BA.debugLine="Sub mandaPendientesclientesnuevos"; //BA.debugLineNum = 267;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"SELECT CN_ID"; _c = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT CN_ID, CN_FECHA , CN_USER, CN_LAT, CN_LON, CN_NOMBRE, CN_DIRECCION, COLONIA, CP, CN_ALMACEN, CN_RUTA, CN_BANDERA FROM CLIENTES_NUEVOS where CN_ENVIO <> 1"))); //BA.debugLineNum = 268;BA.debugLine="If c.RowCount>0 Then"; if (_c.getRowCount()>0) { //BA.debugLineNum = 269;BA.debugLine="For i = 0 To c.RowCount - 1"; { final int step3 = 1; final int limit3 = (int) (_c.getRowCount()-1); _i = (int) (0) ; for (;_i <= limit3 ;_i = _i + step3 ) { //BA.debugLineNum = 270;BA.debugLine="c.Position = i"; _c.setPosition(_i); //BA.debugLineNum = 272;BA.debugLine="Dim cmd As DBCommand"; _cmd = new keymon.lat.medicomed.dbrequestmanager._dbcommand(); //BA.debugLineNum = 273;BA.debugLine="cmd.Initialize"; _cmd.Initialize(); //BA.debugLineNum = 274;BA.debugLine="cmd.Name = \"insert_clientesnuevos2_MEDI\""; _cmd.Name /*String*/ = "insert_clientesnuevos2_MEDI"; //BA.debugLineNum = 275;BA.debugLine="cmd.Parameters = Array As Object(c.GetString(\"C"; _cmd.Parameters /*Object[]*/ = new Object[]{(Object)(_c.GetString("CN_ID")),(Object)(_c.GetString("CN_FECHA")),(Object)(_c.GetString("CN_USER")),(Object)(_c.GetString("CN_LAT")),(Object)(_c.GetString("CN_LON")),(Object)(_c.GetString("CN_NOMBRE")),(Object)(_c.GetString("CN_DIRECCION")),(Object)(_c.GetString("COLONIA")),(Object)(_c.GetString("CP")),(Object)(_c.GetString("CN_ALMACEN")),(Object)(_c.GetString("CN_RUTA")),(Object)(_c.GetString("CN_BANDERA"))}; //BA.debugLineNum = 276;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"ins_CNUEVOSPe"; _reqmanager._executecommand /*String*/ (_cmd,(Object)(("ins_CNUEVOSPendientes_head_"+__c.SmartStringFormatter("",(Object)(_c.GetString("CN_ID")))+""))); } }; }; //BA.debugLineNum = 279;BA.debugLine="c.Close"; _c.Close(); //BA.debugLineNum = 280;BA.debugLine="End Sub"; return ""; } public String _p_nuevocliente_click() throws Exception{ //BA.debugLineNum = 308;BA.debugLine="Private Sub p_nuevoCliente_Click"; //BA.debugLineNum = 310;BA.debugLine="End Sub"; return ""; } public String _stopcamera2() throws Exception{ //BA.debugLineNum = 392;BA.debugLine="Private Sub StopCamera2"; //BA.debugLineNum = 394;BA.debugLine="If camEx2.IsInitialized Then"; if (_camex2.IsInitialized /*boolean*/ ()) { //BA.debugLineNum = 395;BA.debugLine="camEx2.Release"; _camex2._release /*String*/ (); }; //BA.debugLineNum = 397;BA.debugLine="End Sub"; return ""; } public Object callSub(String sub, Object sender, Object[] args) throws Exception { BA.senderHolder.set(sender); if (BA.fastSubCompare(sub, "B4XPAGE_CREATED")) return _b4xpage_created((anywheresoftware.b4a.objects.B4XViewWrapper) args[0]); if (BA.fastSubCompare(sub, "GPS_LOCATIONCHANGED")) return _gps_locationchanged((anywheresoftware.b4a.gps.LocationWrapper) args[0]); if (BA.fastSubCompare(sub, "JOBDONE")) return _jobdone((keymon.lat.medicomed.httpjob) args[0]); return BA.SubDelegator.SubNotFound; } }