/// <summary> /// Execute edit-customer command. Opens customer dialog. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditCommand_Executed(object sender, ExecutedRoutedEventArgs e) { var window = new WindowCustomer(); window.Owner = this; if (window.ShowDialog() == true) { CommandManager.InvalidateRequerySuggested(); } }
/// <summary> /// Executes add-customer command. Opens customer dialog. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddCommand_Executed(object sender, ExecutedRoutedEventArgs e) { var window = new WindowCustomer(); window.Owner = this; window.IsNewCustomer = true; if (window.ShowDialog() == true) { this.CustomerListBox.ScrollIntoView(ViewModel.CurrentCustomer); CommandManager.InvalidateRequerySuggested(); } }
/// <summary> /// Executes add-customer command. Opens customer dialog. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddCommand_Executed(object sender, ExecutedRoutedEventArgs e) { WindowCustomer window = new WindowCustomer(); window.Owner = this; window.IsNewCustomer = true; if (window.ShowDialog() == true) { CommandManager.InvalidateRequerySuggested(); } }