private void LoadData() { _customerInfoList = Library.CustomerInfoList.GetCustomerInfoList(this, new Library.CustomerInfoList.Criteria()); CustomersListAdapter adapter = new CustomersListAdapter(this, Resource.Layout.CustomerInfoRow, _customerInfoList); ListAdapter = adapter; /*DAL.CustomerInfoList.GetCustomerInfoList(new CriteriaJ(this), (o, e) => * { * if (e.Error != null) * { * Android.Util.Log.Error("GetCustomerInfoList", string.Format("An error has occurred: {0}", e.Error.Message)); * } * else * { * _customerInfoList = e.Object; * CustomersListAdapter adapter = new CustomersListAdapter(this, Resource.Layout.CustomerInfoRow, _customerInfoList); * ListAdapter = adapter; * } * });*/ }
public static IListAdapter LoadCustomerData(Activity context) { CustomersListAdapter adapter = null; Library.CustomerInfoList customerInfoList = Library.CustomerInfoList.GetCustomerInfoList(context, new Library.CustomerInfoList.Criteria()); adapter = new CustomersListAdapter(context, Resource.Layout.CustomerInfoRow, customerInfoList); /*Library.CustomerInfoList.GetCustomerInfoList(new CriteriaJ(context), (o, e) => * { * if (e.Error != null) * { * Android.Util.Log.Error("GetCustomerInfoList", string.Format("An error has occurred: {0}", e.Error.Message)); * } * else * { * DAL.CustomerInfoList customerInfoList = e.Object; * adapter = new CustomersListAdapter(context, Resource.Layout.CustomerInfoRow, customerInfoList); * } * });*/ return(adapter); }