Esempio n. 1
0
        protected override void Init()
        {
            base.Init();
            if (_roleProfileProvider == null)
                _roleProfileProvider = new RoleProfileProvider();
            if (_contentTypeProvider == null)
                _contentTypeProvider = new ContentTypeProvider();

            if (IsEdit)
            {
                Title = "Edit Role | Frebo Cms";
                ltlTitle.Text = "Edit";
            }
            else
            {
                Title = "New Role | Frebo Cms";
                ltlTitle.Text = "New";
            }
        }
Esempio n. 2
0
        protected override void Init()
        {
            base.Init();

            if (_userProfileProvider == null)
                _userProfileProvider = new UserProfileProvider();
            if (_roleProfileProvider == null)
                _roleProfileProvider = new RoleProfileProvider();
            if (_generalConnection == null)
                _generalConnection = new GeneralConnection();
            if (_contentTypeProvider == null)
                _contentTypeProvider = new ContentTypeProvider();

            if (IsEdit)
            {
                Title = "Edit User | " + CoreSettings.CurrentSite.Name;
                ltlTitle.Text = "Edit";
            }
            else
            {
                Title = "New User | " + CoreSettings.CurrentSite.Name;
                ltlTitle.Text = "New";
            }

            if (IsEdit)
            {
                UserProfileInfo userProfileInfo = _userProfileProvider.SelectByUserId(Id, ErrorList);
                string[] selectedRoles = Roles.GetRolesForUser(Id);
                if (selectedRoles.Length > 0)
                {
                    RoleProfileInfo roleProfileInfo = _roleProfileProvider.SelectByRoleId(selectedRoles[0], ErrorList);
                    if (userProfileInfo != null && roleProfileInfo != null)
                    {
                        ContentTypeId = roleProfileInfo.ContentTypeId;
                        ContentId = userProfileInfo.ContentId;
                        pnlContentType.Visible = true;
                        ShowContentType();
                    }
                }
            }
        }
Esempio n. 3
0
 protected override void Init()
 {
     base.Init();
     if (_roleProfileProvider == null)
         _roleProfileProvider = new RoleProfileProvider();
 }