Example #1
0
        public MainNavigationViewModel(IEventAggregator eventAggregator
                                       , IMessageDialogService messageDialogService
                                       , SearchEngineViewModel searchEngineViewModel
                                       , MainViewModel mainViewModel)
        {
            _eventAggregator       = eventAggregator;
            _mainViewModel         = mainViewModel;
            _searchEngineViewModel = searchEngineViewModel;
            _messageDialogService  = messageDialogService;
            cancelTokenSource      = new CancellationTokenSource();
            token = cancelTokenSource.Token;
            NewDestinationCommand = new Prism.Commands.DelegateCommand(OnNewDestinationExecute);

            NewDestinationCommandX = new Prism.Commands.DelegateCommand(OnNewDestinationExecuteX);

            OpenAdminPanelCommand = new Prism.Commands.DelegateCommand(OnOpenAdminPanelExecute);
            CompareFileCommand    = new Prism.Commands.DelegateCommand(OnCompareFileExecute);
            GoToMainPageCommand   = new Prism.Commands.DelegateCommand(OnGoToMainPageExecute);
            SearchCommand         = new Prism.Commands.DelegateCommand(OnSearchExecute);
            //PrincipalPermission principalPerm = new PrincipalPermission(null, "Administrator");
            //CustomPrincipal wp = Thread.CurrentPrincipal as CustomPrincipal;
            //if (wp != null)
            //    if (wp.IsInRole(@"administrator") == true)
            //    {
            //        //  messagebox.show("accessed");

            //    }
            //        Debug.WriteLine("accessed");
            // MessageBox.Show(principalPerm.ToString());

            SearchCommand     = new Prism.Commands.DelegateCommand(OnSearchExecute);
            ShowHiddenCommand = new Prism.Commands.DelegateCommand(OnShowHiddenExecute);
        }
Example #2
0
 public IActionResult GetAll([FromQuery] SearchEngineViewModel query)
 {
     try
     {
         var dataDto = _mapper.Map <SearchEngineDTO>(query);
         return(new OkObjectResult(_dealerAppConfigService.GetAll(dataDto)));
     }
     catch (Exception ex)
     {
         return(new BadRequestObjectResult(ex.Message));
     }
 }
Example #3
0
 public SearchPage(SearchEngineViewModel searchEngineViewModel)
 {
     InitializeComponent();
     _searchEngineViewModel = searchEngineViewModel;
     DataContext            = _searchEngineViewModel;
 }