示例#1
0
        /// <summary>
        /// DataBind binds the data to the controls
        /// </summary>
        /// <history>
        ///     [cnurse]	03/01/2006  Created
        /// </history>
        public override void DataBind()
        {
            if (IsAdmin)
            {
                lblTitle.Text = string.Format(Localization.GetString("ProfileTitle.Text", LocalResourceFile), User.Username, User.UserID);
            }
            else
            {
                trTitle.Visible = false;
            }

            //Before we bind the Profile to the editor we need to "update" the visible data
            ProfilePropertyDefinitionCollection properties = UserProfile.ProfileProperties;

            foreach (ProfilePropertyDefinition profProperty in properties)
            {
                if (IsAdmin)
                {
                    profProperty.Visible = true;
                }
            }

            ProfileProperties.ShowVisibility = ShowVisibility;
            ProfileProperties.DataSource     = UserProfile.ProfileProperties;
            ProfileProperties.DataBind();
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// DataBind binds the data to the controls
        /// </summary>
        /// <history>
        ///     [cnurse]	03/01/2006  Created
        /// </history>
        /// -----------------------------------------------------------------------------
        public override void DataBind()
        {
            if (IsAdmin)
            {
                lblTitle.Text = string.Format(Localization.GetString("ProfileTitle.Text", LocalResourceFile), User.Username, User.UserID);
            }
            else if (IsRegister)
            {
                lblTitle.Text = Localization.GetString("RequireProfile.Text", LocalResourceFile);
            }
            else
            {
                divTitle.Visible = false;
            }

            //Before we bind the Profile to the editor we need to "update" the visible data
            ProfilePropertyDefinitionCollection properties = new ProfilePropertyDefinitionCollection();

            foreach (ProfilePropertyDefinition profProperty in UserProfile.ProfileProperties)
            {
                if (IsAdmin && !IsProfile)
                {
                    profProperty.Visible = true;
                }

                if (!profProperty.Deleted)
                {
                    properties.Add(profProperty);
                }
            }
            ProfileProperties.ShowVisibility = ShowVisibility;
            ProfileProperties.DataSource     = properties;
            ProfileProperties.DataBind();
        }
示例#3
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// DataBind binds the data to the controls
        /// </summary>
        /// <history>
        ///     [cnurse]	03/01/2006  Created
        /// </history>
        /// -----------------------------------------------------------------------------
        public override void DataBind()
        {
            //Before we bind the Profile to the editor we need to "update" the visible data
            var properties = new ProfilePropertyDefinitionCollection();

            foreach (ProfilePropertyDefinition profProperty in UserProfile.ProfileProperties)
            {
                if (IsAdmin && !IsProfile)
                {
                    profProperty.Visible = true;
                }

                if (!profProperty.Deleted)
                {
                    properties.Add(profProperty);
                }
            }

            ProfileProperties.User           = User;
            ProfileProperties.ShowVisibility = ShowVisibility;
            ProfileProperties.DataSource     = properties;
            ProfileProperties.DataBind();
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// DataBind binds the data to the controls
        /// </summary>
        /// -----------------------------------------------------------------------------
        public override void DataBind()
        {
            //Before we bind the Profile to the editor we need to "update" the visible data
            var properties = new ProfilePropertyDefinitionCollection();
            var imageType  = new ListController().GetListEntryInfo("DataType", "Image");

            foreach (ProfilePropertyDefinition profProperty in UserProfile.ProfileProperties)
            {
                if (IsAdmin && !IsProfile)
                {
                    profProperty.Visible = true;
                }

                if (!profProperty.Deleted && (Request.IsAuthenticated || profProperty.DataType != imageType.EntryID))
                {
                    properties.Add(profProperty);
                }
            }

            ProfileProperties.User           = User;
            ProfileProperties.ShowVisibility = ShowVisibility;
            ProfileProperties.DataSource     = properties;
            ProfileProperties.DataBind();
        }