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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! (Pro...  "Partial Methods" vb class missing from tutorial
Previous Previous
 
Next Next
New Post 8/3/2008 6:01 AM
User is offline Worth Robbins
21 posts
10th Ranked


"Partial Methods" vb class missing from tutorial 

I am trying to get my head around Linq to SQL by following Michael Washington's excellent tutorial package. I code in VB, so I have been substituting vb code as I go, using the vb version supplied. That worked great through Part 2, Application Look and Feel. It falls apart at Category Administration, because the "PartialMethods" class doesn't have an equivalent in the vb install kit. I'm trying to just wing it, but my cs->vb skills aren't good enough. When I try to create the "DeleteThingsForSale_Category" method, I get a message that a partial method must be empty.

Is it possible that there is more vb code available, that fully parallels the cs-based tutorial?

 
New Post 8/3/2008 11:28 AM
User is offline Michael Washington
2848 posts
ADefWebserver.com
5th Ranked










Re: "Partial Methods" vb class missing from tutorial 

The VB version of that tutorial is posted here:

Things4SaleVB_02.00.00_Install.zip



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 8/3/2008 11:34 AM
User is offline Michael Washington
2848 posts
ADefWebserver.com
5th Ranked










Re: "Partial Methods" vb class missing from tutorial 

Hmm I just looked at the code and it appears I must have ran into the same error and coded the VB version without the partial method.

However this may help:

How to: Create a Partial Method (Visual Basic)



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 8/6/2008 5:18 AM
User is offline Worth Robbins
21 posts
10th Ranked


Re: "Partial Methods" vb class missing from tutorial 

I tried installing the vb kit you referenced, and ran into other problems. Also, it seemed to me it didn't go all the way to implementing the ListView solution described in part 3 of the tutorial. So I stepped through all of the tutorial steps, converting C# to VB as I went along, and I have it working 90% (?). The only thing that doesn't work is expansion to the list of items when the "+" is clicked on the LVGroup listview.

I think the problem is in the conversion of the "v13wstat3" region or the "ListView" region of the view.ascx.vb code behind.

Hmm, I just realized I don't see an option for uploading a file. I was going to upload the installer I have built, but I'll just paste inline the code for those two regions. I'll try to email you the installer.

Thanks for all help!

#Region

"v13wstat3"

<Serializable()> _

 

 

Public Class CategoryPublic Property Name() As String

 

Get

 

End Get

 

 

Set(ByVal value As String)End Set

 

End Property

 

End Class

 

 

Public Property Categories() As List(Of Category)Get

 

If v13wstat3("Categories") Is Nothing Then

 

 

Return New List(Of Category)()Else

 

 

Return DirectCast(v13wstat3("Categories"), List(Of Category))End If

 

End Get

 

v13wstat3(

 

Set(ByVal value As List(Of Category))"Categories") = valueEnd Set

 

#End

#Region

End Property Region "ListView"

 

 

 

Protected Sub lvItems_ItemDataBound(ByVal sender As Object, ByVal e As ListViewItemEventArgs)Dim LinkButton As LinkButton = DirectCast(e.Item.FindControl("lnkSelect"), LinkButton)If (Not PortalSecurity.IsInRole("Administrators")) And Not (Entities.Users.UserController.GetCurrentUserInfo().UserID = Convert.ToInt16(LinkButton.CommandArgument)) Then

e.Item.Controls(1).Visible =

False

 

End If

 

End Sub

 

 

 

 

 

 

 

Protected Sub LVGroup_ItemDataBound(ByVal sender As Object, ByVal e As ListViewItemEventArgs)Dim Panel As Panel = DirectCast(e.Item.FindControl("pnlItems"), Panel)Dim objLinkButton As LinkButton = DirectCast(e.Item.FindControl("MinMax"), LinkButton)Dim results = From cat In Categories _Where cat.Name = objLinkButton.CommandArgument _Select catIf results.Count() <> 0 Then

Panel.Visible =

True

objLinkButton.Text =

"-"

 

End If

 

#End

#Region

End Sub Region "MinMax"

 

 

 

 

 

 

Protected Sub MinMax_Click(ByVal sender As Object, ByVal e As EventArgs)Dim objLinkButton As LinkButton = DirectCast(sender, LinkButton)Dim results = From cat In Categories _Where cat.Name = objLinkButton.CommandArgument _Select catIf objLinkButton.Text = "+" Then

 

If results.Count() = 0 Then

 

objCategory.Name = objLinkButton.CommandArgument

 

colCategories.Add(objCategory)

Categories = colCategories

 

Dim objCategory As New CategoryDim colCategories As List(Of Category) = CategoriesEnd If

 

Else

 

If results.Count() <> 0 Then

 

 

objCategory = colCategories.FirstOrDefault(

colCategories.Remove(objCategory)

Categories = colCategories

 

Dim colCategories As List(Of Category) = CategoriesDim objCategory As CategoryFunction(c) c.Name = objLinkButton.CommandArgument)End If

 

End If

LVGroup.DataBind()

 

#End

End Sub Region

 
New Post 8/6/2008 6:07 AM
User is offline Worth Robbins
21 posts
10th Ranked


Re: "Partial Methods" vb class missing from tutorial 

Michael,

I tried uploading my code to your webmaster email account, but it didn't like the attachment. I've sent a followup email, inviting you to email me with upload instructions.

Worth

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! (Pro...  "Partial Methods" vb class missing from tutorial
 


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.

 


Sunset Hill Solutions - Consulting and Development
We offer general DNN consulting services - including custom module development and commercial module integration/setup.
www.sunsethill.ca
MaximumASP
MaximumASP provides a wide array of web hosting plans to fit any hosting need. We also provide software and services needed to keep it running optimally.
MaximumASP.com
Mad Development: dotnetnuke design and development
We are an expert Dotnetnuke shop specializing in developing solutions that merge the requirements of design and branding, content management, ecommerce, search engine optimization and business logic.
www.MadDevelopment.com

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