示例#1
0
        /// <summary>
        ///     Filters the update.
        /// </summary>
        private void FilterUpdate( )
        {
            var filteredItems = new List <PlatformHistoryItem>( );

            foreach (var item in HistoryItems)
            {
                var tenantFilterObject = TenantFilters.FirstOrDefault(f => f.Value.ToString( ) == item.TenantName);

                if (tenantFilterObject == null || tenantFilterObject.IsFiltered)
                {
                    filteredItems.Add(item);
                }
            }

            FilteredHistoryItems = filteredItems;
        }
示例#2
0
        private void FilterUpdate( )
        {
            List <HistoricalTransaction> filteredTransactions = new List <HistoricalTransaction>( );

            foreach (var transaction in Transactions)
            {
                FilterObject userFilterObject    = UserFilters.FirstOrDefault(f => f.Value.ToString( ) == transaction.ActiveUserName.ToString( ));
                FilterObject tenantFilterObject  = TenantFilters.FirstOrDefault(f => f.Value.ToString( ) == transaction.TenantName.ToString( ));
                FilterObject spidFilterObject    = SpidFilters.FirstOrDefault(f => f.Value.ToString( ) == transaction.Spid.ToString( ));
                FilterObject programFilterObject = ProgramFilters.FirstOrDefault(f => f.Value.ToString( ) == transaction.ProgramName);
                FilterObject loginFilterObject   = LoginFilters.FirstOrDefault(f => f.Value.ToString( ) == transaction.LoginName);

                if ((userFilterObject == null || userFilterObject.IsFiltered) && (tenantFilterObject == null || tenantFilterObject.IsFiltered) && (spidFilterObject == null || spidFilterObject.IsFiltered) && (programFilterObject == null || programFilterObject.IsFiltered) && (loginFilterObject == null || loginFilterObject.IsFiltered))
                {
                    filteredTransactions.Add(transaction);
                }
            }

            FilteredTransactions = filteredTransactions;
        }
示例#3
0
        /// <summary>
        ///     Filters the update.
        /// </summary>
        private void FilterUpdate( )
        {
            List <TenantApp> filteredApps = new List <TenantApp>( );

            foreach (var app in TenantApps)
            {
                FilterObject tenantFilterObject       = TenantFilters.FirstOrDefault(f => f.Value.ToString( ) == app.TenantName);
                FilterObject solutionFilterObject     = SolutionFilters.FirstOrDefault(f => f.Value.ToString( ) == app.Solution);
                FilterObject versionFilterObject      = VersionFilters.FirstOrDefault(f => f.Value.ToString( ) == app.SolutionVersion);
                FilterObject publisherFilterObject    = PublisherFilters.FirstOrDefault(f => f.Value.ToString( ) == app.Publisher);
                FilterObject publisherUrlFilterObject = PublisherUrlFilters.FirstOrDefault(f => f.Value.ToString( ) == app.PublisherUrl);
                FilterObject protectedFilterObject    = ProtectedFilters.FirstOrDefault(f => ( bool )f.Value == app.IsProtected);

                if ((tenantFilterObject == null || tenantFilterObject.IsFiltered) && (solutionFilterObject == null || solutionFilterObject.IsFiltered) && (versionFilterObject == null || versionFilterObject.IsFiltered) && (publisherFilterObject == null || publisherFilterObject.IsFiltered) && (publisherUrlFilterObject == null || publisherUrlFilterObject.IsFiltered) && (protectedFilterObject == null || protectedFilterObject.IsFiltered))
                {
                    filteredApps.Add(app);
                }
            }

            FilteredTenantApps = filteredApps;
        }