public BestellpositionDialog(bestellposition p) : this()
        {
            var repo = new BestellPositionRepository();

            p = repo.GetSingle(p.Id); // reload, so we have every assoc loaded now

            _viewModel  = BestellpositionViewModel.FromExisting(p);
            DataContext = _viewModel;
        }
        private bool PromptUpdateBestellpositionDialog(bestellposition p)
        {
            var dlg = new BestellpositionDialog(p)
            {
                Title = "Bestellposition ändern",
                Width = 500,
            };

            dlg.Buttons = new[] { dlg.OkButton, dlg.CancelButton };
            return(dlg.ShowDialog() ?? false);
        }