private async void InsertBikeSensorData() { // This code inserts a new TodoItem into the database. When the operation completes // and Mobile Services has assigned an Id, the item is added to the CollectionView // Create a new item var item = new BikeSensorData { imeiId = imeiText.Text, location = locationText.Text, latitude = latitudeText.Text, longtitude = longtitudeText.Text }; try { await BikeSensorTable.InsertAsync(item); var progressBar = (ProgressBar)FindViewById(Resource.Id.progressBar1); progressBar.Visibility = ViewStates.Visible; adapter.Add(item); progressBar.Visibility = ViewStates.Gone; } catch (Exception e) { CreateAndShowDialog(e, "Error"); } }
public BikeSensorDataWrapper(BikeSensorData item) { BikeSensorData = item; }