Exemplo n.º 1
0
        private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            SetUpMapAnaliticAccToLookup ds = new SetUpMapAnaliticAccToLookup(vm.CurrentSelectedAnaliticalField);

            ds.ShowDialog();
            if (ds.DialogResult.HasValue && ds.DialogResult.Value)
            {
                var setUpMapAnaliticAccToLookupViewModel = ds.DataContext as SetUpMapAnaliticAccToLookupViewModel;
                if (setUpMapAnaliticAccToLookupViewModel != null)
                {
                    vm.CurrentSelectedAnaliticalField = setUpMapAnaliticAccToLookupViewModel.WorkedItem;
                    Mapper.Items.Refresh();
                }
            }
        }
Exemplo n.º 2
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            SetUpMapAnaliticAccToLookup ds = new SetUpMapAnaliticAccToLookup(vm.CurrentSelectedAnaliticalField, vm.CurrentAccount);
            string OldLookup = vm.CurrentSelectedAnaliticalField.NameLookUp;

            ds.ShowDialog();
            if (ds.DialogResult.HasValue && ds.DialogResult.Value)
            {
                var setUpMapAnaliticAccToLookupViewModel = ds.DataContext as SetUpMapAnaliticAccToLookupViewModel;
                if (setUpMapAnaliticAccToLookupViewModel != null)
                {
                    vm.CurrentSelectedAnaliticalField = setUpMapAnaliticAccToLookupViewModel.WorkedItem;
                    Mapper.Items.Refresh();
                }
            }
            else
            {
                vm.CurrentSelectedAnaliticalField.NameLookUp = OldLookup;
            }
        }