i want to control below process. i want to save a customer with order.

1) Write customer’s Name,Surname,Phone
2) Select Product
3)press Insert
İ can do that above with MVVM!
but i can not :
How to show messagebox after InsertCommand? and How to activate wpf tab control’s first tab, also show in Customer Order in grid only selected product?

Can think of two ways that I’ve done that off the top of my head.
One way is to have a control on your form which contains your message. Generally it’s visibility is collapsed, but as part of your save process you set the property that its visibility is bound to to be visible. The control becomes visible until you click the ok button, at which point it be becomes invisible.
This is a quick easy way, for a small solution, but if you have a bigger solution then you’ll want dialogs more often – so you’ll want a more extensible solution – so you could inject a dialog service into your view models, or use messaging to get a dialog control on your window to display.
So for example in the project I’m currently working on we’re using mvvm light and have one main window with child windows. The main window registers for the dialog message, and when the child windows publish that message it displays the dialog. so eg:
In the form you want to display the message you can then publish a DialogMessage and the window that has subsrcibed to that message will display it. We’re currently using a ServiceLocator to handle the finding our message box service, although depending on your project it may be preferable to inject this.
Then your messageBoxDisplayer will then Show the messagebox by publishing the message:
Obviously there’s more code needed than this to implement the messaging service, the service locator etc, but this should give you the general gist of some possible ways of doing it. If you’re already using a framework then chances are you’ll have much of this in place, if not possibly worth looking into.
Check out this discussion on mvvmlight dialogmessage and dialogboxes:
http://mvvmlight.codeplex.com/discussions/209338?ProjectName=mvvmlight
edit:
Just noticed second part of question.
To activate the second tab, depends how you’ve created it. TabControl is essentially an items control so you can bind its item source to a collection of viewmodels, and then bind the SelectedItem to an ActiveTabViewModel property on your windows viewmodel (Mode=TwoWay), then you can set the ActiveTabViewModel to be the one you want and it should change. Alternatively I suppose you could probably bind the SelectedIndex (although I haven’t tried it this way myself yet) eg:
and on the view model have the property:
public int SelectedTabIndex
{
get
{
return _selectedTabIndex;
}
assumes you have a RaisePropertyChanged event that handles the NotifyPropertyChanged – if you’re using mvvmlight this should be there.
Then in your save method set SelectedTabIndex = x and it should hopefully change tothe correct tab.