/// <summary> /// Initializes this control. /// </summary> protected void InitializeControl() { if (Mapping != null && Mapping.HasItems) { UserMappingItemRepeater.DataSource = Mapping.GetFromScope(String.Empty).Items; UserMappingItemRepeater.DataBind(); UserSettingsMappingItemRepeater.DataSource = Mapping.GetFromScope("UserSettings").Items; UserSettingsMappingItemRepeater.DataBind(); ContainerControl.Visible = true; } else { MessageControl.InnerText = GetString("fb.emptymapping"); MessageControl.Visible = true; } if (!Enabled) { Attributes.Add("class", "gray"); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); ScriptHelper.RegisterWOpenerScript(Page); ScriptHelper.RegisterJQuery(Page); PageTitle.TitleText = GetString("fb.mapping.editor.title"); ShowWarning(GetString("fb.mapping.editor.introduction")); ShowInformation(GetString("fb.mapping.editor.instruction")); UserMappingItemRepeater.ItemDataBound += UserMappingItemRepeater_ItemDataBound; UserSettingsMappingItemRepeater.ItemDataBound += UserSettingsMappingItemRepeater_ItemDataBound; Save += (s, ea) => Confirm(); try { RestoreParameters(); UserMappingItemRepeater.DataSource = UserFormInfo.GetFields(true, true); UserMappingItemRepeater.DataBind(); UserSettingsMappingItemRepeater.DataSource = UserSettingsFormInfo.GetFields(true, true); UserSettingsMappingItemRepeater.DataBind(); } catch (Exception exception) { HandleError(exception); } }