Exemplo n.º 1
0
        private void HandleCMSRegionDisplayLogic()
        {
            plhCMSRegion.Visible = true;
            if (this.AccountInfo.Scope == Scope.CMSRegional)
            {
                PopulateCMSRegionsForUser();
            }
            else
            {
                var CMSRegions = LookupBLL.GetCMSRegions();
                if (CMSRegions != null)
                {
                    IEnumerable <KeyValuePair <int, string> > OrderedCMSRegions = CMSRegions.OrderBy(p => p.Value);
                    ddlCMSRegion.DataSource = OrderedCMSRegions;
                }
                else
                {
                    ddlCMSRegion.DataSource = CMSRegions;
                }

                ddlCMSRegion.DataTextField  = "Value";
                ddlCMSRegion.DataValueField = "Key";
                ddlCMSRegion.DataBind();
            }

            if (ddlCMSRegion.Items.Count > 1)
            {
                ddlCMSRegion.Items.Insert(0, new ListItem("Select CMS Region", "0"));
            }
            else
            {
                ddlCMSRegion.Items.Add(new ListItem("No CMS Regions available", "0"));
            }
        }
Exemplo n.º 2
0
 private void HandleCMSRegionDisplayLogic()
 {
     plhCMSRegion.Visible        = true;
     ddlCMSRegion.DataSource     = LookupBLL.GetCMSRegions();
     ddlCMSRegion.DataTextField  = "Value";
     ddlCMSRegion.DataValueField = "Key";
     ddlCMSRegion.DataBind();
     ddlCMSRegion.Items.Insert(0, new ListItem("Select a CMS Region", "0"));
 }
Exemplo n.º 3
0
        private void HandleCMSRegionDisplayLogic()
        {
            plhCMSRegion.Visible = true;
            if (this.AccountInfo.Scope == Scope.CMSRegional)
            {
                PopulateCMSRegionsForUser();
            }
            else
            {
                ddlCMSRegion.DataSource     = LookupBLL.GetCMSRegions();
                ddlCMSRegion.DataTextField  = "Value";
                ddlCMSRegion.DataValueField = "Key";
                ddlCMSRegion.DataBind();
            }

            if (ddlCMSRegion.Items.Count > 1)
            {
                ddlCMSRegion.Items.Insert(0, new ListItem("Select CMS Region", "0"));
            }
        }