public async Task CheckMap(Map map) { if (client == null) { return; } // Set the item as completed and update it in the table map.Complete = true; try { await mapTable.UpdateAsync(map); // update the new item in the local database await SyncAsync(); // send changes to the mobile service if (map.Complete) adapter.Remove (map); } catch (Exception e) { CreateAndShowDialog (e, "Error"); } }
public async void AddMap(View view) { if (client == null || string.IsNullOrWhiteSpace (textNewToDo.Text)) { return; } // Create a new item var map = new Map { //Text = textNewToDo.Text //add collum = value //for each collumn //leave complete it is nessecary for the localdb Complete = false }; try { await mapTable.InsertAsync(map); // insert the new item into the local database await SyncAsync(); // send changes to the mobile service if (!map.Complete) { adapter.Add (map); } } catch (Exception e) { CreateAndShowDialog (e, "Error"); } //textNewToDo.Text = ""; }
/// <summary> /// Initializes a new instance of the <see cref="CaaPa.Map"/> class. /// </summary> /// <param name="MapId" >MapId .</param> /// <param name="LocationAddress ">LocationAddress .</param> /// <param name="Longitude ">Longitude .</param> /// <param name="Latitude">Latitude .</param> /// <param name="URL" >URL .</param> public MapWrapper(Map map) { Map = map; }