public async void AddBeacon(View view) { if (client == null) { return; } // Create a new item var beacon = new caapa.Beacon { //add collum = value //for each collumn //leave complete it is nessecary for the localdb //this may need to wait for the gui integration Complete = false }; try { await beaconTable.InsertAsync(beacon); // insert the new item into the local database await SyncAsync(); // send changes to the mobile service if (!beacon.Complete) { beaconadapter.Add(beacon); } } catch (Exception e) { CreateAndShowDialog(e, "Error"); } }
public async Task CheckBeacon(caapa.Beacon beacon) { if (client == null) { return; } // Set the item as completed and update it in the table beacon.Complete = true; try { await beaconTable.UpdateAsync(beacon); // update the new item in the local database await SyncAsync(); // send changes to the mobile service if (beacon.Complete) { beaconadapter.Remove(beacon); } } catch (Exception e) { CreateAndShowDialog(e, "Error"); } }
/// <summary> /// Initializes a new instance of the <see cref="CaaPa.Beacon"/> class. /// </summary> /// <param name="BeaconBluetoothKey ">BeaconBluetoothKey .</param> /// <param name="BeaconName ">BeaconName .</param> /// <param name="BeaconDesc">BeaconDesc.</param> /// <param name="LoationId">LocationID.</param> public BeaconWrapper(Beacon beacon) { Beacon = beacon; }
public async Task CheckItem(Beacon beacon) { }