예제 #1
0
파일: MainAcc.xaml.cs 프로젝트: TataDvd/Git
        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();
                }
            }
        }
예제 #2
0
파일: MainAcc.xaml.cs 프로젝트: TataDvd/Git
        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;
            }
        }