Esempio n. 1
0
 public void DeleteIssues(ValidateRowDeletionArgs args)
 {
     foreach (IssueData item in args.Items)
     {
         IssuesService.DeleteRowAsync(item).Wait();
     }
 }
Esempio n. 2
0
        async Task <FetchRowsResult> GetIssuesAsync(FetchRowsAsyncArgs args)
        {
            var take   = args.Take ?? 30;
            var issues = await IssuesService.GetIssuesAsync(
                skip : args.Skip,
                take : take,
                sortOrder : GetIssueSortOrder(args.SortOrder),
                filter : (IssueFilter)args.Filter);

            return(new FetchRowsResult(issues, hasMoreRows: issues.Length == take));
        }
Esempio n. 3
0
        static async Task <object[]> GetTotalSummariesAsync(GetSummariesAsyncArgs e)
        {
            var summaryValues = await IssuesService.GetSummariesAsync((IssueFilter)e.Filter);

            return(e.Summaries.Select(x => {
                if (x.SummaryType == SummaryType.Count)
                {
                    return (object)summaryValues.Count;
                }
                if (x.SummaryType == SummaryType.Max && x.PropertyName == "Created")
                {
                    return summaryValues.LastCreated;
                }
                throw new InvalidOperationException();
            }).ToArray());
        }
Esempio n. 4
0
 async void AssignUsers()
 {
     Users = await IssuesService.GetUsersAsync();
 }
Esempio n. 5
0
        static async Task <ValidationErrorInfo> AddNewIssueAsync(IssueData issue)
        {
            await IssuesService.AddNewRowAsync(issue);

            return(null);
        }
Esempio n. 6
0
        static async Task <ValidationErrorInfo> UpdateIssueAsync(IssueData issue)
        {
            await IssuesService.UpdateRowAsync(issue);

            return(null);
        }