public void DeleteIssues(ValidateRowDeletionArgs args) { foreach (IssueData item in args.Items) { IssuesService.DeleteRowAsync(item).Wait(); } }
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)); }
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()); }
async void AssignUsers() { Users = await IssuesService.GetUsersAsync(); }
static async Task <ValidationErrorInfo> AddNewIssueAsync(IssueData issue) { await IssuesService.AddNewRowAsync(issue); return(null); }
static async Task <ValidationErrorInfo> UpdateIssueAsync(IssueData issue) { await IssuesService.UpdateRowAsync(issue); return(null); }