private void registerMessenger() { //Send Selected Row For Edit Messenger.Default.Register <LanguageModel>(this, "MyNavigationService",// doNavigate); (fe) => { if (fe == null) { fe = new LanguageModel(); } var addWindow = new NewLanguage(fe); addWindow.ShowDialog(); }); //Get Search String From Search Form Messenger.Default.Register <string>(this, "MySearchNavigationService",// getmsg); (message) => { if (!string.IsNullOrEmpty(message)) { // Name.Text = message; } }); //Get Datas After Insert Messenger.Default.Register <ObservableCollection <LanguageModel> >(this, "InsertedService",// getmsg); (message) => { //languageData.RefreshProducts(); languageData.AllLanguages = message; }); }
private void New_Click(object sender, RoutedEventArgs e) { var new_win = new NewLanguage(new LanguageModel()); new_win.Show(); this.Close(); }
private void Button_Click(object sender, RoutedEventArgs e) { Button b = (sender) as Button; if (b.CommandParameter != null) { LanguageModel ppp = language.GetLanguagesById(int.Parse(b.CommandParameter.ToString())); var addWindow = new NewLanguage(ppp); //addWindow.ShowDialog(); addWindow.Show(); this.Close(); } }