예제 #1
0
 protected override void AddItem(AdminItem item)
 {
     DocumentTypeToevoegenQuery.Insert(new DocumentTypeToevoegenCommand
     {
         Id   = Guid.NewGuid().ToString(),
         Name = item.Name
     });
 }
예제 #2
0
        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;
        }