예제 #1
0
        private async Task LoadIssuesAsync()
        {
            issues = await SqliteContext.GetIssuesAsync();

            LoadActiveIssueAsync();
            LoadClosedIssueAsync();
        }
예제 #2
0
        private async void CreateComment_Click(object sender, RoutedEventArgs e)
        {
            await SqliteContext.CreateCommentAsync(
                new Comment
            {
                Description = CommentBox.ToString(),
                IssueId     = await SqliteContext.GetIssuesAsync(cmbIssueTitle.SelectedItem.ToString())
            }

                );

            await LoadIssueByTitleAsync();
        }
        public static async Task PopulateAsync(int maxItemsCount)
        {
            _issues.Clear();
            List <Issue> list = await SqliteContext.GetIssuesAsync(maxItemsCount);

            foreach (Issue issue in list)
            {
                issue.Comments = await SqliteContext.GetCommentsByIssueIdAsync(issue.Id, maxItemsCount);

                issue.Customer = await SqliteContext.GetCustomerByIdAsync(issue.CustomerId);

                _issues.Add(issue);
            }
        }