Ejemplo n.º 1
0
        public async Task CheckLocation(Location location)
        {
            if (client == null) {
                return;
            }

            // Set the item as completed and update it in the table
            location.Complete = true;
            try {
                await locationTable.UpdateAsync(location); // update the new item in the local database
                await SyncAsync(); // send changes to the mobile service

                if (location.Complete)
                    adapter.Remove (location);

            } catch (Exception e) {
                CreateAndShowDialog (e, "Error");
            }
        }
Ejemplo n.º 2
0
        public async void AddLocation (View view)
        {
            if (client == null || string.IsNullOrWhiteSpace (textNewToDo.Text)) {
                return;
            }

            // Create a new item
            var location = new Location {
                //Text = textNewToDo.Text

                //add collum = value
                //for each collumn
                //leave complete it is nessecary for the localdb

                Complete = false
            };

            try {
                await locationTable.InsertAsync(location); // insert the new item into the local database
                await SyncAsync(); // send changes to the mobile service

                if (!location.Complete) {
                    adapter.Add (location);
                }
            } catch (Exception e) {
                CreateAndShowDialog (e, "Error");
            }

            //textNewToDo.Text = "";
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaaPa.Location"/> class.
 /// </summary>
 /// <param name="LocationName ">ocationName .</param>
 /// <param name="LocationDesc ">LocationDesc .</param>
 /// <param name="BeaconId">BeaconId.</param>
 /// <param name="UserId" >UserId .</param>
 public LocationWrapper(Location location)
 {
     Location = location; ;
 }