Exemple #1
0
 protected override void AddItem(AdminItem item)
 {
     DocumentTypeToevoegenQuery.Insert(new DocumentTypeToevoegenCommand
     {
         Id   = Guid.NewGuid().ToString(),
         Name = item.Name
     });
 }
        private void AddDocumentTypeButton_OnClick(object sender, RoutedEventArgs e)
        {
            var newDocumentType = InputBox.Show(this, "Documenttype toevoegen", "Documenttype:");

            if (newDocumentType == null)
            {
                return;
            }

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

            DocumentTypeToevoegenQuery.Insert(command);

            documentTypeDropdownItemsSource.Add(new DocumentTypeDto {
                Id = command.Id, Name = command.Name
            });

            DocumentTypeDropdown.SelectedValue = command.Id;
        }