public SearchFilterControlModel(CommonUtils.TabId tabId, bool filterIsOn)
        {
            CompositionInitializer.SatisfyImports(this);

            mTabId = tabId;
            FilterIsOn = filterIsOn;
            OpenEditSearchFiltersDialogCommand = new DelegateCommand<object>(OpenDialogHandler, CanViewHandler);

            var model = new EditSearchFiltersModel(tabId);
            model.DataLoaded += searchFilterList => { BuildContextMenuItems(model.SearchFilterLists); };
        }
        public EditSearchFiltersModel(CommonUtils.TabId tabId)
        {
            CompositionInitializer.SatisfyImports(this);

            mTabId = tabId;
            mUserId = CMS.User.Id;

            SelectCommand = new DelegateCommand<object>(SelectCommandHandler, CanExecuteCommand);

            DeleteCommand = new DelegateCommand<object>(DeleteCommandHandler, CanExecuteCommand);
            AddCommand = new DelegateCommand<object>(AddCommandHandler, CanExecuteCommand);
            EditCommand = new DelegateCommand<object>(EditCommandHandler, CanExecuteCommand);

            LoadCommand = new DelegateCommand<object>(LoadCommandHandler, CanExecuteCommand);
            SaveCommand = new DelegateCommand<object>(SaveCommandHandler, CanExecuteCommand);
            CancelCommand = new DelegateCommand<object>(CancelCommandHandler, CanExecuteCommand);

            InitialiseLists();
        }