Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Ads  
 


  Sponsors  

Meet Our Sponsors

Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  RoleGroupID not a member of RoleInfo
Previous Previous
 
Next Next
New Post 7/12/2007 4:01 PM
User is offline Tammy Adkins
22 posts
www.dnnextras.com
10th Ranked


RoleGroupID not a member of RoleInfo 

I'm trying to programmatically add roles to my module.  When I use the AddRole method in the RoleController and RoleInfo classes, I get RoleGroupID not a member of RoleInfo.

I'm using 3.3.7 for my framework.  When I pull up the RoleInfo, I can clearly see RoleGroupID is declared.  What am I missing?

Here's my code snippet - ok dnn's code snippet.  '>)

I have a private declaration of the RoleGroupID = -1

Dim

sglServiceFee As Single = 0Dim intBillingPeriod As Integer = 1Dim strBillingFrequency As String = "N"Dim sglTrialFee As Single = 0Dim intTrialPeriod As Integer = 1Dim strTrialFrequency As String = "N"Dim objRoleController As New RoleControllerDim objRoleInfo As New RoleInfo

objRoleInfo.RoleName = txtGpName.Text

objRoleInfo.Description = rbRoleType.SelectedValue

objRoleInfo.ServiceFee = sglServiceFee

objRoleInfo.BillingPeriod = intBillingPeriod

objRoleInfo.BillingFrequency = strBillingFrequency

objRoleInfo.TrialFee = sglTrialFee

objRoleInfo.TrialPeriod = intTrialPeriod

objRoleInfo.TrialFrequency = strTrialFrequency

objRoleInfo.IsPublic =

False

objRoleInfo.AutoAssignment =

False

 

'objRoleInfo.RSVPCod = Null.NullInteger

 

'objRoleInfo.IconFile = ctlIcon.Url

 

 

Dim objEventLog As New Services.Log.EventLog.EventLogControllerIf lblRoleID.Text = CType(-1, String) Then

 

If objRoleController.GetRoleByName(PortalId, objRoleInfo.RoleName) Is Nothing Then

objRoleController.AddRole(objRoleInfo)

Response.Write("Got here")

objEventLog.AddLog(objRoleInfo, PortalSettings, UserId, "", Services.Log.EventLog.EventLogController.EventLogType.ROLE_CREATED)

 

Else

DotNetNuke.UI.Skins.Skin.AddModuleMessage(

 

Me, Localization.GetString("DuplicateRole", Me.LocalResourceFile), DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.RedError)Exit Sub

 

End If

 

Else

objRoleController.UpdateRole(objRoleInfo)

objEventLog.AddLog(objRoleInfo, PortalSettings, UserId, "", Services.Log.EventLog.EventLogController.EventLogType.ROLE_UPDATED)

 

 

 

End If

 

'Clear Roles Cache

DataCache.RemoveCache("GetRoles")

 

End Sub

 

 

 

 

 

 

 

objRoleInfo.PortalID = Portal

objRoleInfo.RoleGroupID = -1  ------------------------------------------->>>>>>  Here

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  RoleGroupID not a member of RoleInfo
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke Web Hosting w/ ASP.NET 3.5
Unlimited email boxes, Unlimited databases, Unlimited domains. Plans start at $4.97
www.MyWinHosting.com
SteadyRain
Founded in 1999, SteadyRain has extensive experience delivering Internet technology strategies and solutions for a diverse client base, ranging from Fortune 500 firms to successful start-ups.
www.steadyrain.com
AfterImage Internet Consulting and SEO Services
AfterImage provides search engine optimization (SEO), Internet consulting and hosting services for the Windows platform (IIS, ASP, SQL Server).
www.afterimage.nl/

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP