示例#1
0
        //creates header for Pollutant group and adds to dictionary
        protected static void addPollutantGroup(Dictionary <string, string> header, int pollutantGroupId)
        {
            string key   = Resources.GetGlobal("Common", "PollutantGroup");
            string value = LOVResources.PollutantGroupName(pollutantGroupId);

            header.Add(key, value);
        }
示例#2
0
        //creates header for Pollutant filter and adds to dictionary
        protected static void addPollutant(Dictionary <string, string> header, PollutantFilter filter)
        {
            if (filter != null)
            {
                string key   = Resources.GetGlobal("Common", "Pollutant");
                string value = string.Empty;

                PollutantFilter.Level level = filter.SearchLevel();

                if (level == PollutantFilter.Level.All)
                {
                    value = Resources.GetGlobal("Common", "AllPollutants");
                }
                else if (level == PollutantFilter.Level.PollutantGroup)
                {
                    value = LOVResources.PollutantGroupName(ListOfValues.GetPollutant(filter.PollutantGroupID).Code);
                }
                else
                {
                    value = LOVResources.PollutantName(ListOfValues.GetPollutant(filter.PollutantID).Code);
                }

                header.Add(key, value);
            }
        }
    protected string GetName(object obj)
    {
        PollutantReleases.ReleasesTreeListRow row = (PollutantReleases.ReleasesTreeListRow)obj;

        if (row.HasChildren) //this is a pollutant group
        {
            return(LOVResources.PollutantGroupName(row.Code) + " " + GetGroupCount(row));
        }
        else
        {
            return(LOVResources.PollutantName(row.Code));
        }
    }
示例#4
0
    private void populatePollutantGroups()
    {
        this.cbPollutantGroup.Items.Clear();

        IEnumerable <LOV_POLLUTANT> groups = QueryLayer.ListOfValues.PollutantGroups();

        //Value of areas are prefixed to separate them from countries
        foreach (LOV_POLLUTANT g in groups)
        {
            this.cbPollutantGroup.Items.Add(new ListItem(LOVResources.PollutantGroupName(g.Code), g.LOV_PollutantID.ToString()));
        }

        this.cbPollutantGroup.SelectedIndex = 0;
    }
    private void populatePollutantGroups()
    {
        this.cbPollutantGroup.Items.Clear();
        int startYear = 2001;

        IEnumerable <LOV_POLLUTANT> groups = QueryLayer.ListOfValues.PollutantGroups().Where(x => x.StartYear >= startYear);

        if (includeAll)
        {
            this.cbPollutantGroup.Items.Add(new ListItem(Resources.GetGlobal("Common", "AllPollutantGroups"), PollutantFilter.AllGroupsID.ToString()));
        }

        //Value of areas are prefixed to separate them from countries
        foreach (LOV_POLLUTANT g in groups)
        {
            this.cbPollutantGroup.Items.Add(new ListItem(LOVResources.PollutantGroupName(g.Code), g.LOV_PollutantID.ToString()));
        }

        setSelectedPollutantGroup();

        populatePollutants();
    }
示例#6
0
 protected string GetPTPollutantGroup(object obj)
 {
     IndustrialActivity.ConfidentialTransfersRow row = (IndustrialActivity.ConfidentialTransfersRow)obj;
     return(LOVResources.PollutantGroupName(row.PollutantCode));
 }
示例#7
0
    protected void lvColHeaders_OnDataBinding(object sender, EventArgs e)
    {
        Label lbActivity = ((ListView)sender).FindControl("lbActivity") as Label;

        int           pollutantGroupID = getPollutantGroupID();
        LOV_POLLUTANT group            = ListOfValues.GetPollutant(pollutantGroupID);

        if (lbActivity != null && group != null)
        {
            lbActivity.Text = String.Format(Resources.GetGlobal("AreaOverview", "ReleasesOf"), LOVResources.PollutantGroupName(group.Code));
        }
    }