public async static Task AddNewRowAsync(IssueData row) { await Task.Delay(500).ConfigureAwait(false); AllIssues.Value.Insert(0, row); row.Id = AllIssues.Value.Max(x => x.Id) + 1; }
public async static Task UpdateRowAsync(IssueData row) { if (row == null) { return; } IssueData data = AllIssues.Value.FirstOrDefault(x => x.Id == row.Id); if (data == null) { return; } data.Priority = row.Priority; data.Subject = row.Subject; data.UserId = row.UserId; data.Votes = row.Votes; data.Created = row.Created; await System.Threading.Tasks.Task.Delay(500).ConfigureAwait(false); }
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); }
public async static Task DeleteRowAsync(IssueData row) { await Task.Delay(500).ConfigureAwait(false); AllIssues.Value.Remove(AllIssues.Value.Find(x => x.Id == row.Id)); }