Exemplo n.º 1
0
        private async void cmbChangeStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //Hämtar issue id
            var issueId = (sender as ComboBox).Tag;
            await SqliteContext.UpdateIssueAsync((long)issueId, (string)cmbChangeStatus.SelectedItem);

            await LoadIssuesAsync();
        }
        private async void btnChangeStatus_Click(object sender, RoutedEventArgs e)
        {
            if (lvIssues.SelectedItem == null)
            {
                return;
            }

            Issue issue = (Issue)lvIssues.SelectedItem;

            string newStatus = cbxStatuses.SelectedValue.ToString();

            issue.Status = newStatus;

            await SqliteContext.UpdateIssueAsync(issue);

            // Update list
            // IssueViewModel.ReplaceIssue(lvIssues.SelectedIndex, issue);
        }