Exemplo n.º 1
0
        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");
            }
        }
Exemplo n.º 2
0
        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");
            }
        }
Exemplo n.º 3
0
            /// <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;
            }
Exemplo n.º 4
0
            /// <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;
            }
Exemplo n.º 5
0
        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");
            }

        }
Exemplo n.º 6
0
 public async Task CheckItem(Beacon beacon)
 {
 }