package gunav2.keymon.com.mx;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class c_clientescompletos_subs_0 {


public static RemoteObject  _b4xpage_created(RemoteObject __ref,RemoteObject _root1) throws Exception{
try {
		Debug.PushSubsStack("B4XPage_Created (c_clientescompletos) ","c_clientescompletos",11,__ref.getField(false, "ba"),__ref,19);
if (RapidSub.canDelegate("b4xpage_created")) { return __ref.runUserSub(false, "c_clientescompletos","b4xpage_created", __ref, _root1);}
Debug.locals.put("Root1", _root1);
 BA.debugLineNum = 19;BA.debugLine="Private Sub B4XPage_Created (Root1 As B4XView)";
Debug.ShouldStop(262144);
 BA.debugLineNum = 20;BA.debugLine="Root = Root1";
Debug.ShouldStop(524288);
__ref.setField ("_root" /*RemoteObject*/ ,_root1);
 BA.debugLineNum = 23;BA.debugLine="Root.LoadLayout(\"Clientes_completos\")";
Debug.ShouldStop(4194304);
__ref.getField(false,"_root" /*RemoteObject*/ ).runVoidMethodAndSync ("LoadLayout",(Object)(RemoteObject.createImmutable("Clientes_completos")),__ref.getField(false, "ba"));
 BA.debugLineNum = 24;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _busca_textchanged(RemoteObject __ref,RemoteObject _old,RemoteObject _new) throws Exception{
try {
		Debug.PushSubsStack("BUSCA_TextChanged (c_clientescompletos) ","c_clientescompletos",11,__ref.getField(false, "ba"),__ref,26);
if (RapidSub.canDelegate("busca_textchanged")) { return __ref.runUserSub(false, "c_clientescompletos","busca_textchanged", __ref, _old, _new);}
int _i = 0;
RemoteObject _label1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
RemoteObject _label2 = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
Debug.locals.put("Old", _old);
Debug.locals.put("New", _new);
 BA.debugLineNum = 26;BA.debugLine="Sub BUSCA_TextChanged (Old As String, New As Strin";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 27;BA.debugLine="If New = \"\" Then";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_new,BA.ObjectToString(""))) { 
 BA.debugLineNum = 28;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(134217728);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 }else {
 BA.debugLineNum = 30;BA.debugLine="q_buscar = \"%\" & BUSCA.Text & \"%\"";
Debug.ShouldStop(536870912);
__ref.setField ("_q_buscar" /*RemoteObject*/ ,RemoteObject.concat(RemoteObject.createImmutable("%"),__ref.getField(false,"_busca" /*RemoteObject*/ ).runMethod(true,"getText"),RemoteObject.createImmutable("%")));
 BA.debugLineNum = 31;BA.debugLine="c2=B4XPages.MainPage.skmt.ExecQuery2(\"select  CAT";
Debug.ShouldStop(1073741824);
__ref.getField(false,"_c2" /*RemoteObject*/ ).setObject (c_clientescompletos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runMethod(false,"ExecQuery2",(Object)(BA.ObjectToString("select  CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from CAT_CATCLIENTESTODOS where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?) order by CAT_CL_NOMBRE ")),(Object)(RemoteObject.createNewArray("String",new int[] {3},new Object[] {__ref.getField(true,"_q_buscar" /*RemoteObject*/ ),__ref.getField(true,"_q_buscar" /*RemoteObject*/ ),__ref.getField(true,"_q_buscar" /*RemoteObject*/ )}))));
 BA.debugLineNum = 32;BA.debugLine="ListView1.Clear";
Debug.ShouldStop(-2147483648);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("Clear");
 BA.debugLineNum = 33;BA.debugLine="Subs.SetDivider(ListView1, Colors.White, 2)";
Debug.ShouldStop(1);
c_clientescompletos._subs.runVoidMethod ("_setdivider" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_listview1" /*RemoteObject*/ )),(Object)(c_clientescompletos.__c.getField(false,"Colors").getField(true,"White")),(Object)(BA.numberCast(int.class, 2)));
 BA.debugLineNum = 34;BA.debugLine="lfila.text = \"Nombre y Calle\"";
Debug.ShouldStop(2);
__ref.getField(false,"_lfila" /*RemoteObject*/ ).runMethod(true,"setText",BA.ObjectToCharSequence("Nombre y Calle"));
 BA.debugLineNum = 35;BA.debugLine="If c2.RowCount>0 Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean(">",__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 36;BA.debugLine="For i=0 To c2.RowCount -1";
Debug.ShouldStop(8);
{
final int step10 = 1;
final int limit10 = RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step10 > 0 && _i <= limit10) || (step10 < 0 && _i >= limit10) ;_i = ((int)(0 + _i + step10))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 37;BA.debugLine="c2.Position=i";
Debug.ShouldStop(16);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 38;BA.debugLine="Dim label1 As Label";
Debug.ShouldStop(32);
_label1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 39;BA.debugLine="label1 = ListView1.TwoLinesLayout.Label";
Debug.ShouldStop(64);
_label1 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"Label");Debug.locals.put("label1", _label1);
 BA.debugLineNum = 40;BA.debugLine="label1.TextSize = 20";
Debug.ShouldStop(128);
_label1.runMethod(true,"setTextSize",BA.numberCast(float.class, 20));
 BA.debugLineNum = 41;BA.debugLine="label1.TextColor = Colors.White";
Debug.ShouldStop(256);
_label1.runMethod(true,"setTextColor",c_clientescompletos.__c.getField(false,"Colors").getField(true,"White"));
 BA.debugLineNum = 42;BA.debugLine="Dim label2 As Label";
Debug.ShouldStop(512);
_label2 = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 43;BA.debugLine="label2 = ListView1.TwoLinesLayout.SecondLabel";
Debug.ShouldStop(1024);
_label2 = __ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").getField(false,"SecondLabel");Debug.locals.put("label2", _label2);
 BA.debugLineNum = 44;BA.debugLine="label2.TextSize = 20";
Debug.ShouldStop(2048);
_label2.runMethod(true,"setTextSize",BA.numberCast(float.class, 20));
 BA.debugLineNum = 45;BA.debugLine="label2.TextColor = Colors.White";
Debug.ShouldStop(4096);
_label2.runMethod(true,"setTextColor",c_clientescompletos.__c.getField(false,"Colors").getField(true,"White"));
 BA.debugLineNum = 46;BA.debugLine="label1.Height = 25dip";
Debug.ShouldStop(8192);
_label1.runMethod(true,"setHeight",c_clientescompletos.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25))));
 BA.debugLineNum = 47;BA.debugLine="label2.Height = 60dip";
Debug.ShouldStop(16384);
_label2.runMethod(true,"setHeight",c_clientescompletos.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 60))));
 BA.debugLineNum = 49;BA.debugLine="ListView1.TwoLinesLayout.ItemHeight = 95dip";
Debug.ShouldStop(65536);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runMethod(false,"getTwoLinesLayout").runMethod(true,"setItemHeight",c_clientescompletos.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 95))));
 BA.debugLineNum = 50;BA.debugLine="label1.Typeface = Typeface.CreateNew(Typeface.D";
Debug.ShouldStop(131072);
_label1.runMethod(false,"setTypeface",c_clientescompletos.__c.getField(false,"Typeface").runMethod(false,"CreateNew",(Object)(c_clientescompletos.__c.getField(false,"Typeface").getField(false,"DEFAULT_BOLD")),(Object)(c_clientescompletos.__c.getField(false,"Typeface").getField(true,"STYLE_BOLD"))));
 BA.debugLineNum = 51;BA.debugLine="label2.Typeface = Typeface.CreateNew(Typeface.D";
Debug.ShouldStop(262144);
_label2.runMethod(false,"setTypeface",c_clientescompletos.__c.getField(false,"Typeface").runMethod(false,"CreateNew",(Object)(c_clientescompletos.__c.getField(false,"Typeface").getField(false,"DEFAULT_BOLD")),(Object)(c_clientescompletos.__c.getField(false,"Typeface").getField(true,"STYLE_BOLD"))));
 BA.debugLineNum = 52;BA.debugLine="ListView1.AddTwoLines(c2.GetString(\"CAT_CL_CODI";
Debug.ShouldStop(524288);
__ref.getField(false,"_listview1" /*RemoteObject*/ ).runVoidMethod ("AddTwoLines",(Object)(BA.ObjectToCharSequence(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CODIGO"))))),(Object)(BA.ObjectToCharSequence(RemoteObject.concat(__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_NOMBRE"))),c_clientescompletos.__c.getField(true,"CRLF"),RemoteObject.createImmutable("CALLE:  "),__ref.getField(false,"_c2" /*RemoteObject*/ ).runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CAT_CL_CALLE")))))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 56;BA.debugLine="c2.Close";
Debug.ShouldStop(8388608);
__ref.getField(false,"_c2" /*RemoteObject*/ ).runVoidMethod ("Close");
 };
 BA.debugLineNum = 58;BA.debugLine="End Sub";
Debug.ShouldStop(33554432);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _class_globals(RemoteObject __ref) throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Private Root As B4XView 'ignore";
c_clientescompletos._root = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");__ref.setField("_root",c_clientescompletos._root);
 //BA.debugLineNum = 3;BA.debugLine="Private xui As XUI 'ignore";
c_clientescompletos._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",c_clientescompletos._xui);
 //BA.debugLineNum = 4;BA.debugLine="Dim q_buscar As String";
c_clientescompletos._q_buscar = RemoteObject.createImmutable("");__ref.setField("_q_buscar",c_clientescompletos._q_buscar);
 //BA.debugLineNum = 5;BA.debugLine="Dim c2 As Cursor";
c_clientescompletos._c2 = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_c2",c_clientescompletos._c2);
 //BA.debugLineNum = 6;BA.debugLine="Dim ListView1 As ListView";
c_clientescompletos._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");__ref.setField("_listview1",c_clientescompletos._listview1);
 //BA.debugLineNum = 7;BA.debugLine="Dim lfila As Label";
c_clientescompletos._lfila = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");__ref.setField("_lfila",c_clientescompletos._lfila);
 //BA.debugLineNum = 8;BA.debugLine="Private BUSCA As EditText";
c_clientescompletos._busca = RemoteObject.createNew ("anywheresoftware.b4a.objects.EditTextWrapper");__ref.setField("_busca",c_clientescompletos._busca);
 //BA.debugLineNum = 9;BA.debugLine="Dim STIME As String";
c_clientescompletos._stime = RemoteObject.createImmutable("");__ref.setField("_stime",c_clientescompletos._stime);
 //BA.debugLineNum = 10;BA.debugLine="Dim S As Cursor";
c_clientescompletos._s = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");__ref.setField("_s",c_clientescompletos._s);
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _initialize(RemoteObject __ref,RemoteObject _ba) throws Exception{
try {
		Debug.PushSubsStack("Initialize (c_clientescompletos) ","c_clientescompletos",11,__ref.getField(false, "ba"),__ref,14);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "c_clientescompletos","initialize", __ref, _ba);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
 BA.debugLineNum = 14;BA.debugLine="Public Sub Initialize As Object";
Debug.ShouldStop(8192);
 BA.debugLineNum = 15;BA.debugLine="Return Me";
Debug.ShouldStop(16384);
if (true) return __ref;
 BA.debugLineNum = 16;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _listview1_itemclick(RemoteObject __ref,RemoteObject _position,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("ListView1_ItemClick (c_clientescompletos) ","c_clientescompletos",11,__ref.getField(false, "ba"),__ref,60);
if (RapidSub.canDelegate("listview1_itemclick")) { return __ref.runUserSub(false, "c_clientescompletos","listview1_itemclick", __ref, _position, _value);}
Debug.locals.put("Position", _position);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 60;BA.debugLine="Sub ListView1_ItemClick (Position As Int, Value As";
Debug.ShouldStop(134217728);
 BA.debugLineNum = 62;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery(\"delete from";
Debug.ShouldStop(536870912);
c_clientescompletos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("delete from CUENTAA")));
 BA.debugLineNum = 63;BA.debugLine="Log(Value)";
Debug.ShouldStop(1073741824);
c_clientescompletos.__c.runVoidMethod ("LogImpl","070909955",BA.ObjectToString(_value),0);
 BA.debugLineNum = 64;BA.debugLine="B4XPages.MainPage.skmt.ExecNonQuery2(\"INSERT INT";
Debug.ShouldStop(-2147483648);
c_clientescompletos._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,__ref.getField(false, "ba")).getField(false,"_skmt" /*RemoteObject*/ ).runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO CUENTAA VALUES (?)")),(Object)(c_clientescompletos.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {_value})))));
 BA.debugLineNum = 69;BA.debugLine="B4XPages.ShowPage(\"Tclientes\")";
Debug.ShouldStop(16);
c_clientescompletos._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,__ref.getField(false, "ba"),(Object)(RemoteObject.createImmutable("Tclientes")));
 BA.debugLineNum = 71;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}