Beispiel #1
0
        public SaveRemoteCommand(RemoteClientEditViewModel viewModel, Guid?key)
            : base(typeof(Overview))
        {
            Ensure.NotNull(viewModel, "viewModel");
            this.viewModel = viewModel;
            this.key       = key;

            viewModel.PropertyChanged += OnPropertyChanged;
        }
Beispiel #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            Guid?key = (Guid?)e.Parameter;

            if (key == null)
            {
                DataContext = new RemoteClientEditViewModel();
                IsNewRecord = true;
            }
            else
            {
                DataContext = new RemoteClientEditViewModel(key.Value);
                IsNewRecord = false;
            }
        }