private async void SaveButton_Clicked(object sender, EventArgs e) { var item = (Schooler.Class.Todo)BindingContext; item.Progress = progressEntry.SelectedIndex == 0 ? "B" : progressEntry.SelectedIndex == 1 ? "P" : "E"; item.ManageUserId = manageUsers[managerEntry.SelectedIndex]; if (idx == -1) // new Item { dao.AddTodo(item); } else // edit item { dao.UpdateTodo(idx, item); } await Navigation.PopAsync(); }