package SHARK2.keymon.com.mx;


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

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

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
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 _skmt = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.objects.ButtonWrapper _cancela = null;
public anywheresoftware.b4a.objects.ButtonWrapper _guarda = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_1 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_2 = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_3 = null;
public anywheresoftware.b4a.objects.EditTextWrapper _e_comm = null;
public String _motivo = "";
public String _cuenta = "";
public String _usuario = "";
public String _sdate = "";
public String _stime = "";
public com.rootsoft.togglelibrary.ToggleLibrary _tgl = null;
public anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper _r_4 = null;
public SHARK2.keymon.com.mx.dbrequestmanager _reqmanager = null;
public String _stay_hh = "";
public String _stay_mi = "";
public String _stay_ss = "";
public b4a.example.dateutils _dateutils = null;
public SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.notificationservice _notificationservice = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public Object  _initialize(SHARK2.keymon.com.mx.c_noventa __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=12779520;
 //BA.debugLineNum = 12779520;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=12779521;
 //BA.debugLineNum = 12779521;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=12779522;
 //BA.debugLineNum = 12779522;BA.debugLine="End Sub";
return null;
}
public String  _b4xpage_appear(SHARK2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
RDebugUtils.currentLine=12910592;
 //BA.debugLineNum = 12910592;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=12910593;
 //BA.debugLineNum = 12910593;BA.debugLine="e_comm.Text=\"\"";
__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=12910594;
 //BA.debugLineNum = 12910594;BA.debugLine="tgl.Initialize";
__ref._tgl /*com.rootsoft.togglelibrary.ToggleLibrary*/ .Initialize(ba);
RDebugUtils.currentLine=12910595;
 //BA.debugLineNum = 12910595;BA.debugLine="If Not(Starter.gps.GPSEnabled) Then";
if (__c.Not(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getGPSEnabled())) { 
RDebugUtils.currentLine=12910596;
 //BA.debugLineNum = 12910596;BA.debugLine="ToastMessageShow(\"Es necesario tener el GPS ence";
__c.ToastMessageShow(BA.ObjectToCharSequence("Es necesario tener el GPS encendido"),__c.True);
RDebugUtils.currentLine=12910597;
 //BA.debugLineNum = 12910597;BA.debugLine="StartActivity(Starter.gps.LocationSettingsIntent";
__c.StartActivity(ba,(Object)(_starter._gps /*anywheresoftware.b4a.gps.GPS*/ .getLocationSettingsIntent()));
 };
RDebugUtils.currentLine=12910599;
 //BA.debugLineNum = 12910599;BA.debugLine="r_1.Checked = False";
__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=12910600;
 //BA.debugLineNum = 12910600;BA.debugLine="r_2.Checked = False";
__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=12910601;
 //BA.debugLineNum = 12910601;BA.debugLine="r_3.Checked = False";
__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=12910602;
 //BA.debugLineNum = 12910602;BA.debugLine="r_4.Checked = False";
__ref._r_4 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .setChecked(__c.False);
RDebugUtils.currentLine=12910603;
 //BA.debugLineNum = 12910603;BA.debugLine="e_comm.Text = \"\"";
__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .setText(BA.ObjectToCharSequence(""));
RDebugUtils.currentLine=12910604;
 //BA.debugLineNum = 12910604;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(SHARK2.keymon.com.mx.c_noventa __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=12845056;
 //BA.debugLineNum = 12845056;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=12845057;
 //BA.debugLineNum = 12845057;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=12845059;
 //BA.debugLineNum = 12845059;BA.debugLine="Root.LoadLayout(\"noventa\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("noventa",ba);
RDebugUtils.currentLine=12845060;
 //BA.debugLineNum = 12845060;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=12845062;
 //BA.debugLineNum = 12845062;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=12845063;
 //BA.debugLineNum = 12845063;BA.debugLine="File.Copy(File.DirAssets, \"kmt.db\", ruta, \"kmt.d";
__c.File.Copy(__c.File.getDirAssets(),"kmt.db",__ref._ruta /*String*/ ,"kmt.db");
 };
RDebugUtils.currentLine=12845065;
 //BA.debugLineNum = 12845065;BA.debugLine="reqManager.Initialize(Me, Starter.DBReqServer)";
__ref._reqmanager /*SHARK2.keymon.com.mx.dbrequestmanager*/ ._initialize /*String*/ (null,ba,this,_starter._dbreqserver /*String*/ );
RDebugUtils.currentLine=12845067;
 //BA.debugLineNum = 12845067;BA.debugLine="End Sub";
return "";
}
public String  _cancela_click(SHARK2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "cancela_click", false))
	 {return ((String) Debug.delegate(ba, "cancela_click", null));}
RDebugUtils.currentLine=13041664;
 //BA.debugLineNum = 13041664;BA.debugLine="Sub CANCELA_Click";
RDebugUtils.currentLine=13041665;
 //BA.debugLineNum = 13041665;BA.debugLine="B4XPages.ShowPage(\"Cliente\")";
_b4xpages._showpage /*String*/ (ba,"Cliente");
RDebugUtils.currentLine=13041666;
 //BA.debugLineNum = 13041666;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(SHARK2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
RDebugUtils.currentLine=12713984;
 //BA.debugLineNum = 12713984;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=12713985;
 //BA.debugLineNum = 12713985;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=12713986;
 //BA.debugLineNum = 12713986;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=12713988;
 //BA.debugLineNum = 12713988;BA.debugLine="Dim g As GPS";
_g = new anywheresoftware.b4a.gps.GPS();
RDebugUtils.currentLine=12713989;
 //BA.debugLineNum = 12713989;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=12713990;
 //BA.debugLineNum = 12713990;BA.debugLine="Dim skmt As SQL";
_skmt = new anywheresoftware.b4a.sql.SQL();
RDebugUtils.currentLine=12713991;
 //BA.debugLineNum = 12713991;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=12713993;
 //BA.debugLineNum = 12713993;BA.debugLine="Dim CANCELA As Button";
_cancela = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=12713994;
 //BA.debugLineNum = 12713994;BA.debugLine="Dim GUARDA As Button";
_guarda = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=12713995;
 //BA.debugLineNum = 12713995;BA.debugLine="Dim r_1 As RadioButton";
_r_1 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=12713996;
 //BA.debugLineNum = 12713996;BA.debugLine="Dim r_2 As RadioButton";
_r_2 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=12713997;
 //BA.debugLineNum = 12713997;BA.debugLine="Dim r_3 As RadioButton";
_r_3 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=12713998;
 //BA.debugLineNum = 12713998;BA.debugLine="Dim e_comm As EditText";
_e_comm = new anywheresoftware.b4a.objects.EditTextWrapper();
RDebugUtils.currentLine=12713999;
 //BA.debugLineNum = 12713999;BA.debugLine="Dim motivo As String";
_motivo = "";
RDebugUtils.currentLine=12714000;
 //BA.debugLineNum = 12714000;BA.debugLine="Dim cuenta As String";
_cuenta = "";
RDebugUtils.currentLine=12714001;
 //BA.debugLineNum = 12714001;BA.debugLine="Dim usuario As String";
_usuario = "";
RDebugUtils.currentLine=12714002;
 //BA.debugLineNum = 12714002;BA.debugLine="Dim sDate,sTime As String";
_sdate = "";
_stime = "";
RDebugUtils.currentLine=12714004;
 //BA.debugLineNum = 12714004;BA.debugLine="Dim tgl As Toggle";
_tgl = new com.rootsoft.togglelibrary.ToggleLibrary();
RDebugUtils.currentLine=12714005;
 //BA.debugLineNum = 12714005;BA.debugLine="Dim r_4 As RadioButton";
_r_4 = new anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper();
RDebugUtils.currentLine=12714006;
 //BA.debugLineNum = 12714006;BA.debugLine="Dim reqManager As DBRequestManager";
_reqmanager = new SHARK2.keymon.com.mx.dbrequestmanager();
RDebugUtils.currentLine=12714007;
 //BA.debugLineNum = 12714007;BA.debugLine="Private stay_hh As String";
_stay_hh = "";
RDebugUtils.currentLine=12714008;
 //BA.debugLineNum = 12714008;BA.debugLine="Private stay_mi As String";
_stay_mi = "";
RDebugUtils.currentLine=12714009;
 //BA.debugLineNum = 12714009;BA.debugLine="Private stay_ss As String";
_stay_ss = "";
RDebugUtils.currentLine=12714010;
 //BA.debugLineNum = 12714010;BA.debugLine="End Sub";
return "";
}
public String  _gps_locationchanged(SHARK2.keymon.com.mx.c_noventa __ref,anywheresoftware.b4a.gps.LocationWrapper _location1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "gps_locationchanged", false))
	 {return ((String) Debug.delegate(ba, "gps_locationchanged", new Object[] {_location1}));}
RDebugUtils.currentLine=12976128;
 //BA.debugLineNum = 12976128;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
RDebugUtils.currentLine=12976131;
 //BA.debugLineNum = 12976131;BA.debugLine="End Sub";
return "";
}
public String  _guarda_click(SHARK2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "guarda_click", false))
	 {return ((String) Debug.delegate(ba, "guarda_click", null));}
int _i = 0;
anywheresoftware.b4a.sql.SQL.CursorWrapper _crevisa = null;
RDebugUtils.currentLine=13107200;
 //BA.debugLineNum = 13107200;BA.debugLine="Sub GUARDA_Click";
RDebugUtils.currentLine=13107201;
 //BA.debugLineNum = 13107201;BA.debugLine="If r_1.Checked Then";
if (__ref._r_1 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=13107202;
 //BA.debugLineNum = 13107202;BA.debugLine="motivo = \"CERRADO\"";
__ref._motivo /*String*/  = "CERRADO";
 }else 
{RDebugUtils.currentLine=13107203;
 //BA.debugLineNum = 13107203;BA.debugLine="Else If r_2.Checked Then";
if (__ref._r_2 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=13107204;
 //BA.debugLineNum = 13107204;BA.debugLine="motivo = \"NO COMPRA\"";
__ref._motivo /*String*/  = "NO COMPRA";
 }else 
{RDebugUtils.currentLine=13107205;
 //BA.debugLineNum = 13107205;BA.debugLine="Else If r_3.Checked Then";
if (__ref._r_3 /*anywheresoftware.b4a.objects.CompoundButtonWrapper.RadioButtonWrapper*/ .getChecked()) { 
RDebugUtils.currentLine=13107206;
 //BA.debugLineNum = 13107206;BA.debugLine="motivo = \"CON PRODUCTO\"";
__ref._motivo /*String*/  = "CON PRODUCTO";
 }else {
RDebugUtils.currentLine=13107208;
 //BA.debugLineNum = 13107208;BA.debugLine="motivo = \"NO ESTA EL ENCARGADO\"";
__ref._motivo /*String*/  = "NO ESTA EL ENCARGADO";
 }}}
;
RDebugUtils.currentLine=13107210;
 //BA.debugLineNum = 13107210;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
__c.DateTime.setDateFormat("MM/dd/yyyy");
RDebugUtils.currentLine=13107211;
 //BA.debugLineNum = 13107211;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
__ref._sdate /*String*/  = __c.DateTime.Date(__c.DateTime.getNow());
RDebugUtils.currentLine=13107212;
 //BA.debugLineNum = 13107212;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=13107213;
 //BA.debugLineNum = 13107213;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select CUENTA";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select CUENTA from cuentaa")));
RDebugUtils.currentLine=13107214;
 //BA.debugLineNum = 13107214;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=13107215;
 //BA.debugLineNum = 13107215;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
__ref._cuenta /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUENTA");
RDebugUtils.currentLine=13107216;
 //BA.debugLineNum = 13107216;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select usuari";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select usuario from usuarioa")));
RDebugUtils.currentLine=13107217;
 //BA.debugLineNum = 13107217;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=13107218;
 //BA.debugLineNum = 13107218;BA.debugLine="usuario = c.GetString(\"USUARIO\")";
__ref._usuario /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("USUARIO");
RDebugUtils.currentLine=13107219;
 //BA.debugLineNum = 13107219;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\"select PE_PRO";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select PE_PROID,PE_CANT FROM PEDIDO where pe_cliente in (Select CUENTA from cuentaa) ")));
RDebugUtils.currentLine=13107220;
 //BA.debugLineNum = 13107220;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=13107221;
 //BA.debugLineNum = 13107221;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step21 = 1;
final int limit21 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit21 ;_i = _i + step21 ) {
RDebugUtils.currentLine=13107222;
 //BA.debugLineNum = 13107222;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=13107223;
 //BA.debugLineNum = 13107223;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update ca";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_id = ?",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_CANT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("PE_PROID"))}));
RDebugUtils.currentLine=13107224;
 //BA.debugLineNum = 13107224;BA.debugLine="Subs.borraPedidoClienteActual";
_subs._borrapedidoclienteactual /*String*/ (ba);
 }
};
 };
RDebugUtils.currentLine=13107231;
 //BA.debugLineNum = 13107231;BA.debugLine="Dim cRevisa As Cursor = B4XPages.MainPage.skmt.Ex";
_crevisa = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
_crevisa = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(("SELECT distinct NV_CLIENTE FROM NOVENTA WHERE NV_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(__ref._cuenta /*String*/ ))+"'"))));
RDebugUtils.currentLine=13107232;
 //BA.debugLineNum = 13107232;BA.debugLine="If cRevisa.RowCount > 0 Then";
if (_crevisa.getRowCount()>0) { 
RDebugUtils.currentLine=13107233;
 //BA.debugLineNum = 13107233;BA.debugLine="cRevisa.Position = 0";
_crevisa.setPosition((int) (0));
RDebugUtils.currentLine=13107234;
 //BA.debugLineNum = 13107234;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 3  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 }else {
RDebugUtils.currentLine=13107236;
 //BA.debugLineNum = 13107236;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON) VALUES(?,?,?,?,?,?,?) ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._cuenta /*String*/ ),(Object)(__ref._sdate /*String*/ +__ref._stime /*String*/ ),(Object)(__ref._usuario /*String*/ ),(Object)(__ref._motivo /*String*/ ),(Object)(__ref._e_comm /*anywheresoftware.b4a.objects.EditTextWrapper*/ .getText()),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lat_gps /*String*/ ),(Object)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._lon_gps /*String*/ )}));
RDebugUtils.currentLine=13107237;
 //BA.debugLineNum = 13107237;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"UPDATE kmt_";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("UPDATE kmt_info set gestion = 3  where CAT_CL_CODIGO In (select cuenta from cuentaa)");
 };
RDebugUtils.currentLine=13107239;
 //BA.debugLineNum = 13107239;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=13107240;
 //BA.debugLineNum = 13107240;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=13107241;
 //BA.debugLineNum = 13107241;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_OUT = ?  where HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
RDebugUtils.currentLine=13107244;
 //BA.debugLineNum = 13107244;BA.debugLine="c=B4XPages.MainPage.skmt.ExecQuery(\" Select (subs";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery(" Select (substr(HSS_OUT,1,2) - substr(HSS_IN,1,2)) - Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then 1 Else 0 end HORAS_TOTALES, "+"Case when  (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) < 0 Then (substr(HSS_OUT,3,2) + 60 - substr(HSS_IN,3,2)) "+"	Else (substr(HSS_OUT,3,2) - substr(HSS_IN,3,2)) End - Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then 1 Else 0 end  MINUTOS_TOTALES, "+"Case when  (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) < 0 Then (substr(HSS_OUT,5,2) + 60 - substr(HSS_IN,5,2)) "+"	Else (substr(HSS_OUT,5,2) - substr(HSS_IN,5,2)) end SEGUNDOS_TOTALES "+"	from HIST_STAY_STORE where HSS_CODIGO In (Select cuenta from cuentaa) ")));
RDebugUtils.currentLine=13107250;
 //BA.debugLineNum = 13107250;BA.debugLine="c.Position = 0";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=13107251;
 //BA.debugLineNum = 13107251;BA.debugLine="stay_hh = c.GetString(\"HORAS_TOTALES\") * 60 * 60";
__ref._stay_hh /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("HORAS_TOTALES")))*60*60);
RDebugUtils.currentLine=13107252;
 //BA.debugLineNum = 13107252;BA.debugLine="stay_mi = c.GetString(\"MINUTOS_TOTALES\") * 60";
__ref._stay_mi /*String*/  = BA.NumberToString((double)(Double.parseDouble(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("MINUTOS_TOTALES")))*60);
RDebugUtils.currentLine=13107253;
 //BA.debugLineNum = 13107253;BA.debugLine="stay_ss = c.GetString(\"SEGUNDOS_TOTALES\")";
__ref._stay_ss /*String*/  = __ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("SEGUNDOS_TOTALES");
RDebugUtils.currentLine=13107255;
 //BA.debugLineNum = 13107255;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_TOT = ?  where HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)((double)(Double.parseDouble(__ref._stay_hh /*String*/ ))+(double)(Double.parseDouble(__ref._stay_mi /*String*/ ))+(double)(Double.parseDouble(__ref._stay_ss /*String*/ )))}));
RDebugUtils.currentLine=13107256;
 //BA.debugLineNum = 13107256;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIST";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_OUT set HSO_FIN = ?  ",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
RDebugUtils.currentLine=13107257;
 //BA.debugLineNum = 13107257;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=13107259;
 //BA.debugLineNum = 13107259;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"update PEDI";
_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("update PEDIDO_INICIO_FINAL set PIF_HORA_FINAL = ? where PIF_CLIENTE = ? and PIF_HORA_FINAL = 0",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__c.DateTime.getNow()),(Object)(__ref._cuenta /*String*/ )}));
RDebugUtils.currentLine=13107260;
 //BA.debugLineNum = 13107260;BA.debugLine="LogColor($\"actualizamos \"${cuenta},  hora_final=$";
__c.LogImpl("513107260",("actualizamos \""+__c.SmartStringFormatter("",(Object)(__ref._cuenta /*String*/ ))+",  hora_final="+__c.SmartStringFormatter("",(Object)(__c.DateTime.getNow()))+""),__c.Colors.Red);
RDebugUtils.currentLine=13107263;
 //BA.debugLineNum = 13107263;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
_b4xpages._showpage /*String*/ (ba,"Principal");
RDebugUtils.currentLine=13107264;
 //BA.debugLineNum = 13107264;BA.debugLine="End Sub";
return "";
}
public String  _jobdone(SHARK2.keymon.com.mx.c_noventa __ref,SHARK2.keymon.com.mx.httpjob _job) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "jobdone", false))
	 {return ((String) Debug.delegate(ba, "jobdone", new Object[] {_job}));}
SHARK2.keymon.com.mx.dbrequestmanager._dbresult _resultado = null;
String _cliente = "";
Object[] _records = null;
String _k = "";
RDebugUtils.currentLine=13238272;
 //BA.debugLineNum = 13238272;BA.debugLine="Sub JobDone(Job As HttpJob)";
RDebugUtils.currentLine=13238273;
 //BA.debugLineNum = 13238273;BA.debugLine="Log(Job.Success)";
__c.LogImpl("513238273",BA.ObjectToString(_job._success /*boolean*/ ),0);
RDebugUtils.currentLine=13238274;
 //BA.debugLineNum = 13238274;BA.debugLine="If Job.Success = False Then";
if (_job._success /*boolean*/ ==__c.False) { 
RDebugUtils.currentLine=13238275;
 //BA.debugLineNum = 13238275;BA.debugLine="ToastMessageShow(\"Error: \" & Job.ErrorMessage, Tr";
__c.ToastMessageShow(BA.ObjectToCharSequence("Error: "+_job._errormessage /*String*/ ),__c.True);
 }else {
RDebugUtils.currentLine=13238277;
 //BA.debugLineNum = 13238277;BA.debugLine="LogColor(\"JobDone: '\" & reqManager.HandleJob(Job)";
__c.LogImpl("513238277","JobDone: '"+BA.ObjectToString(__ref._reqmanager /*SHARK2.keymon.com.mx.dbrequestmanager*/ ._handlejob /*SHARK2.keymon.com.mx.dbrequestmanager._dbresult*/ (null,_job).Tag /*Object*/ )+"' - Registros: "+BA.NumberToString(__ref._reqmanager /*SHARK2.keymon.com.mx.dbrequestmanager*/ ._handlejob /*SHARK2.keymon.com.mx.dbrequestmanager._dbresult*/ (null,_job).Rows /*anywheresoftware.b4a.objects.collections.List*/ .getSize()),__c.Colors.Green);
RDebugUtils.currentLine=13238278;
 //BA.debugLineNum = 13238278;BA.debugLine="If Job.JobName = \"DBRequest\" Then";
if ((_job._jobname /*String*/ ).equals("DBRequest")) { 
RDebugUtils.currentLine=13238279;
 //BA.debugLineNum = 13238279;BA.debugLine="Dim resultado As DBResult = reqManager.HandleJob";
_resultado = __ref._reqmanager /*SHARK2.keymon.com.mx.dbrequestmanager*/ ._handlejob /*SHARK2.keymon.com.mx.dbrequestmanager._dbresult*/ (null,_job);
RDebugUtils.currentLine=13238280;
 //BA.debugLineNum = 13238280;BA.debugLine="If resultado.Tag.As(String).IndexOf(\"insert_nov";
if ((BA.ObjectToString(_resultado.Tag /*Object*/ )).indexOf("insert_noventa_")>-1) { 
RDebugUtils.currentLine=13238281;
 //BA.debugLineNum = 13238281;BA.debugLine="Private cliente As String= resultado.Tag";
_cliente = BA.ObjectToString(_resultado.Tag /*Object*/ );
RDebugUtils.currentLine=13238282;
 //BA.debugLineNum = 13238282;BA.debugLine="cliente = cliente.SubString(cliente.IndexOf(\"_\"";
_cliente = _cliente.substring((int) (_cliente.indexOf("_")+9));
RDebugUtils.currentLine=13238283;
 //BA.debugLineNum = 13238283;BA.debugLine="Log($\"Cliente1:${cliente}\"$)";
__c.LogImpl("513238283",("Cliente1:"+__c.SmartStringFormatter("",(Object)(_cliente))+""),0);
RDebugUtils.currentLine=13238284;
 //BA.debugLineNum = 13238284;BA.debugLine="Starter.skmt.ExecNonQuery($\"update NOVENTA set";
_starter._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery(("update NOVENTA set NV_ENVIO_OK = '1' where NV_CLIENTE = '"+__c.SmartStringFormatter("",(Object)(_cliente))+"'"));
RDebugUtils.currentLine=13238285;
 //BA.debugLineNum = 13238285;BA.debugLine="For Each records() As Object In resultado.Rows";
{
final anywheresoftware.b4a.BA.IterableList group13 = _resultado.Rows /*anywheresoftware.b4a.objects.collections.List*/ ;
final int groupLen13 = group13.getSize()
;int index13 = 0;
;
for (; index13 < groupLen13;index13++){
_records = (Object[])(group13.Get(index13));
RDebugUtils.currentLine=13238286;
 //BA.debugLineNum = 13238286;BA.debugLine="For Each k As String In resultado.Columns.Keys";
{
final anywheresoftware.b4a.BA.IterableList group14 = _resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Keys();
final int groupLen14 = group14.getSize()
;int index14 = 0;
;
for (; index14 < groupLen14;index14++){
_k = BA.ObjectToString(group14.Get(index14));
RDebugUtils.currentLine=13238287;
 //BA.debugLineNum = 13238287;BA.debugLine="Log(resultado.Tag & \": \" & k & \": \" & records";
__c.LogImpl("513238287",BA.ObjectToString(_resultado.Tag /*Object*/ )+": "+_k+": "+BA.ObjectToString(_records[(int)(BA.ObjectToNumber(_resultado.Columns /*anywheresoftware.b4a.objects.collections.Map*/ .Get((Object)(_k))))]),0);
 }
};
 }
};
 };
 };
RDebugUtils.currentLine=13238292;
 //BA.debugLineNum = 13238292;BA.debugLine="Job.Release";
_job._release /*String*/ (null);
 };
RDebugUtils.currentLine=13238294;
 //BA.debugLineNum = 13238294;BA.debugLine="End Sub";
return "";
}
public String  _mandapendientesnoventa(SHARK2.keymon.com.mx.c_noventa __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_noventa";
if (Debug.shouldDelegate(ba, "mandapendientesnoventa", false))
	 {return ((String) Debug.delegate(ba, "mandapendientesnoventa", null));}
int _i = 0;
SHARK2.keymon.com.mx.dbrequestmanager._dbcommand _cmd = null;
RDebugUtils.currentLine=13172736;
 //BA.debugLineNum = 13172736;BA.debugLine="Sub mandaPendientesnoventa";
RDebugUtils.currentLine=13172739;
 //BA.debugLineNum = 13172739;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"SELECT * FR";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/  = (anywheresoftware.b4a.sql.SQL.CursorWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.sql.SQL.CursorWrapper(), (android.database.Cursor)(_b4xpages._mainpage /*SHARK2.keymon.com.mx.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT * FROM NOVENTA where ifnull(NV_ENVIO_OK, 0) <> 1")));
RDebugUtils.currentLine=13172740;
 //BA.debugLineNum = 13172740;BA.debugLine="Log($\"NO VENTA PENDIENTE: ${c.RowCount}\"$)";
__c.LogImpl("513172740",("NO VENTA PENDIENTE: "+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()))+""),0);
RDebugUtils.currentLine=13172741;
 //BA.debugLineNum = 13172741;BA.debugLine="If c.RowCount>0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=13172742;
 //BA.debugLineNum = 13172742;BA.debugLine="For i=0 To c.RowCount -1";
{
final int step4 = 1;
final int limit4 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit4 ;_i = _i + step4 ) {
RDebugUtils.currentLine=13172743;
 //BA.debugLineNum = 13172743;BA.debugLine="c.Position=i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=13172744;
 //BA.debugLineNum = 13172744;BA.debugLine="Dim cmd As DBCommand";
_cmd = new SHARK2.keymon.com.mx.dbrequestmanager._dbcommand();
RDebugUtils.currentLine=13172745;
 //BA.debugLineNum = 13172745;BA.debugLine="cmd.Initialize";
_cmd.Initialize();
RDebugUtils.currentLine=13172746;
 //BA.debugLineNum = 13172746;BA.debugLine="cmd.Name = \"insert_noventa_SHARK2\"";
_cmd.Name /*String*/  = "insert_noventa_SHARK2";
RDebugUtils.currentLine=13172747;
 //BA.debugLineNum = 13172747;BA.debugLine="cmd.Parameters = Array As Object(C.GetString(\"N";
_cmd.Parameters /*Object[]*/  = new Object[]{(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_CLIENTE")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_FECHA")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_USER")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_MOTIVO")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_COMM")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_LAT")),(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_LON")),(Object)(_subs._traealmacen /*String*/ (ba)),(Object)(_subs._traeruta /*String*/ (ba,__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_CLIENTE")))};
RDebugUtils.currentLine=13172748;
 //BA.debugLineNum = 13172748;BA.debugLine="reqManager.ExecuteCommand(cmd , $\"insert_novent";
__ref._reqmanager /*SHARK2.keymon.com.mx.dbrequestmanager*/ ._executecommand /*String*/ (null,_cmd,(Object)(("insert_noventa_"+__c.SmartStringFormatter("",(Object)(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("NV_CLIENTE")))+"")));
 }
};
 };
RDebugUtils.currentLine=13172752;
 //BA.debugLineNum = 13172752;BA.debugLine="End Sub";
return "";
}
}