public void LoadSavedFilterView(SavedFilter savedFilter)
        {
            TOBEntityEnum panelCollectionType = (TOBEntityEnum)savedFilter.PanelTypeId;
            _accountInfo.SelectPanel();

            string savedfilterPanelKey = "SAVEDFILTERPANEL" + savedFilter.Id;
            UserAllTweets savedFilterView;

            if (_panelViewDict.ContainsKey(savedfilterPanelKey))
            {
                savedFilterView = _panelViewDict[savedfilterPanelKey];
            }
            else
            {
                savedFilterView = new UserAllTweets();
             //   savedFilterView.DataTemplate = savedFilterView.FindResource("TweetsControlsDataTemplate") as DataTemplate;

                SetMessageObjectPanelCollection(savedFilterView, panelCollectionType, savedFilter.AccountFilterMappings.Select(a => (int)a.AccountId).ToList());

                _panelViewDict.Add(savedfilterPanelKey, savedFilterView);
            }

            _currentTweetsView = savedFilterView;
            _mainWindow.frmTOBMain.Content = savedFilterView;
            _userProfileView.Visibility = Visibility.Collapsed;
            _currentTweetsView.SetFilterBoxText(savedFilter.FilterText);
            _tweetSender.txtSearchBox.Text = "";
        }
Example #2
0
		private void detach_SavedFilters(SavedFilter entity)
		{
			this.SendPropertyChanging();
			entity.PanelType = null;
		}
 public void DeleteSavedFilter(SavedFilter saveFilter)
 {
     MessageBoxResult messageResult;
     messageResult = MessageBox.Show("Are you sure you want to delete this saved filter?", "Delete Confirmation", MessageBoxButton.YesNo);
     if (messageResult == MessageBoxResult.Yes)
     {
         SavedFilter savedFilter = LocalSavedFilterBO.Get(filter => filter.Id == saveFilter.Id);
         if (savedFilter != null)
         {
             AccountFilterMappingBO accountMappingBO = new AccountFilterMappingBO();
             List<AccountFilterMapping> accountMappingList = accountMappingBO.GetAll().Where(map => map.FilterId == saveFilter.Id).ToList();
             if (accountMappingList != null)
             {
                 accountMappingBO.DeleteAll(accountMappingList);
                 accountMappingBO.SaveChanges();
             }
             LocalSavedFilterBO.Delete(savedFilter);
             LocalSavedFilterBO.SaveChanges();
         }
     }
     _currentTweetsView.txtFilter.Text = "";
     _accountInfo.BindSavedFilters();
     Panel info = null; //Need to change this
     LoadHomeView(info);
 }
Example #4
0
partial         void UpdateSavedFilter(SavedFilter instance);
Example #5
0
partial         void InsertSavedFilter(SavedFilter instance);
Example #6
0
partial         void DeleteSavedFilter(SavedFilter instance);
Example #7
0
 public void AddFilter(SavedFilter savedFilter)
 {
     if (savedFilter != null)
     {
         _savedFilerList.Add(savedFilter);
         savedFilter.CommandFilter = TOBCommands.FilterCommand;
         savedFilter.CommandDeleteFilter = TOBCommands.DeleteFilterCommand;
     }
 }