Esempio n. 1
0
    private void toggleTimeseries(ListViewCommandEventArgs e, int rowindex)
    {
        ucTsPollutantReleasesSheet control = (ucTsPollutantReleasesSheet)this.lvPollutantReleasesArea.Items[rowindex].FindControl("ucTsPollutantReleasesSheet");

        closeAllSubSheets(); // only allow 1 sheet open

        control.Visible = !control.Visible;
        Control div = this.lvPollutantReleasesArea.Items[rowindex].FindControl("subsheet");

        div.Visible = !div.Visible;

        if (control.Visible)
        {
            // create search filter and change area filter
            PollutantReleasesTimeSeriesFilter filter = FilterConverter.ConvertToPollutantReleasesTimeSeriesFilter(SearchFilter);
            filter.AreaFilter = getAreaFilter(e);
            control.Populate(filter, SearchFilter.YearFilter.Year);
        }
    }