• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Roles.RoleInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DotNetNuke.Security.Roles.RoleInfo的典型用法代码示例。如果您正苦于以下问题:C# RoleInfo类的具体用法?C# RoleInfo怎么用?C# RoleInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RoleInfo类属于DotNetNuke.Security.Roles命名空间,在下文中一共展示了RoleInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateContentItem

        /// <summary>
        /// This should only run after the Post exists in the data store. 
        /// </summary>
        /// <returns>The newly created ContentItemID from the data store.</returns>
        /// <remarks>This is for the first question in the thread. Not for replies or items with ParentID > 0.</remarks>
        internal ContentItem CreateContentItem(RoleInfo objItem, int tabId) {
            var typeController = new ContentTypeController();
            string contentTypeName = "DNNCorp_SocialGroup";
            if (objItem.RoleID > 0) {
                contentTypeName = "DNNCorp_SocialGroup";
            }
            var colContentTypes = (from t in typeController.GetContentTypes() where t.ContentType == contentTypeName select t);
            int contentTypeID;

            if (colContentTypes.Count() > 0) {
                var contentType = colContentTypes.Single();
                contentTypeID = contentType == null ? CreateContentType(contentTypeName) : contentType.ContentTypeId;
            } else {
                contentTypeID = CreateContentType(contentTypeName);
            }

            var objContent = new ContentItem {
                Content = objItem.RoleName,
                ContentTypeId = contentTypeID,
                Indexed = false,
                ContentKey = "GroupId=" + objItem.RoleID,
                ModuleID = -1,
                TabID = tabId
            };

            objContent.ContentItemId = Util.GetContentController().AddContentItem(objContent);

            // Add Terms
            //var cntTerm = new Terms();
            //cntTerm.ManageQuestionTerms(objPost, objContent);

            return objContent;
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:38,代码来源:Content.cs


示例2: AddGroupNotification

        internal virtual Notification AddGroupNotification(string notificationTypeName, int tabId, int moduleId, RoleInfo group, UserInfo initiatingUser, IList<RoleInfo> moderators, IList<UserInfo> recipients) {
            var notificationType = NotificationsController.Instance.GetNotificationType(notificationTypeName);
            var tokenReplace = new GroupItemTokenReplace(group);

            var subject = Localization.GetString(notificationTypeName + ".Subject", Constants.SharedResourcesPath);
            subject = tokenReplace.ReplaceGroupItemTokens(subject);

            var body = Localization.GetString(notificationTypeName + ".Body", Constants.SharedResourcesPath);
            
            body = tokenReplace.ReplaceGroupItemTokens(body);
            body = body.Replace("Public.Text", Localization.GetString("Public.Text", Constants.SharedResourcesPath));
            body = body.Replace("Private.Text", Localization.GetString("Private.Text", Constants.SharedResourcesPath));

            bool dismiss = notificationTypeName != Constants.GroupPendingNotification;
            var notification = new Notification
                                   {
                                       NotificationTypeID = notificationType.NotificationTypeId,
                                       Subject = subject,
                                       Body = body,
                                       IncludeDismissAction = dismiss,
                                       SenderUserID = initiatingUser.UserID,
                                       Context = String.Format("{0}:{1}:{2}", tabId, moduleId, group.RoleID)
                                   };
            NotificationsController.Instance.SendNotification(notification, initiatingUser.PortalID, moderators, recipients);

            return notification;
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:27,代码来源:Notifications.cs


示例3: CreateJournalEntry

        public static void CreateJournalEntry(RoleInfo roleInfo, UserInfo createdBy)
        {
            var journalController = JournalController.Instance;
            var journalItem = new JournalItem();
            
            string url = "";
            
            if (roleInfo.Settings.ContainsKey("URL"))
            {
                url = roleInfo.Settings["URL"];
            }

            journalItem.PortalId = roleInfo.PortalID;
            journalItem.ProfileId = createdBy.UserID;
            journalItem.UserId = createdBy.UserID;
            journalItem.Title = roleInfo.RoleName;
            journalItem.ItemData = new ItemData {Url = url};
            journalItem.SocialGroupId = roleInfo.RoleID;
            journalItem.Summary = roleInfo.Description;
            journalItem.Body = null;
            journalItem.JournalTypeId = journalController.GetJournalType("groupcreate").JournalTypeId;
            journalItem.ObjectKey = string.Format("groupcreate:{0}:{1}", roleInfo.RoleID.ToString(CultureInfo.InvariantCulture), createdBy.UserID.ToString(CultureInfo.InvariantCulture));
            
            if (journalController.GetJournalItemByKey(roleInfo.PortalID, journalItem.ObjectKey) != null)
                journalController.DeleteJournalItemByKey(roleInfo.PortalID, journalItem.ObjectKey);
            
            
            journalItem.SecuritySet = string.Empty;
            
            if (roleInfo.IsPublic)
                journalItem.SecuritySet += "E,";
            
            
            journalController.SaveJournalItem(journalItem, -1);
        }
开发者ID:rut5949,项目名称:Dnn.Platform,代码行数:35,代码来源:GroupUtilities.cs


示例4: CreateRole

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// CreateRole persists a Role to the Data Store
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <param name="role">The role to persist to the Data Store.</param>
        /// <returns>A Boolean indicating success or failure.</returns>
        /// -----------------------------------------------------------------------------
        public override bool CreateRole(RoleInfo role)
        {
            try
            {
                role.RoleID =
                    Convert.ToInt32(dataProvider.AddRole(role.PortalID,
                                                         role.RoleGroupID,
                                                         role.RoleName,
                                                         role.Description,
                                                         role.ServiceFee,
                                                         role.BillingPeriod.ToString(CultureInfo.InvariantCulture),
                                                         role.BillingFrequency,
                                                         role.TrialFee,
                                                         role.TrialPeriod,
                                                         role.TrialFrequency,
                                                         role.IsPublic,
                                                         role.AutoAssignment,
                                                         role.RSVPCode,
                                                         role.IconFile,
                                                         UserController.GetCurrentUserInfo().UserID,
                                                         (int)role.Status,
                                                         (int)role.SecurityMode,
                                                         role.IsSystemRole));
            }
            catch (SqlException e)
            {
                throw new ArgumentException(e.ToString());
            }

            return true;
        }
开发者ID:rrsc,项目名称:Dnn.Platform,代码行数:40,代码来源:DNNRoleProvider.cs


示例5: ShowSettings

        protected void ShowSettings()
        {
            //get the tracking ID
            if (ModuleSettings.ContainsKey("GoogleTrackingId"))
                txtAnalyticsTrackingId.Text = (string)ModuleSettings["GoogleTrackingId"];

            if (ModuleSettings.ContainsKey("LocalHostAddress"))
            {
                txtLocalHostName.Text = (string)ModuleSettings["LocalHostAddress"];
            }
            
            //populate the drop down box
            RoleController rc = new DotNetNuke.Security.Roles.RoleController();
            ArrayList roles = rc.GetPortalRoles(this.PortalId);
            //put in a dummy role to allow no restriction on role
            RoleInfo dummyRole = new RoleInfo();
            dummyRole.RoleID = -1;
            dummyRole.RoleName = "[Do Not Hide Tracking]";
            roles.Insert(0, dummyRole);
            ddlSecurityGroups.DataSource = roles;
            ddlSecurityGroups.DataValueField = "RoleID";
            ddlSecurityGroups.DataTextField = "RoleName";
            ddlSecurityGroups.DataBind();

            //get the security group
            if (ModuleSettings.ContainsKey("HideTrackingFromRole"))
            {
                foreach(ListItem item in ddlSecurityGroups.Items)
                {
                    string value = (string)ModuleSettings["HideTrackingFromRole"];
                    if (item.Text == value)
                        ddlSecurityGroups.SelectedValue = item.Value;
                }
            }
        }
开发者ID:goedings,项目名称:VendorLink,代码行数:35,代码来源:ScripterSettings.ascx.cs


示例6: GroupViewParser

 public GroupViewParser(PortalSettings portalSettings, RoleInfo roleInfo, UserInfo currentUser, string template, int groupViewTabId)
 {
     PortalSettings = portalSettings;
     RoleInfo = roleInfo;
     CurrentUser = currentUser;
     Template = template;
     GroupViewTabId = groupViewTabId;
 }
开发者ID:revellado,项目名称:privateSocialGroups,代码行数:8,代码来源:GroupViewParser.cs


示例7: CreateRole

        public virtual bool CreateRole(RoleInfo role)
        {
            #pragma warning disable 612,618

            return CreateRole(-1, ref role);

            #pragma warning restore 612,618
        }
开发者ID:rrsc,项目名称:Dnn.Platform,代码行数:8,代码来源:RoleProvider.cs


示例8: DeleteRole

        public virtual void DeleteRole(RoleInfo role)
        {
            #pragma warning disable 612,618

            DeleteRole(-1, ref role);

            #pragma warning restore 612,618
        }
开发者ID:rrsc,项目名称:Dnn.Platform,代码行数:8,代码来源:RoleProvider.cs


示例9: GivenThereIsAPageCalled

        public void GivenThereIsAPageCalled(string pageName, Table permissions)
        {
            var reset = false;
            var tabController = new TabController();
            var tab = tabController.GetTabByName(pageName, PortalId);
            if (tab == null)
            {
                tab = new TabInfo
                {
                    TabName = pageName,
                    PortalID = 0
                };
                tab.TabID = tabController.AddTab(tab);
                foreach (var row in permissions.Rows)
                {
                    var roleId = -1;
                    var roleController = new RoleController();
                    if (row[0] == "All Users")
                    {
                        roleId = -1;
                    }
                    else
                    {
                        var role = roleController.GetRoleByName(PortalId, row[0]);
                        if (role == null)
                        {
                            if (roleController.GetRoleByName(Null.NullInteger, row[0]) == null)
                            {
                                role = new RoleInfo { RoleName = row[0], RoleGroupID = Null.NullInteger };
                                roleId = roleController.AddRole(role);
                            }
                        }
                    }
                    var permissionController = new PermissionController();
                    var permission = permissionController.GetPermissionByCodeAndKey("SYSTEM_TAB", row[1]);
                    var tabPermission = new TabPermissionInfo
                    {
                        PermissionID = 3,
                        TabID = tab.TabID,
                        AllowAccess = true,
                        RoleID = roleId
                    };
                    tab.TabPermissions.Add(tabPermission);
                }

                tabController.UpdateTab(tab);
                reset = true;
            }
            Page = tab;
            if (reset)
            {
                Config.Touch();
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:54,代码来源:PageSteps.cs


示例10: PermissionViewModel

 /// <summary>
 /// Constructs a PermissionViewModel from a Permission (for role) object.
 /// </summary>
 /// <param name="permission">Permiso.</param>
 /// <param name="rol">Rol con el que se construye el permiso.</param>
 /// <param name="resourceGroupId">Grupo al que pertenece.</param>
 public PermissionViewModel(Permission permission, RoleInfo rol, Guid resourceGroupId)
 {
     PermissionId = permission?.PermissionId ?? 0;
     ResourceGroupId = resourceGroupId;
     RolId = rol.RoleID;
     RoleName = rol.RoleName;
     ReadPermission = permission != null && permission.ReadPermission;
     WritePermission = permission != null && permission.WritePermission;
     Cd = permission?.Cd ?? DateTime.Now;
     Cu = permission?.Cu ?? Common.CurrentUser.UserID;
     Md = permission?.Md ?? DateTime.Now;
     Mu = permission?.Mu ?? Common.CurrentUser.UserID;
 }
开发者ID:intelequia,项目名称:IntelequiaVault,代码行数:19,代码来源:PermissionViewModel.cs


示例11: AddRole

        /// <summary>
        /// This overload adds a role and optionally adds the info to the AspNet Roles
        /// </summary>
        /// <param name="objRoleInfo">The Role to Add</param>
        /// <returns>The Id of the new role</returns>
        public int AddRole(RoleInfo objRoleInfo)
        {
            int roleId = -1;
            bool success = provider.CreateRole(objRoleInfo.PortalID, ref objRoleInfo);

            if (success)
            {
                AutoAssignUsers(objRoleInfo);
                roleId = objRoleInfo.RoleID;
            }

            return roleId;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:18,代码来源:RoleController.cs


示例12: Index

        public ActionResult Index()
        {
            var moduleID = int.Parse(PortalController.GetPortalSetting("MyDnnLiveChatModuleID", PortalSettings.PortalId, "-1"));

            if (moduleID == -1)
            {
                moduleID = ActiveModule.ModuleID;
                PortalController.UpdatePortalSetting(PortalSettings.PortalId, "MyDnnLiveChatModuleID", moduleID.ToString(), true);

                var role = RoleController.Instance.GetRoleByName(PortalSettings.PortalId, "MyDnnSupportAgent");
                if (role == null)
                {
                    var objRoleInfo = new RoleInfo();
                    objRoleInfo.PortalID = PortalSettings.PortalId;
                    objRoleInfo.Description = "mydnn live chat agent";
                    objRoleInfo.RoleName = "MyDnnSupportAgent";
                    objRoleInfo.IsPublic = false;
                    objRoleInfo.Status = RoleStatus.Approved;
                    objRoleInfo.RoleGroupID = Null.NullInteger;
                    RoleController.Instance.AddRole(objRoleInfo);

                    var listeners = VisitorsOnlineApi.Instance.GetListeners(PortalSettings.PortalId);
                    if (listeners == null || !listeners.Any(l => l.RoleName == "MyDnnSupportAgent" && l.LoginState == VisitorsOnline.Components.Enums.LoginState.LoggedIn))
                    {
                        VisitorsOnlineApi.Instance.AddListener(new ListenerInfo()
                        {
                            PortalID = PortalSettings.PortalId,
                            RoleName = "MyDnnSupportAgent",
                            LoginState = VisitorsOnline.Components.Enums.LoginState.LoggedIn,
                            InvokeScript = "$('#mydnnLiveChatMinButton').find('[data-livechat-isonline]').hide();$('#mydnnLiveChatMinButton').find('[data-livechat-isonline=\"online\"]').show();",
                            CreatedByModuleName = "MyDnnSupportLiveChat",
                            CreatedOnDate = DateTime.Now
                        });
                    }
                    if (listeners == null || !listeners.Any(l => l.RoleName == "MyDnnSupportAgent" && l.LoginState == VisitorsOnline.Components.Enums.LoginState.LoggedOff))
                    {
                        VisitorsOnlineApi.Instance.AddListener(new ListenerInfo()
                        {
                            PortalID = PortalSettings.PortalId,
                            RoleName = "MyDnnSupportAgent",
                            LoginState = VisitorsOnline.Components.Enums.LoginState.LoggedOff,
                            InvokeScript = "$('#mydnnLiveChatMinButton').find('[data-livechat-isonline]').hide();$('#mydnnLiveChatMinButton').find('[data-livechat-isonline=\"offline\"]').show();",
                            CreatedByModuleName = "MyDnnSupportLiveChat",
                            CreatedOnDate = DateTime.Now
                        });
                    }
                }
            }

            return View();
        }
开发者ID:mydnn,项目名称:LiveChat,代码行数:51,代码来源:HomeController.cs


示例13: GroupInfo

        public GroupInfo(RoleInfo roleInfo) {
            RoleID = roleInfo.RoleID;
            RoleName = roleInfo.RoleName;
            Description = roleInfo.Description;
            PortalID = roleInfo.PortalID;
            SecurityMode = roleInfo.SecurityMode;
            ServiceFee = roleInfo.ServiceFee;
            RSVPCode = roleInfo.RSVPCode;

          



        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:14,代码来源:GroupInfo.cs


示例14: UpdateContentItem

        /// <summary>
        /// This is used to update the content in the ContentItems table. Should be called when a question is updated.
        /// </summary>
        internal void UpdateContentItem(RoleInfo objItem, int tabId) {
            ContentItem objContent = null; //Util.GetContentController().;

            if (objContent == null) return;
            objContent.Content = objItem.RoleName;
            objContent.TabID = tabId;
            objContent.ContentKey = "GroupId=" + objItem.RoleID; // we reset this just in case the page changed.

            Util.GetContentController().UpdateContentItem(objContent);

            // Update Terms
            //var cntTerm = new Terms();
            //cntTerm.ManageQuestionTerms(objPost, objContent);
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:17,代码来源:Content.cs


示例15: GetEnabled

        /// <summary>
        /// Gets the Enabled status of the permission
        /// </summary>
        /// <param name="objPerm">The permission being loaded</param>
        /// <param name="role">The role</param>
        /// <param name="column">The column of the Grid</param>
        protected override bool GetEnabled( PermissionInfo objPerm, RoleInfo role, int column )
        {
            bool enabled;

            if( role.RoleID == AdministratorRoleId )
            {
                enabled = false;
            }
            else
            {
                enabled = true;
            }

            return enabled;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:21,代码来源:TabPermissionsGrid.cs


示例16: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {

            RoleInfo role = TestableRoleController.Instance.GetRole(PortalId, r => r.SecurityMode != SecurityMode.SecurityRole && r.RoleID == GroupId);
            if (role == null && GroupId > 0)
            {
                UI.Skins.Skin.AddModuleMessage(this, Localization.GetString("GroupIdNotFound", Constants.SharedResourcesPath), ModuleMessage.ModuleMessageType.YellowWarning);
            }

            if (role == null && (UserInfo.IsInRole(PortalSettings.AdministratorRoleName) || UserInfo.IsSuperUser))
            {
                role = new RoleInfo();
                role.RoleID = -1;
                role.RoleName = Localization.GetString("Sample_RoleName", LocalResourceFile);
                role.Description = Localization.GetString("Sample_RoleDescription", LocalResourceFile);

            }

            if (role == null)
                litOutput.Text = string.Empty;
            else
            {
                var resxPath = Constants.SharedResourcesPath;

                var template = GroupViewTemplate;
                template = template.Replace("{resx:posts}", Localization.GetString("posts", resxPath));
                template = template.Replace("{resx:members}", Localization.GetString("members", resxPath));
                template = template.Replace("{resx:photos}", Localization.GetString("photos", resxPath));
                template = template.Replace("{resx:documents}", Localization.GetString("documents", resxPath));

                template = template.Replace("{resx:Join}", Localization.GetString("Join", resxPath));
                template = template.Replace("{resx:JoinGroup}", Localization.GetString("JoinGroup", resxPath));
                template = template.Replace("{resx:Pending}", Localization.GetString("Pending", resxPath));
                template = template.Replace("{resx:LeaveGroup}", Localization.GetString("LeaveGroup", resxPath));
                template = template.Replace("{resx:EditGroup}", Localization.GetString("EditGroup", resxPath));
                template = template.Replace("[GroupViewTabId]", GroupViewTabId.ToString());


                var groupParser = new GroupViewParser(PortalSettings, role, UserInfo, template, TabId);
                groupParser.GroupEditUrl = GetEditUrl();
                
                litOutput.Text = groupParser.ParseView();

            }

        }
开发者ID:hungnt-me,项目名称:Dnn.Platform,代码行数:46,代码来源:GroupView.ascx.cs


示例17: AddGroupOwnerNotification

        internal virtual Notification AddGroupOwnerNotification(string notificationTypeName, int tabId, int moduleId, RoleInfo group, UserInfo initiatingUser) 
        {
            var notificationType = NotificationsController.Instance.GetNotificationType(notificationTypeName);

            var tokenReplace = new GroupItemTokenReplace(group);
            
            var subject = Localization.GetString(notificationTypeName + ".Subject", Constants.SharedResourcesPath);
            var body = Localization.GetString(notificationTypeName + ".Body", Constants.SharedResourcesPath);
            subject = subject.Replace("[DisplayName]", initiatingUser.DisplayName);
            subject = subject.Replace("[ProfileUrl]", Globals.UserProfileURL(initiatingUser.UserID));
            subject = tokenReplace.ReplaceGroupItemTokens(subject);
            body = body.Replace("[DisplayName]", initiatingUser.DisplayName);
            body = body.Replace("[ProfileUrl]", Globals.UserProfileURL(initiatingUser.UserID));
            body = tokenReplace.ReplaceGroupItemTokens(body);
            var roleCreator = UserController.GetUserById(group.PortalID, group.CreatedByUserID);

            var roleOwners = new List<UserInfo>();

            foreach (UserInfo userInfo in RoleController.Instance.GetUsersByRole(group.PortalID, group.RoleName))
            {
                var userRoleInfo = RoleController.Instance.GetUserRole(group.PortalID, userInfo.UserID, group.RoleID);
                if (userRoleInfo.IsOwner && userRoleInfo.UserID != group.CreatedByUserID)
                {
                    roleOwners.Add(UserController.GetUserById(group.PortalID, userRoleInfo.UserID));
                }
            }
            roleOwners.Add(roleCreator);
            


            //Need to add from sender details
            var notification = new Notification
            {
                NotificationTypeID = notificationType.NotificationTypeId,
                Subject = subject,
                Body = body,
                IncludeDismissAction = true,
                SenderUserID = initiatingUser.UserID,
                Context = String.Format("{0}:{1}:{2}:{3}", tabId, moduleId, group.RoleID, initiatingUser.UserID)
            };
            NotificationsController.Instance.SendNotification(notification, initiatingUser.PortalID, null, roleOwners);

            return notification;
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:44,代码来源:Notifications.cs


示例18: MustHaveServiceWithFee

 public void MustHaveServiceWithFee()
 {
     var roleName = "Paid Subscription";
     var role = TestableRoleController.Instance.GetRole(0, r => r.RoleName == roleName);
     if (role == null)
     {
         var subscription = new RoleInfo
                                {
                                    PortalID = 0,
                                    RoleGroupID = Null.NullInteger,
                                    RoleName = roleName,
                                    Description = "Test Paid Subscription",
                                    ServiceFee = 0.01F,
                                    BillingPeriod = 1,
                                    BillingFrequency = "Y",
                                    IsPublic = true,
                                    Status = RoleStatus.Approved,
                                    SecurityMode= SecurityMode.SecurityRole
                                };
         TestableRoleController.Instance.AddRole(subscription);
     }
 }
开发者ID:ryanmalone,项目名称:BGDNNWEB,代码行数:22,代码来源:BaseMembershipSteps.cs


示例19: FillRoleInfo

        private RoleInfo FillRoleInfo(IDataReader dr, bool CheckForOpenDataReader)
        {
            RoleInfo objRoleInfo = null;

            // read datareader
            bool canContinue = true;
            if (CheckForOpenDataReader)
            {
                canContinue = false;
                if (dr.Read())
                {
                    canContinue = true;
                }
            }
            if (canContinue)
            {
                objRoleInfo = new RoleInfo();
                objRoleInfo.RoleID = Convert.ToInt32(Null.SetNull(dr["RoleId"], objRoleInfo.RoleID));
                objRoleInfo.PortalID = Convert.ToInt32(Null.SetNull(dr["PortalID"], objRoleInfo.PortalID));
                objRoleInfo.RoleGroupID = Convert.ToInt32(Null.SetNull(dr["RoleGroupId"], objRoleInfo.RoleGroupID));
                objRoleInfo.RoleName = Convert.ToString(Null.SetNull(dr["RoleName"], objRoleInfo.RoleName));
                objRoleInfo.Description = Convert.ToString(Null.SetNull(dr["Description"], objRoleInfo.Description));
                objRoleInfo.ServiceFee = Convert.ToSingle(Null.SetNull(dr["ServiceFee"], objRoleInfo.ServiceFee));
                objRoleInfo.BillingPeriod = Convert.ToInt32(Null.SetNull(dr["BillingPeriod"], objRoleInfo.BillingPeriod));
                objRoleInfo.BillingFrequency = Convert.ToString(Null.SetNull(dr["BillingFrequency"], objRoleInfo.BillingFrequency));
                objRoleInfo.TrialFee = Convert.ToSingle(Null.SetNull(dr["TrialFee"], objRoleInfo.TrialFee));
                objRoleInfo.TrialPeriod = Convert.ToInt32(Null.SetNull(dr["TrialPeriod"], objRoleInfo.TrialPeriod));
                objRoleInfo.TrialFrequency = Convert.ToString(Null.SetNull(dr["TrialFrequency"], objRoleInfo.TrialFrequency));
                objRoleInfo.IsPublic = Convert.ToBoolean(Null.SetNull(dr["IsPublic"], objRoleInfo.IsPublic));
                objRoleInfo.AutoAssignment = Convert.ToBoolean(Null.SetNull(dr["AutoAssignment"], objRoleInfo.AutoAssignment));
                objRoleInfo.RSVPCode = Convert.ToString(Null.SetNull(dr["RSVPCode"], objRoleInfo.RSVPCode));
                objRoleInfo.IconFile = Convert.ToString(Null.SetNull(dr["IconFile"], objRoleInfo.IconFile));
            }

            return objRoleInfo;
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:36,代码来源:DNNRoleProvider.cs


示例20: UpdateRole

 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Update a role
 /// </summary>
 /// <param name="role">The role to update</param>
 /// -----------------------------------------------------------------------------
 public override void UpdateRole(RoleInfo role)
 {
     dataProvider.UpdateRole(role.RoleID,
                             role.RoleGroupID,
                             role.RoleName,
                             role.Description,
                             role.ServiceFee,
                             role.BillingPeriod.ToString(CultureInfo.InvariantCulture),
                             role.BillingFrequency,
                             role.TrialFee,
                             role.TrialPeriod,
                             role.TrialFrequency,
                             role.IsPublic,
                             role.AutoAssignment,
                             role.RSVPCode,
                             role.IconFile,
                             UserController.GetCurrentUserInfo().UserID,
                             (int)role.Status,
                             (int)role.SecurityMode,
                             role.IsSystemRole);
 }
开发者ID:rrsc,项目名称:Dnn.Platform,代码行数:27,代码来源:DNNRoleProvider.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FileSystem.FolderInfo类代码示例发布时间:2022-05-24
下一篇:
C# Roles.RoleController类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap