当前位置: 首页>>代码示例>>C#>>正文


C# ListController.GetListEntryInfoItems方法代码示例

本文整理汇总了C#中DotNetNuke.Common.Lists.ListController.GetListEntryInfoItems方法的典型用法代码示例。如果您正苦于以下问题:C# ListController.GetListEntryInfoItems方法的具体用法?C# ListController.GetListEntryInfoItems怎么用?C# ListController.GetListEntryInfoItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DotNetNuke.Common.Lists.ListController的用法示例。


在下文中一共展示了ListController.GetListEntryInfoItems方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FoundBannedPassword

        public bool FoundBannedPassword(string inputString)
        {
            const string listName = "BannedPasswords";

            var listController = new ListController();
            PortalSettings settings = PortalController.GetCurrentPortalSettings();

            IEnumerable<ListEntryInfo> listEntryHostInfos = listController.GetListEntryInfoItems(listName, "", Null.NullInteger);
            IEnumerable<ListEntryInfo> listEntryPortalInfos = listController.GetListEntryInfoItems(listName + "-" + settings.PortalId, "", settings.PortalId);
            
            IEnumerable<ListEntryInfo> query2 = listEntryHostInfos.Where(test => test.Text == inputString);
            IEnumerable<ListEntryInfo> query3 = listEntryPortalInfos.Where(test => test.Text == inputString);
            
            if (query2.Any() || query3.Any())
            {
                return true;
            }

            return false;
        }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:20,代码来源:MembershipPasswordController.cs

示例2: OnItemChanged

 void OnItemChanged(object sender, PropertyEditorEventArgs e)
 {
     var regionContainer = ControlUtilities.FindControl<Control>(Parent, "Region", true);
     if (regionContainer != null)
     {
         var regionControl = ControlUtilities.FindFirstDescendent<DNNRegionEditControl>(regionContainer);
         if (regionControl != null)
         {
             var listController = new ListController();
             var countries = listController.GetListEntryInfoItems("Country");
             foreach (var checkCountry in countries)
             {
                 if (checkCountry.Text == e.StringValue)
                 {
                     var attributes = new object[1];
                     attributes[0] = new ListAttribute("Region", "Country." + checkCountry.Value, ListBoundField.Text, ListBoundField.Text);
                     regionControl.CustomAttributes = attributes;
                     break;
                 }
             }
         }
     }
 }
开发者ID:davidsports,项目名称:Dnn.Platform,代码行数:23,代码来源:DNNCountryEditControl.cs

示例3: OnLoad

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Page_Load runs when the control is loaded
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[cnurse]	9/15/2004	Updated to reflect design changes for Help, 508 support
        ///                       and localisation
        /// </history>
        /// -----------------------------------------------------------------------------
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            cmdDisplay.Click += OnDisplayClick;

            try
            {
                //If this is the first visit to the page, bind the role data to the datalist
                if (Page.IsPostBack == false)
                {
                    var strSiteLogStorage = "D";
                    if (!string.IsNullOrEmpty(Host.SiteLogStorage))
                    {
                        strSiteLogStorage = Host.SiteLogStorage;
                    }
                    if (strSiteLogStorage == "F")
                    {
                        UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("FileSystem", LocalResourceFile), ModuleMessage.ModuleMessageType.YellowWarning);
                        cmdDisplay.Visible = false;
                    }
                    else
                    {
                        switch (PortalSettings.SiteLogHistory)
                        {
                            case -1: //unlimited
                                break;
                            case 0:
                                UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("LogDisabled", LocalResourceFile), ModuleMessage.ModuleMessageType.YellowWarning);
                                break;
                            default:
                                UI.Skins.Skin.AddModuleMessage(this,
                                                               string.Format(Localization.GetString("LogHistory", LocalResourceFile), PortalSettings.SiteLogHistory),
                                                               ModuleMessage.ModuleMessageType.YellowWarning);
                                break;
                        }
                        cmdDisplay.Visible = true;
                    }
                    var ctlList = new ListController();
                    var colSiteLogReports = ctlList.GetListEntryInfoItems("Site Log Reports");

                    cboReportType.DataSource = colSiteLogReports;
                    cboReportType.DataBind();
                    cboReportType.SelectedIndex = 0;

                    diStartDate.SelectedDate = DefaultBeginDate;
                    diEndDate.SelectedDate = DefaultEndDate;
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:65,代码来源:SiteLog.ascx.cs

示例4: OnLoad

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Page_Load runs when the control is loaded
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[cnurse]	9/10/2004	Updated to reflect design changes for Help, 508 support
        ///                       and localisation
        /// </history>
        /// -----------------------------------------------------------------------------
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            jQuery.RequestDnnPluginsRegistration();

            cboBillingFrequency.SelectedIndexChanged += OnBillingFrequencyIndexChanged;
            cboTrialFrequency.SelectedIndexChanged += OnTrialFrequencyIndexChanged;
            cmdDelete.Click += OnDeleteClick;
            cmdManage.Click += OnManageClick;
            cmdUpdate.Click += OnUpdateClick;
            txtRSVPCode.TextChanged += OnRsvpCodeChanged;

            try
            {
                if ((Request.QueryString["RoleID"] != null))
                {
                    _roleID = Int32.Parse(Request.QueryString["RoleID"]);
                }
                var objPortalInfo = PortalController.Instance.GetPortal(PortalSettings.PortalId);
                if ((objPortalInfo == null || string.IsNullOrEmpty(objPortalInfo.ProcessorUserId)))
                {
                    //Warn users about fee based roles if we have a Processor Id
                    lblProcessorWarning.Visible = true;
                }
                else
                {
                    divServiceFee.Visible = true;
                    divBillingPeriod.Visible = true;
                    divTrialFee.Visible = true;
                    divTrialPeriod.Visible = true;
                }
                if (Page.IsPostBack == false)
                {
                    cmdCancel.NavigateUrl = Globals.NavigateURL();

                    var ctlList = new ListController();
                    var colFrequencies = ctlList.GetListEntryInfoItems("Frequency", "");

                    cboBillingFrequency.DataSource = colFrequencies;
                    cboBillingFrequency.DataBind();
                    cboBillingFrequency.FindItemByValue("N").Selected = true;

                    cboTrialFrequency.DataSource = colFrequencies;
                    cboTrialFrequency.DataBind();
                    cboTrialFrequency.FindItemByValue("N").Selected = true;

                    securityModeList.Items.Clear();
                    foreach (var enumValue in Enum.GetValues(typeof(SecurityMode)))
                    {
                        var enumName = Enum.GetName(typeof(SecurityMode), enumValue);
                        var enumItem = new ListItem(enumName, ((int)enumValue).ToString(CultureInfo.InvariantCulture));

                        securityModeList.AddItem(enumItem.Text, enumItem.Value);
                    }

                    statusList.Items.Clear();
                    foreach (var enumValue in Enum.GetValues(typeof(RoleStatus)))
                    {
                        var enumName = Enum.GetName(typeof(RoleStatus), enumValue);
                        var enumItem = new ListItem(enumName, ((int)enumValue).ToString(CultureInfo.InvariantCulture));

                        statusList.AddItem(enumItem.Text, enumItem.Value);
                    }

                    BindGroups();

                    ctlIcon.FileFilter = Globals.glbImageFileTypes;
                    if (_roleID != -1)
                    {
                        var role = RoleController.Instance.GetRole(PortalSettings.PortalId, r => r.RoleID == _roleID);
                        if (role != null)
                        {
                            lblRoleName.Visible = role.IsSystemRole;
                            txtRoleName.Visible = !role.IsSystemRole;
                            valRoleName.Enabled = !role.IsSystemRole;

                            lblRoleName.Text = role.RoleName;
                            txtRoleName.Text = role.RoleName;

                            txtDescription.Text = role.Description;
                            if (cboRoleGroups.FindItemByValue(role.RoleGroupID.ToString(CultureInfo.InvariantCulture)) != null)
                            {
                                cboRoleGroups.ClearSelection();
                                cboRoleGroups.FindItemByValue(role.RoleGroupID.ToString(CultureInfo.InvariantCulture)).Selected = true;
                            }
                            if (!String.IsNullOrEmpty(role.BillingFrequency))
                            {
                                if (role.ServiceFee > 0)
//.........这里部分代码省略.........
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:101,代码来源:EditRoles.ascx.cs

示例5: BindPaymentProcessor

        private void BindPaymentProcessor(PortalInfo portal)
        {
            var listController = new ListController();
            currencyCombo.DataSource = listController.GetListEntryInfoItems("Currency", "");
            var currency = portal.Currency;
            if (String.IsNullOrEmpty(currency))
            {
                currency = "USD";
            }
            currencyCombo.DataBind(currency);

            processorCombo.DataSource = listController.GetListEntryInfoItems("Processor", "");
            processorCombo.DataBind();
            processorCombo.InsertItem(0, "<" + Localization.GetString("None_Specified") + ">", "");
            processorCombo.Select(Host.PaymentProcessor, true);

            // use sandbox?
            var usePayPalSandbox = Boolean.Parse(PortalController.GetPortalSetting("paypalsandbox", portal.PortalID, "false"));
            chkPayPalSandboxEnabled.Checked = usePayPalSandbox;
            if (usePayPalSandbox)
            {
                processorLink.NavigateUrl = "https://developer.paypal.com";
            }
            else
            {
                processorLink.NavigateUrl = Globals.AddHTTP(processorCombo.SelectedItem.Value);
            }

            txtUserId.Text = portal.ProcessorUserId;
            txtPassword.Attributes.Add("value", portal.ProcessorPassword);

            // return url after payment or on cancel
            string strPayPalReturnURL = PortalController.GetPortalSetting("paypalsubscriptionreturn", portal.PortalID, Null.NullString);
            txtPayPalReturnURL.Text = strPayPalReturnURL;
            string strPayPalCancelURL = PortalController.GetPortalSetting("paypalsubscriptioncancelreturn", portal.PortalID, Null.NullString);
            txtPayPalCancelURL.Text = strPayPalCancelURL;
        }
开发者ID:hackoose,项目名称:cfi-team05,代码行数:37,代码来源:SiteSettings.ascx.cs

示例6: Remove

        ///-----------------------------------------------------------------------------
        /// <summary>
        /// Removes profanity words in the provided input string.
        /// </summary>
        /// <remarks>
        /// The words to search could be defined in two different places:
        /// 1) In an external file. (NOT IMPLEMENTED)
        /// 2) In System/Site lists.
        /// The name of the System List is "ProfanityFilter". The name of the list in each portal is composed using the following rule:
        /// "ProfanityFilter-" + PortalID.
        /// </remarks>
        /// <param name="inputString">The string to search the words in.</param>
        /// <param name="configType">The type of configuration.</param>
        /// <param name="configSource">The external file to search the words. Ignored when configType is ListController.</param>
        /// <param name="filterScope">When using ListController configType, this parameter indicates which list(s) to use.</param>
        /// <returns>The original text with the profanity words removed.</returns>
        ///-----------------------------------------------------------------------------
        public string Remove(string inputString, ConfigType configType, string configSource, FilterScope filterScope)
        {
            switch (configType)
            {
                case ConfigType.ListController:
                    const RegexOptions options = RegexOptions.IgnoreCase | RegexOptions.Singleline;
                    const string listName = "ProfanityFilter";
            
                    var listController = new ListController();
                
                    PortalSettings settings;

                    IEnumerable<ListEntryInfo> listEntryHostInfos;
                    IEnumerable<ListEntryInfo> listEntryPortalInfos;
            
                    switch (filterScope)
                    {
                        case FilterScope.SystemList:
                            listEntryHostInfos = listController.GetListEntryInfoItems(listName, "", Null.NullInteger);
                            inputString = listEntryHostInfos.Aggregate(inputString, (current, removeItem) => Regex.Replace(current, @"\b" + removeItem.Text + @"\b", string.Empty, options));
                            break;
                        case FilterScope.SystemAndPortalList:
                            settings = PortalController.GetCurrentPortalSettings();
                            listEntryHostInfos = listController.GetListEntryInfoItems(listName, "", Null.NullInteger);
                            listEntryPortalInfos = listController.GetListEntryInfoItems(listName + "-" + settings.PortalId, "", settings.PortalId);
                            inputString = listEntryHostInfos.Aggregate(inputString, (current, removeItem) => Regex.Replace(current, @"\b" + removeItem.Text + @"\b", string.Empty, options));
                            inputString = listEntryPortalInfos.Aggregate(inputString, (current, removeItem) => Regex.Replace(current, @"\b" + removeItem.Text + @"\b", string.Empty, options));
                            break;
                        case FilterScope.PortalList:
                            settings = PortalController.GetCurrentPortalSettings();
                            listEntryPortalInfos = listController.GetListEntryInfoItems(listName + "-" + settings.PortalId, "", settings.PortalId);
                            inputString = listEntryPortalInfos.Aggregate(inputString, (current, removeItem) => Regex.Replace(current, @"\b" + removeItem.Text + @"\b", string.Empty, options));        
                            break;
                    }

                    break;
                case ConfigType.ExternalFile:
                    throw new NotImplementedException();
                default:
                    throw new ArgumentOutOfRangeException("configType");
            }

            return inputString;
        }
开发者ID:hungnt-me,项目名称:Dnn.Platform,代码行数:61,代码来源:PortalSecurity.cs

示例7: OnLoad

		/// <summary>
		/// Page_Load runs when the control is loaded
		/// </summary>
		/// <remarks>
		/// </remarks>
		/// <history>
		/// 	[cnurse]	10/08/2004	Updated to reflect design changes for Help, 508 support
		///                       and localisation
		/// </history>
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad(e);

			cboCountry.SelectedIndexChanged += OnCountryIndexChanged;
			chkCell.CheckedChanged += OnCellCheckChanged;
			chkCity.CheckedChanged += OnCityCheckChanged;
			chkCountry.CheckedChanged += OnCountryCheckChanged;
			chkFax.CheckedChanged += OnFaxCheckChanged;
			chkPostal.CheckedChanged += OnPostalCheckChanged;
			chkRegion.CheckedChanged += OnRegionCheckChanged;
			chkStreet.CheckedChanged += OnStreetCheckChanged;
			chkTelephone.CheckedChanged += OnTelephoneCheckChanged;

			try
			{
				valStreet.ErrorMessage = Localization.GetString("StreetRequired", Localization.GetResourceFile(this, MyFileName));
				valCity.ErrorMessage = Localization.GetString("CityRequired", Localization.GetResourceFile(this, MyFileName));
				valCountry.ErrorMessage = Localization.GetString("CountryRequired", Localization.GetResourceFile(this, MyFileName));
				valPostal.ErrorMessage = Localization.GetString("PostalRequired", Localization.GetResourceFile(this, MyFileName));
				valTelephone.ErrorMessage = Localization.GetString("TelephoneRequired", Localization.GetResourceFile(this, MyFileName));
				valCell.ErrorMessage = Localization.GetString("CellRequired", Localization.GetResourceFile(this, MyFileName));
				valFax.ErrorMessage = Localization.GetString("FaxRequired", Localization.GetResourceFile(this, MyFileName));

				if (!Page.IsPostBack)
				{
					txtStreet.TabIndex = Convert.ToInt16(StartTabIndex);
					txtUnit.TabIndex = Convert.ToInt16(StartTabIndex + 1);
					txtCity.TabIndex = Convert.ToInt16(StartTabIndex + 2);
					cboCountry.TabIndex = Convert.ToInt16(StartTabIndex + 3);
					cboRegion.TabIndex = Convert.ToInt16(StartTabIndex + 4);
					txtRegion.TabIndex = Convert.ToInt16(StartTabIndex + 5);
					txtPostal.TabIndex = Convert.ToInt16(StartTabIndex + 6);
					txtTelephone.TabIndex = Convert.ToInt16(StartTabIndex + 7);
					txtCell.TabIndex = Convert.ToInt16(StartTabIndex + 8);
					txtFax.TabIndex = Convert.ToInt16(StartTabIndex + 9);

					//<tam:note modified to test Lists
					//Dim objRegionalController As New RegionalController
					//cboCountry.DataSource = objRegionalController.GetCountries
					//<this test using method 2: get empty collection then get each entry list on demand & store into cache

					var ctlEntry = new ListController();
					var entryCollection = ctlEntry.GetListEntryInfoItems("Country");

					cboCountry.DataSource = entryCollection;
					cboCountry.DataBind();
					cboCountry.Items.Insert(0, new ListItem("<" + Localization.GetString("Not_Specified", Localization.SharedResourceFile) + ">", ""));

					switch (_countryData.ToLower())
					{
						case "text":
							if (String.IsNullOrEmpty(_country))
							{
								cboCountry.SelectedIndex = 0;
							}
							else
							{
								if (cboCountry.Items.FindByText(_country) != null)
								{
									cboCountry.ClearSelection();
									cboCountry.Items.FindByText(_country).Selected = true;
								}
							}
							break;
						case "value":
							if (cboCountry.Items.FindByValue(_country) != null)
							{
								cboCountry.ClearSelection();
								cboCountry.Items.FindByValue(_country).Selected = true;
							}
							break;
					}
					Localize();

					if (cboRegion.Visible)
					{
						switch (_regionData.ToLower())
						{
							case "text":
								if (String.IsNullOrEmpty(_region))
								{
									cboRegion.SelectedIndex = 0;
								}
								else
								{
									if (cboRegion.Items.FindByText(_region) != null)
									{
										cboRegion.Items.FindByText(_region).Selected = true;
									}
								}
//.........这里部分代码省略.........
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:101,代码来源:Address.cs

示例8: Localize

		/// <summary>
		/// Localize correctly sets up the control for US/Canada/Other Countries
		/// </summary>
		/// <remarks>
		/// </remarks>
		/// <history>
		/// 	[cnurse]	10/08/2004	Updated to reflect design changes for Help, 508 support
		///                       and localisation
		/// </history>
		private void Localize()
		{
			var countryCode = cboCountry.SelectedItem.Value;
			var ctlEntry = new ListController();
			//listKey in format "Country.US:Region"
			var listKey = "Country." + countryCode;
			var entryCollection = ctlEntry.GetListEntryInfoItems("Region", listKey);

			if (entryCollection.Any())
			{
				cboRegion.Visible = true;
				txtRegion.Visible = false;
				{
					cboRegion.Items.Clear();
					cboRegion.DataSource = entryCollection;
					cboRegion.DataBind();
					cboRegion.Items.Insert(0, new ListItem("<" + Localization.GetString("Not_Specified", Localization.SharedResourceFile) + ">", ""));
				}
				if (countryCode.ToLower() == "us")
				{
					valRegion1.Enabled = true;
					valRegion2.Enabled = false;
					valRegion1.ErrorMessage = Localization.GetString("StateRequired", Localization.GetResourceFile(this, MyFileName));
					plRegion.Text = Localization.GetString("plState", Localization.GetResourceFile(this, MyFileName));
					plRegion.HelpText = Localization.GetString("plState.Help", Localization.GetResourceFile(this, MyFileName));
					plPostal.Text = Localization.GetString("plZip", Localization.GetResourceFile(this, MyFileName));
					plPostal.HelpText = Localization.GetString("plZip.Help", Localization.GetResourceFile(this, MyFileName));
				}
				else
				{
					valRegion1.ErrorMessage = Localization.GetString("ProvinceRequired", Localization.GetResourceFile(this, MyFileName));
					plRegion.Text = Localization.GetString("plProvince", Localization.GetResourceFile(this, MyFileName));
					plRegion.HelpText = Localization.GetString("plProvince.Help", Localization.GetResourceFile(this, MyFileName));
					plPostal.Text = Localization.GetString("plPostal", Localization.GetResourceFile(this, MyFileName));
					plPostal.HelpText = Localization.GetString("plPostal.Help", Localization.GetResourceFile(this, MyFileName));
				}
				valRegion1.Enabled = true;
				valRegion2.Enabled = false;
			}
			else
			{
				cboRegion.ClearSelection();
				cboRegion.Visible = false;
				txtRegion.Visible = true;
				valRegion1.Enabled = false;
				valRegion2.Enabled = true;
				valRegion2.ErrorMessage = Localization.GetString("RegionRequired", Localization.GetResourceFile(this, MyFileName));
				plRegion.Text = Localization.GetString("plRegion", Localization.GetResourceFile(this, MyFileName));
				plRegion.HelpText = Localization.GetString("plRegion.Help", Localization.GetResourceFile(this, MyFileName));
				plPostal.Text = Localization.GetString("plPostal", Localization.GetResourceFile(this, MyFileName));
				plPostal.HelpText = Localization.GetString("plPostal.Help", Localization.GetResourceFile(this, MyFileName));
			}

			var reqRegion = PortalController.GetPortalSettingAsBoolean("addressregion", PortalSettings.PortalId, true);
			if (reqRegion)
			{
				valRegion1.Enabled = false;
				valRegion2.Enabled = false;
			}
		}
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:69,代码来源:Address.cs

示例9: GetCountries

 public ActionResult GetCountries()
 {
     var controller = new ListController();
     var list = controller.GetListEntryInfoItems("Country");
     var tempList = list.Select(x => new { x.Text, x.Value }).ToList();
     var noneText = DotNetNuke.Services.Localization.Localization.GetString(
         "None_Specified", DotNetNuke.Services.Localization.Localization.SharedResourceFile);
     tempList.Insert(0, new { Text = "<" + noneText + ">", Value = "" });
     return Json(tempList);
 }
开发者ID:cpaterra,项目名称:dotnetnuke-social-module-templates,代码行数:10,代码来源:SocialEventServiceController.cs

示例10: CreateEditor

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// CreateEditor creates the control collection.
        /// </summary>
        /// <history>
        ///     [cnurse]	05/08/2006	created
        /// </history>
        /// -----------------------------------------------------------------------------
        protected override void CreateEditor()
        {
            CategoryDataField = "PropertyCategory";
            EditorDataField = "DataType";
            NameDataField = "PropertyName";
            RequiredDataField = "Required";
            ValidationExpressionDataField = "ValidationExpression";
            ValueDataField = "PropertyValue";
            VisibleDataField = "Visible";
            VisibilityDataField = "ProfileVisibility";
            LengthDataField = "Length";

            base.CreateEditor();

            foreach (FieldEditorControl editor in Fields)
            {
                //Check whether Field is readonly
                string fieldName = editor.Editor.Name;
                ProfilePropertyDefinitionCollection definitions = editor.DataSource as ProfilePropertyDefinitionCollection;
                ProfilePropertyDefinition definition = definitions[fieldName];

                if (definition != null && definition.ReadOnly && (editor.Editor.EditMode == PropertyEditorMode.Edit))
                {
                    PortalSettings ps = PortalController.GetCurrentPortalSettings();
                    if (!PortalSecurity.IsInRole(ps.AdministratorRoleName))
                    {
                        editor.Editor.EditMode = PropertyEditorMode.View;
                    }
                }

                //We need to wire up the RegionControl to the CountryControl
                if (editor.Editor is DNNRegionEditControl)
                {
                    ListEntryInfo country = null;

                    foreach (FieldEditorControl checkEditor in Fields)
                    {
                        if (checkEditor.Editor is DNNCountryEditControl)
                        {
                            var countryEdit = (DNNCountryEditControl) checkEditor.Editor;
                            var objListController = new ListController();
                            var countries = objListController.GetListEntryInfoItems("Country");
                            foreach (ListEntryInfo checkCountry in countries)
                            {
                                if (checkCountry.Text == Convert.ToString(countryEdit.Value))
                                {
                                    country = checkCountry;
                                    break;
                                }
                            }
                        }
                    }
					
                    //Create a ListAttribute for the Region
                    string countryKey;
                    if (country != null)
                    {
                        countryKey = "Country." + country.Value;
                    }
                    else
                    {
                        countryKey = "Country.Unknown";
                    }
                    var attributes = new object[1];
                    attributes[0] = new ListAttribute("Region", countryKey, ListBoundField.Text, ListBoundField.Text);
                    editor.Editor.CustomAttributes = attributes;
                }
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:77,代码来源:ProfileEditorControl.cs

示例11: ParseRegionSaveSetting

        private string ParseRegionSaveSetting()
        {
            var ctlList = new ListController();
            var value = string.Empty;

            var listItem =
                from i in ctlList.GetListEntryInfoItems("Region", string.Concat("Country.", cboCountry.SelectedValue), PortalId)
                select i;

            value = listItem.Any() ? cboRegion.SelectedValue : txtRegion.Text.Trim();

            return value;
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:13,代码来源:View.ascx.cs

示例12: ParseRegionLoadSetting

        private void ParseRegionLoadSetting()
        {
            if (string.IsNullOrEmpty(GetSetting(FeatureController.KEY_REGION)) == false)
            {
                LoadRegions(cboCountry.SelectedValue);

                var ctlList = new ListController();
                var value = GetSetting(FeatureController.KEY_REGION);

                var listItem =
                    from i in ctlList.GetListEntryInfoItems("Region", string.Concat("Country.", GetSetting(FeatureController.KEY_COUNTRY)), PortalId)
                    select i;

                if (listItem.Any())
                {
                    cboRegion.Items.FindByValue(value).Selected = true;
                    ToggleRegion(RegionState.DropDownList);
                }
                else
                {
                    txtRegion.Text = value;
                    ToggleRegion(RegionState.TextBox);
                }
            }
            else
            {
                // default state
                ToggleRegion(RegionState.TextBox);
            }
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:30,代码来源:View.ascx.cs

示例13: LoadRegions

        private void LoadRegions(string CountryId)
        {
            var ctlList = new ListController();
            IEnumerable<ListEntryInfo> regions = null;

            regions = ctlList.GetListEntryInfoItems("Region", string.Concat("Country.", CountryId), PortalId);

            if (regions != null && regions.Any())
            {
                cboRegion.DataSource = regions;
                cboRegion.DataTextField = "Text";
                cboRegion.DataValueField = "Value";
                cboRegion.DataBind();

                cboRegion.Items.Insert(0, new ListItem("---"));

                ToggleRegion(RegionState.DropDownList);
            }
            else
            {
                ToggleRegion(RegionState.TextBox);
            }
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:23,代码来源:View.ascx.cs

示例14: LoadCountries

        private void LoadCountries()
        {
            var ctlList = new ListController();
            cboCountry.DataSource = ctlList.GetListEntryInfoItems("Country", string.Empty, PortalId);
            cboCountry.DataTextField = "Text";
            cboCountry.DataValueField = "Value";
            cboCountry.DataBind();

            cboCountry.Items.Insert(0,new ListItem("---"));
        }
开发者ID:RichardHowells,项目名称:dnnextensions,代码行数:10,代码来源:View.ascx.cs

示例15: ListsTextLocalized

 private IEnumerable<ListEntryInfo> ListsTextLocalized(string listname)
 {
     ListController listcontroller = new ListController();
     IEnumerable<ListEntryInfo> listEntryInfoCol = null;
     listEntryInfoCol = listcontroller.GetListEntryInfoItems(listname);
     foreach (ListEntryInfo li in listEntryInfoCol)
     {
         li.Text = Localization.GetString(li.Value, "~/App_GlobalResources/List_" + listname + "." + (Page as DotNetNuke.Framework.PageBase).PageCulture.Name + ".resx");
     }
     return listEntryInfoCol;
 }
开发者ID:asaki0510,项目名称:AlarmRuleSet,代码行数:11,代码来源:List.ascx.cs


注:本文中的DotNetNuke.Common.Lists.ListController.GetListEntryInfoItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。