Beispiel #1
0
    public void Populate(PollutantReleasesTimeSeriesFilter filter, MediumFilter.Medium medium)
    {
        SearchFilter = filter;
        var counts = PollutantReleaseTrend.GetFacilityCounts(filter);

        this.ucMediumSelector.PopulateMediumRadioButtonList(filter.MediumFilter, medium, counts);

        // check that any relases are selected
        if (!filter.MediumFilter.ReleasesToAir &&
            !filter.MediumFilter.ReleasesToSoil &&
            !filter.MediumFilter.ReleasesToWater)
        {
            dataFound(false);
            return;
        }
    }
    public void Populate(PollutantReleasesTimeSeriesFilter filter, bool hasConfidentialInformation, MediumFilter.Medium medium)
    {
        SearchFilter = filter;

        LOV_POLLUTANT pollutant = ListOfValues.GetPollutant(filter.PollutantFilter.PollutantID);

        PollutantCode = pollutant != null ? pollutant.Code : null;

        //set parentcode
        ParentCode = null;
        if (pollutant != null && pollutant.ParentID != null)
        {
            LOV_POLLUTANT pollutantGroup = ListOfValues.GetPollutant(pollutant.ParentID.Value);
            ParentCode = pollutantGroup != null ? pollutantGroup.Code : null;
        }

        this.ucMediumSelector.Visible = hasConfidentialInformation;

        if (hasConfidentialInformation)
        {
            var count = PollutantReleaseTrend.GetFacilityCounts(filter);
            this.ucMediumSelector.PopulateMediumRadioButtonList(filter.MediumFilter, medium, count);
        }
    }