AddNewElement(string elementName) { if (elementName == "Задачу") { IssueViewModel.Initialize(new IssueViewRequest { IssueId = 0, Scope = scope, Board = CurrentBoard }); } else if (elementName == "Строку") { var newName = await ShowRowNameInput(); if (!string.IsNullOrEmpty(newName)) { var newRow = new RowInfo { Name = newName, Board = CurrentBoard }; await scope.CreateOrUpdateRowAsync(newRow); } } else if (elementName == "Столбец") { var newName = await ShowColumnNameInput(); if (!string.IsNullOrEmpty(newName)) { var newColumn = new ColumnInfo { Name = newName, Board = CurrentBoard }; await scope.CreateOrUpdateColumnAsync(newColumn); } } await RefreshContent(); }
private void UpdateCard(object o) { if (o is LocalIssue) { IssueViewModel.Initialize(new IssueViewRequest { IssueId = SelectedIssue.Id, Scope = scope, Board = CurrentBoard }); } else if (o is null) { IssueViewModel.Initialize(new IssueViewRequest { IssueId = 0, Scope = scope, Board = CurrentBoard }); } }