package keymon.lat.medicomed;


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

public class c_ticketsdia 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, "keymon.lat.medicomed.c_ticketsdia");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", keymon.lat.medicomed.c_ticketsdia.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.objects.PanelWrapper _p_ticketsdia = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _c = null;
public anywheresoftware.b4a.sql.SQL.CursorWrapper _s = null;
public String _ruta = "";
public anywheresoftware.b4a.objects.ListViewWrapper _listview1 = null;
public anywheresoftware.b4a.objects.ButtonWrapper _b_noventa = null;
public String _nombre_boton = "";
public String _stime = "";
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 Object  _initialize(keymon.lat.medicomed.c_ticketsdia __ref,anywheresoftware.b4a.BA _ba) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((Object) Debug.delegate(ba, "initialize", new Object[] {_ba}));}
RDebugUtils.currentLine=15400960;
 //BA.debugLineNum = 15400960;BA.debugLine="Public Sub Initialize As Object";
RDebugUtils.currentLine=15400961;
 //BA.debugLineNum = 15400961;BA.debugLine="Return Me";
if (true) return this;
RDebugUtils.currentLine=15400962;
 //BA.debugLineNum = 15400962;BA.debugLine="End Sub";
return null;
}
public boolean  _activity_keypress(keymon.lat.medicomed.c_ticketsdia __ref,int _key) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "activity_keypress", false))
	 {return ((Boolean) Debug.delegate(ba, "activity_keypress", new Object[] {_key}));}
RDebugUtils.currentLine=15663104;
 //BA.debugLineNum = 15663104;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean";
RDebugUtils.currentLine=15663106;
 //BA.debugLineNum = 15663106;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
if (_key==__c.KeyCodes.KEYCODE_BACK) { 
RDebugUtils.currentLine=15663108;
 //BA.debugLineNum = 15663108;BA.debugLine="B4XPages.ShowPage(\"principal\")";
_b4xpages._showpage /*String*/ (ba,"principal");
 };
RDebugUtils.currentLine=15663112;
 //BA.debugLineNum = 15663112;BA.debugLine="Return False";
if (true) return __c.False;
RDebugUtils.currentLine=15663113;
 //BA.debugLineNum = 15663113;BA.debugLine="End Sub";
return false;
}
public String  _b_noventa_click(keymon.lat.medicomed.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b_noventa_click", false))
	 {return ((String) Debug.delegate(ba, "b_noventa_click", null));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=15794176;
 //BA.debugLineNum = 15794176;BA.debugLine="Sub b_noventa_Click";
RDebugUtils.currentLine=15794177;
 //BA.debugLineNum = 15794177;BA.debugLine="If nombre_boton = \"NOVENTA\" Then";
if ((__ref._nombre_boton /*String*/ ).equals("NOVENTA")) { 
RDebugUtils.currentLine=15794178;
 //BA.debugLineNum = 15794178;BA.debugLine="nombre_boton = \"VENTA\"";
__ref._nombre_boton /*String*/  = "VENTA";
RDebugUtils.currentLine=15794179;
 //BA.debugLineNum = 15794179;BA.debugLine="b_noventa.Text =\"VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("VENTA"));
RDebugUtils.currentLine=15794180;
 //BA.debugLineNum = 15794180;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select * f";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from venta_no_venta where eventov = 'SinVenta'")));
RDebugUtils.currentLine=15794181;
 //BA.debugLineNum = 15794181;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=15794182;
 //BA.debugLineNum = 15794182;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=15794183;
 //BA.debugLineNum = 15794183;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step7 = 1;
final int limit7 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit7 ;_i = _i + step7 ) {
RDebugUtils.currentLine=15794184;
 //BA.debugLineNum = 15794184;BA.debugLine="c.Position = i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=15794185;
 //BA.debugLineNum = 15794185;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15794186;
 //BA.debugLineNum = 15794186;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=15794187;
 //BA.debugLineNum = 15794187;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
RDebugUtils.currentLine=15794188;
 //BA.debugLineNum = 15794188;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=15794189;
 //BA.debugLineNum = 15794189;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15794190;
 //BA.debugLineNum = 15794190;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=15794191;
 //BA.debugLineNum = 15794191;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=15794192;
 //BA.debugLineNum = 15794192;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=15794193;
 //BA.debugLineNum = 15794193;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=15794194;
 //BA.debugLineNum = 15794194;BA.debugLine="label2.Width = ListView1.Width * 0.99";
_label2.setWidth((int) (__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getWidth()*0.99));
RDebugUtils.currentLine=15794195;
 //BA.debugLineNum = 15794195;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 80dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (80)));
RDebugUtils.currentLine=15794196;
 //BA.debugLineNum = 15794196;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"clientev\"),";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")),BA.ObjectToCharSequence("SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav")));
RDebugUtils.currentLine=15794197;
 //BA.debugLineNum = 15794197;BA.debugLine="Log(c.GetString(\"clientev\") & \"SubTotal $\" & c";
__c.LogImpl("315794197",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")+"SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav"),0);
 }
};
 };
 }else {
RDebugUtils.currentLine=15794201;
 //BA.debugLineNum = 15794201;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=15794202;
 //BA.debugLineNum = 15794202;BA.debugLine="b_noventa.Text =\"NO VENTA\"";
__ref._b_noventa /*anywheresoftware.b4a.objects.ButtonWrapper*/ .setText(BA.ObjectToCharSequence("NO VENTA"));
RDebugUtils.currentLine=15794203;
 //BA.debugLineNum = 15794203;BA.debugLine="c = B4XPages.MainPage.skmt.ExecQuery(\"select * f";
__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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from venta_no_venta where eventov <> 'SinVenta'")));
RDebugUtils.currentLine=15794204;
 //BA.debugLineNum = 15794204;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=15794205;
 //BA.debugLineNum = 15794205;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=15794206;
 //BA.debugLineNum = 15794206;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step30 = 1;
final int limit30 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit30 ;_i = _i + step30 ) {
RDebugUtils.currentLine=15794207;
 //BA.debugLineNum = 15794207;BA.debugLine="c.Position = i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=15794208;
 //BA.debugLineNum = 15794208;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15794209;
 //BA.debugLineNum = 15794209;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=15794210;
 //BA.debugLineNum = 15794210;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
RDebugUtils.currentLine=15794211;
 //BA.debugLineNum = 15794211;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=15794212;
 //BA.debugLineNum = 15794212;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15794213;
 //BA.debugLineNum = 15794213;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=15794214;
 //BA.debugLineNum = 15794214;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=15794215;
 //BA.debugLineNum = 15794215;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=15794216;
 //BA.debugLineNum = 15794216;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=15794217;
 //BA.debugLineNum = 15794217;BA.debugLine="label2.Width = ListView1.Width * 0.99";
_label2.setWidth((int) (__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getWidth()*0.99));
RDebugUtils.currentLine=15794218;
 //BA.debugLineNum = 15794218;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 80dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (80)));
RDebugUtils.currentLine=15794219;
 //BA.debugLineNum = 15794219;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"clientev\"),";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")),BA.ObjectToCharSequence("SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav")));
RDebugUtils.currentLine=15794220;
 //BA.debugLineNum = 15794220;BA.debugLine="Log(c.GetString(\"clientev\") & \"SubTotal $\" & c";
__c.LogImpl("315794220",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")+"SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav"),0);
 }
};
 };
RDebugUtils.currentLine=15794223;
 //BA.debugLineNum = 15794223;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
 };
RDebugUtils.currentLine=15794225;
 //BA.debugLineNum = 15794225;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_appear(keymon.lat.medicomed.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b4xpage_appear", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_appear", null));}
int _i = 0;
anywheresoftware.b4a.objects.LabelWrapper _label1 = null;
anywheresoftware.b4a.objects.LabelWrapper _label2 = null;
RDebugUtils.currentLine=15532032;
 //BA.debugLineNum = 15532032;BA.debugLine="Sub B4XPage_Appear";
RDebugUtils.currentLine=15532033;
 //BA.debugLineNum = 15532033;BA.debugLine="nombre_boton = \"NOVENTA\"";
__ref._nombre_boton /*String*/  = "NOVENTA";
RDebugUtils.currentLine=15532051;
 //BA.debugLineNum = 15532051;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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("select * from venta_no_venta where eventov <> 'SinVenta'")));
RDebugUtils.currentLine=15532052;
 //BA.debugLineNum = 15532052;BA.debugLine="ListView1.Clear";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .Clear();
RDebugUtils.currentLine=15532053;
 //BA.debugLineNum = 15532053;BA.debugLine="If c.RowCount > 0 Then";
if (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()>0) { 
RDebugUtils.currentLine=15532054;
 //BA.debugLineNum = 15532054;BA.debugLine="For i = 0 To c.RowCount - 1";
{
final int step5 = 1;
final int limit5 = (int) (__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .getRowCount()-1);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
RDebugUtils.currentLine=15532055;
 //BA.debugLineNum = 15532055;BA.debugLine="c.Position = i";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition(_i);
RDebugUtils.currentLine=15532056;
 //BA.debugLineNum = 15532056;BA.debugLine="Dim label1 As Label";
_label1 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15532057;
 //BA.debugLineNum = 15532057;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
_label1 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().Label;
RDebugUtils.currentLine=15532058;
 //BA.debugLineNum = 15532058;BA.debugLine="label1.TextSize = 10";
_label1.setTextSize((float) (10));
RDebugUtils.currentLine=15532059;
 //BA.debugLineNum = 15532059;BA.debugLine="label1.TextColor = Colors.Black";
_label1.setTextColor(__c.Colors.Black);
RDebugUtils.currentLine=15532060;
 //BA.debugLineNum = 15532060;BA.debugLine="Dim label2 As Label";
_label2 = new anywheresoftware.b4a.objects.LabelWrapper();
RDebugUtils.currentLine=15532061;
 //BA.debugLineNum = 15532061;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
_label2 = __ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().SecondLabel;
RDebugUtils.currentLine=15532062;
 //BA.debugLineNum = 15532062;BA.debugLine="label2.TextSize = 15";
_label2.setTextSize((float) (15));
RDebugUtils.currentLine=15532063;
 //BA.debugLineNum = 15532063;BA.debugLine="label2.TextColor = Colors.Blue";
_label2.setTextColor(__c.Colors.Blue);
RDebugUtils.currentLine=15532064;
 //BA.debugLineNum = 15532064;BA.debugLine="label2.Height = 60dip";
_label2.setHeight(__c.DipToCurrent((int) (60)));
RDebugUtils.currentLine=15532065;
 //BA.debugLineNum = 15532065;BA.debugLine="label2.Width = ListView1.Width * 0.99";
_label2.setWidth((int) (__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getWidth()*0.99));
RDebugUtils.currentLine=15532066;
 //BA.debugLineNum = 15532066;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 80dip";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .getTwoLinesLayout().setItemHeight(__c.DipToCurrent((int) (80)));
RDebugUtils.currentLine=15532067;
 //BA.debugLineNum = 15532067;BA.debugLine="ListView1.AddTwoLines(c.GetString(\"clientev\"),";
__ref._listview1 /*anywheresoftware.b4a.objects.ListViewWrapper*/ .AddTwoLines(BA.ObjectToCharSequence(__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")),BA.ObjectToCharSequence("SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav")));
RDebugUtils.currentLine=15532068;
 //BA.debugLineNum = 15532068;BA.debugLine="Log(c.GetString(\"clientev\") & \"SubTotal $\" & c.";
__c.LogImpl("315532068",__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("clientev")+"SubTotal $"+__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("montoVentav"),0);
 }
};
 };
RDebugUtils.currentLine=15532071;
 //BA.debugLineNum = 15532071;BA.debugLine="c.Close";
__ref._c /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .Close();
RDebugUtils.currentLine=15532072;
 //BA.debugLineNum = 15532072;BA.debugLine="End Sub";
return "";
}
public String  _b4xpage_created(keymon.lat.medicomed.c_ticketsdia __ref,anywheresoftware.b4a.objects.B4XViewWrapper _root1) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "b4xpage_created", false))
	 {return ((String) Debug.delegate(ba, "b4xpage_created", new Object[] {_root1}));}
RDebugUtils.currentLine=15466496;
 //BA.debugLineNum = 15466496;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
RDebugUtils.currentLine=15466497;
 //BA.debugLineNum = 15466497;BA.debugLine="Root = Root1";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/  = _root1;
RDebugUtils.currentLine=15466499;
 //BA.debugLineNum = 15466499;BA.debugLine="ruta = File.DirInternal";
__ref._ruta /*String*/  = __c.File.getDirInternal();
RDebugUtils.currentLine=15466500;
 //BA.debugLineNum = 15466500;BA.debugLine="Root.LoadLayout(\"ticketsdia\")";
__ref._root /*anywheresoftware.b4a.objects.B4XViewWrapper*/ .LoadLayout("ticketsdia",ba);
RDebugUtils.currentLine=15466501;
 //BA.debugLineNum = 15466501;BA.debugLine="If File.Exists(ruta, \"kmt.db\") = False Then";
if (__c.File.Exists(__ref._ruta /*String*/ ,"kmt.db")==__c.False) { 
RDebugUtils.currentLine=15466502;
 //BA.debugLineNum = 15466502;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=15466505;
 //BA.debugLineNum = 15466505;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(keymon.lat.medicomed.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
RDebugUtils.currentLine=15335424;
 //BA.debugLineNum = 15335424;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=15335425;
 //BA.debugLineNum = 15335425;BA.debugLine="Private Root As B4XView 'ignore";
_root = new anywheresoftware.b4a.objects.B4XViewWrapper();
RDebugUtils.currentLine=15335426;
 //BA.debugLineNum = 15335426;BA.debugLine="Private xui As XUI 'ignore";
_xui = new anywheresoftware.b4a.objects.B4XViewWrapper.XUI();
RDebugUtils.currentLine=15335427;
 //BA.debugLineNum = 15335427;BA.debugLine="Private p_ticketsdia As Panel";
_p_ticketsdia = new anywheresoftware.b4a.objects.PanelWrapper();
RDebugUtils.currentLine=15335429;
 //BA.debugLineNum = 15335429;BA.debugLine="Dim c As Cursor";
_c = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=15335430;
 //BA.debugLineNum = 15335430;BA.debugLine="Dim S As Cursor";
_s = new anywheresoftware.b4a.sql.SQL.CursorWrapper();
RDebugUtils.currentLine=15335431;
 //BA.debugLineNum = 15335431;BA.debugLine="Dim ruta As String";
_ruta = "";
RDebugUtils.currentLine=15335432;
 //BA.debugLineNum = 15335432;BA.debugLine="Dim ListView1 As ListView";
_listview1 = new anywheresoftware.b4a.objects.ListViewWrapper();
RDebugUtils.currentLine=15335433;
 //BA.debugLineNum = 15335433;BA.debugLine="Dim b_noventa As Button";
_b_noventa = new anywheresoftware.b4a.objects.ButtonWrapper();
RDebugUtils.currentLine=15335434;
 //BA.debugLineNum = 15335434;BA.debugLine="Dim nombre_boton As String";
_nombre_boton = "";
RDebugUtils.currentLine=15335435;
 //BA.debugLineNum = 15335435;BA.debugLine="Dim STIME As String";
_stime = "";
RDebugUtils.currentLine=15335436;
 //BA.debugLineNum = 15335436;BA.debugLine="End Sub";
return "";
}
public String  _listview1_itemlongclick(keymon.lat.medicomed.c_ticketsdia __ref,int _position,Object _value) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "listview1_itemlongclick", false))
	 {return ((String) Debug.delegate(ba, "listview1_itemlongclick", new Object[] {_position,_value}));}
RDebugUtils.currentLine=15728640;
 //BA.debugLineNum = 15728640;BA.debugLine="Sub ListView1_ItemLongClick (Position As Int, Valu";
RDebugUtils.currentLine=15728641;
 //BA.debugLineNum = 15728641;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery("delete from CUENTAA");
RDebugUtils.currentLine=15728642;
 //BA.debugLineNum = 15728642;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INTO";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{_value}));
RDebugUtils.currentLine=15728643;
 //BA.debugLineNum = 15728643;BA.debugLine="DateTime.TimeFormat = \"HHmmss\"";
__c.DateTime.setTimeFormat("HHmmss");
RDebugUtils.currentLine=15728644;
 //BA.debugLineNum = 15728644;BA.debugLine="STIME=DateTime.Time(DateTime.Now)";
__ref._stime /*String*/  = __c.DateTime.Time(__c.DateTime.getNow());
RDebugUtils.currentLine=15728645;
 //BA.debugLineNum = 15728645;BA.debugLine="s=B4XPages.MainPage.skmt.ExecQuery(\"SELECT COUNT(";
__ref._s /*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 /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecQuery("SELECT COUNT(*) AS CUANTOS FROM HIST_STAY_STORE WHERE HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)")));
RDebugUtils.currentLine=15728646;
 //BA.debugLineNum = 15728646;BA.debugLine="s.Position = 0";
__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .setPosition((int) (0));
RDebugUtils.currentLine=15728647;
 //BA.debugLineNum = 15728647;BA.debugLine="If s.GetString(\"CUANTOS\") = 1 Then";
if ((__ref._s /*anywheresoftware.b4a.sql.SQL.CursorWrapper*/ .GetString("CUANTOS")).equals(BA.NumberToString(1))) { 
RDebugUtils.currentLine=15728648;
 //BA.debugLineNum = 15728648;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
 }else {
RDebugUtils.currentLine=15728650;
 //BA.debugLineNum = 15728650;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
_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[]{_value}));
RDebugUtils.currentLine=15728651;
 //BA.debugLineNum = 15728651;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"UPDATE HIS";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._skmt /*anywheresoftware.b4a.sql.SQL*/ .ExecNonQuery2("UPDATE HIST_STAY_STORE set HSS_IN = ?  where HSS_IN = 0 AND HSS_CODIGO In (select cuenta from cuentaa)",anywheresoftware.b4a.keywords.Common.ArrayToList(new Object[]{(Object)(__ref._stime /*String*/ )}));
 };
RDebugUtils.currentLine=15728653;
 //BA.debugLineNum = 15728653;BA.debugLine="DateTime.TimeFormat = \"HH:mm:ss\"";
__c.DateTime.setTimeFormat("HH:mm:ss");
RDebugUtils.currentLine=15728654;
 //BA.debugLineNum = 15728654;BA.debugLine="Subs.guardaClienteHoraInicio(Value)";
_subs._guardaclientehorainicio /*String*/ (ba,BA.ObjectToString(_value));
RDebugUtils.currentLine=15728655;
 //BA.debugLineNum = 15728655;BA.debugLine="B4XPages.MainPage.cliente.venimosDeTicketsDia = T";
_b4xpages._mainpage /*keymon.lat.medicomed.b4xmainpage*/ (ba)._cliente /*keymon.lat.medicomed.c_cliente*/ ._venimosdeticketsdia /*boolean*/  = __c.True;
RDebugUtils.currentLine=15728656;
 //BA.debugLineNum = 15728656;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=15728657;
 //BA.debugLineNum = 15728657;BA.debugLine="End Sub";
return "";
}
public String  _p_ticketsdia_click(keymon.lat.medicomed.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "p_ticketsdia_click", false))
	 {return ((String) Debug.delegate(ba, "p_ticketsdia_click", null));}
RDebugUtils.currentLine=15859712;
 //BA.debugLineNum = 15859712;BA.debugLine="Private Sub p_ticketsdia_Click";
RDebugUtils.currentLine=15859714;
 //BA.debugLineNum = 15859714;BA.debugLine="End Sub";
return "";
}
public String  _regresar_click(keymon.lat.medicomed.c_ticketsdia __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="c_ticketsdia";
if (Debug.shouldDelegate(ba, "regresar_click", false))
	 {return ((String) Debug.delegate(ba, "regresar_click", null));}
RDebugUtils.currentLine=15597568;
 //BA.debugLineNum = 15597568;BA.debugLine="Sub Regresar_Click";
RDebugUtils.currentLine=15597569;
 //BA.debugLineNum = 15597569;BA.debugLine="B4XPages.ShowPage(\"cliente\")";
_b4xpages._showpage /*String*/ (ba,"cliente");
RDebugUtils.currentLine=15597570;
 //BA.debugLineNum = 15597570;BA.debugLine="End Sub";
return "";
}
}