コード例 #1
0
ファイル: roleaction.aspx.cs プロジェクト: uNormatov/FreboCms
        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";
            }
        }
コード例 #2
0
ファイル: action.aspx.cs プロジェクト: uNormatov/FreboCms
        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();
                    }
                }
            }
        }
コード例 #3
0
ファイル: roles.aspx.cs プロジェクト: uNormatov/FreboCms
 protected override void Init()
 {
     base.Init();
     if (_roleProfileProvider == null)
         _roleProfileProvider = new RoleProfileProvider();
 }