//Refresh the list with the items in the local database public async Task CheckItem(CreateUserBindingModel item) { if (client == null) { return; } // Set the item as completed and update it in the table await SyncAsync(); // send changes to the mobile service }
public async void AddItem(View view) { // if (client == null || string.IsNullOrWhiteSpace(textNewToDo.Text)) { // return; //} // Create a new item var item = new ToDoItem { Text = textNewToDo.Text, Complete = false }; var user = new CreateUserBindingModel { Email = this.email.Text, Username = this.user.Text, Password = this.password.Text, ConfirmPassword = this.confirm.Text, FirstName = this.firstname.Text, LastName = this.lastname.Text }; try { // await toDoTable.InsertAsync(item); // insert the new item into the local database await SyncAsync(true); // send changes to the mobile service if (!item.Complete) { adapter.Add(user); } } catch (Exception e) { CreateAndShowDialog(e, "Error"); } textNewToDo.Text = ""; }