private void OnBind() { ListView list = FindViewById<ListView>(Resource.Id.GetMian_items); DataTable ldt = new DataTable(); string sql = "select orderno,cus_code,cus_name,getorderdate,isupdate from getmain "; ldt = SqliteHelper.ExecuteDataTable(sql); GetMianAdapter listItemAdapter = new GetMianAdapter(this, ldt); list.Adapter = listItemAdapter; }
private void OnBind() { TextView title = FindViewById<TextView>(Resource.Id.GetMian_title); ListView list = FindViewById<ListView>(Resource.Id.GetMian_items); DataTable ldt = new DataTable(); string sql = "select orderno,cus_code,cus_name,getorderdate,isupdate from getmain";// where isupdate ='N' int li_row = SqliteHelper.ExecuteNum("select orderno,cus_code,cus_name,getorderdate,isupdate from getmain where isupdate ='N'"); ldt = SqliteHelper.ExecuteDataTable(sql); if (ldt != null) if (ldt.Rows.Count > 0) title.Text = "订单记录(共" + ldt.Rows.Count + "个,未上传" + li_row + "个)"; GetMianAdapter listItemAdapter = new GetMianAdapter(this, ldt); list.Adapter = listItemAdapter; }