Ejemplo n.º 1
0
        private void registerMessenger()
        {
            //Send Selected Row For Edit
            Messenger.Default.Register <UserModel>(this, "MyNavigationService",// doNavigate);
                                                   (fe) =>
            {
                if (fe == null)
                {
                    fe = new UserModel();
                }
                var addWindow = new NewMembership(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 <UserModel> >(this, "InsertedService",// getmsg);
                                                                           (message) =>
            {
                userData.AllUser = message;
            });
        }
Ejemplo n.º 2
0
        private void New_Click(object sender, RoutedEventArgs e)
        {
            var new_win = new NewMembership(new UserModel());

            new_win.ShowDialog();
        }