private void messengerCallback(EditionPopupMessage <FootballClub> obj) { switch (obj.Notification) { case "Insert": InstanceInsert(obj); break; case "Update": InstanceUpdate(obj); break; } }
private static void InstanceInsert(EditionPopupMessage <FootballClub> obj) { var viewModel = new InsertViewModel(obj.Model, obj.Repository) { AceptCallBack = obj.AceptMessageCallBack, CancelCallBack = obj.CancelMessageCallBack }; var view = new InsertView { DataContext = viewModel }; view.ShowDialog(); }