Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        static async Task <ValidationErrorInfo> AddNewIssueAsync(IssueData issue)
        {
            await IssuesService.AddNewRowAsync(issue);

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

            return(null);
        }
Exemplo n.º 5
0
        public async static Task DeleteRowAsync(IssueData row)
        {
            await Task.Delay(500).ConfigureAwait(false);

            AllIssues.Value.Remove(AllIssues.Value.Find(x => x.Id == row.Id));
        }