Пример #1
0
 protected override void AddItem(AdminItem item)
 {
     CorrespondentToevoegenQuery.Insert(new CorrespondentToevoegenCommand
     {
         Id   = Guid.NewGuid().ToString(),
         Name = item.Name
     });
 }
Пример #2
0
        private void AddCorrespondentButton_OnClick(object sender, RoutedEventArgs e)
        {
            var newCorrespondent = InputBox.Show(this, "Correspondent toevoegen", "Correspondent:");

            if (newCorrespondent == null)
            {
                return;
            }

            var command = new CorrespondentToevoegenCommand {
                Id = Guid.NewGuid().ToString(), Name = newCorrespondent
            };

            CorrespondentToevoegenQuery.Insert(command);

            correspondentDropdownItemsSource.Add(new CorrespondentDto {
                Id = command.Id, Name = command.Name
            });

            CorrespondentDropdown.SelectedValue = command.Id;
        }