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