コード例 #1
0
        // ----------------------------------------------------------------------------------
        // WasteTransfers
        // ----------------------------------------------------------------------------------
        #region WasteTransfers

        /// <summary>
        /// get waste transfers
        /// </summary>
        public static IEnumerable <Summary.WasteSummaryTreeListRow> GetWasteTransfers(IndustrialActivitySearchFilter filter)
        {
            // Result is the same as for wastetransfer, without the filtering on wastetype
            WasteTransferSearchFilter filterWaste = FilterConverter.ConvertToWasteTransferSearchFilter(filter);
            IEnumerable <Summary.WasteSummaryTreeListRow> wastes = WasteTransfers.GetWasteTransfers(filterWaste);

            filter.Count = filterWaste.Count;

            return(wastes);
        }
コード例 #2
0
    /// <summary>
    /// invoke pollutant search search for this row
    /// </summary>
    protected void onWasteSearchClick(object sender, CommandEventArgs e)
    {
        string code = e.CommandArgument.ToString();

        // create pollutant search filter
        WasteTransferSearchFilter filter = FilterConverter.ConvertToWasteTransferSearchFilter(SearchFilter);

        // create waste type filter according to command argument
        filter.WasteTypeFilter = LinkSearchBuilder.GetWasteTypeFilter(code);

        // go to waste search
        LinkSearchRedirecter.ToWasteTransfers(Response, filter);
    }
コード例 #3
0
        // ---------------------------------------------------------------------------------------------------
        // Count method
        // ---------------------------------------------------------------------------------------------------
        #region count
        /// <summary>
        /// Returns the number of facilities corresponding to the filter, per waste type
        /// Overloaded with TimeSeries filter for ease of use.
        /// </summary>
        public static QueryLayer.WasteTransfers.FacilityCountObject GetCountFacilities(WasteTransferTimeSeriesFilter tsFilter)
        {
            // conversion removes all year span information
            var filter = FilterConverter.ConvertToWasteTransferSearchFilter(tsFilter);

            ParameterExpression param = Expression.Parameter(typeof(WASTETRANSFER_TREATMENT), "s");
            Expression          exp   = LinqExpressionBuilder.GetLinqExpressionWasteTransferSearch(filter, param, true);

            // Exclude EPER reporting years
            Expression prop    = Expression.Property(param, "ReportingYear");
            Expression val     = Expression.Constant(2007);
            Expression yearExp = Expression.GreaterThanOrEqual(prop, val);

            exp = Expression.AndAlso(yearExp, exp);

            Expression <Func <WASTETRANSFER_TREATMENT, bool> > lambda = Expression.Lambda <Func <WASTETRANSFER_TREATMENT, bool> >(exp, param);

            return(WasteTransfers.GetFacilityCounts(lambda));
        }
コード例 #4
0
        /// <summary>
        /// return true if confidentiality might effect waste result
        /// </summary>
        public static bool IsWasteAffectedByConfidentiality(IndustrialActivitySearchFilter filter)
        {
            WasteTransferSearchFilter filterWaste = FilterConverter.ConvertToWasteTransferSearchFilter(filter);

            return(WasteTransfers.IsAffectedByConfidentiality(filterWaste));
        }
コード例 #5
0
        /// <summary>
        /// Waste reason facilities wrapper
        /// </summary>
        public static IEnumerable <WasteTransfers.WasteConfidentialReason> GetWasteConfidentialReason(IndustrialActivitySearchFilter filter)
        {
            WasteTransferSearchFilter filterWaste = FilterConverter.ConvertToWasteTransferSearchFilter(filter);

            return(WasteTransfers.GetWasteConfidentialReason(filterWaste));
        }
コード例 #6
0
        /// <summary>
        /// Waste confidential facilities wrapper
        /// </summary>
        public static List <WasteTransfers.FacilityCountObject> GetWasteConfidentialFacilities(IndustrialActivitySearchFilter filter)
        {
            WasteTransferSearchFilter filterWaste = FilterConverter.ConvertToWasteTransferSearchFilter(filter);

            return(WasteTransfers.GetCountConfidentialFacilities(filterWaste));
        }