I do have a VB.NET book that kind of covers it all but I to be honest
have just been using it as a reference as it does not contain concepts
for object oriented design. You are right I do need to read up on it
but to be honest this app is being written on my spare time on my own
and I work a full time job and also am going to school so needless to
say I really dont have too much time to be reading any other books than
the textbooks from class. I do appreciate your help.
My items class right now is just a class listing all of the data
members:
Public Class Items
#Region " Data Members "
Private myID As Integer
Private myModel As String
Private myManufacturer As String
Private myDescription As String
Private mySpecification As String
Private myElectric_Info As Integer
Private myConnectionTyp e As String
Private myVolts As String
Private myPhase As String
Private myAmps As String
Private myKWs As String
Private myHP As String
Private myElectric_AFF As String
Private myElectric_Rema rks As String
Private myPlumbing_Info As Integer
Private mySteam As String
Private mySteam_AFF As String
Private myGas As String
Private myGas_AFF As String
Private myBTUs As String
Private myHW As String
Private myHW_AFF As String
Private myCW As String
Private myCW_AFF As String
Private myDrain As String
Private myDrain_AFF As String
Private myIDrain As String
Private myIDrain_AFF As String
Private myPlumbing_Rema rks As String
#End Region
End Class
However, I did start coding another class which I need to revise and
correct some OOP mistakes but here it is if you want to look it over:
Imports System.Data
Imports System.Data.Ole Db
Public Class Project
Private myProjectID As Integer
Private myCustomerID As Integer
Private myProjectStatus As String
Public Sub New(ByVal argCustomerID As Integer)
myCustomerID = argCustomerID
End Sub
Public ReadOnly Property ProjectID() As Integer
Get
Return (myProjectID)
End Get
End Property
Property CustomerID() As Integer
Get
Return (myCustomerID)
End Get
Set(ByVal Value As Integer)
myCustomerID = Value
End Set
End Property
Public ReadOnly Property ProjectStatus() As String
Get
Return (myProjectStatu s)
End Get
End Property
Public Function addProject() As Boolean
Dim myDatabase As New Database
Dim mySqlString As String
If myCustomerID = Nothing Then
MsgBox("You must select a customer first. Adding a project
failed!", MsgBoxStyle.Exc lamation, "Project Add Failed")
Return False
Else
mySqlString = "INSERT INTO Projects(Compan y_ID,Status)
VALUES ('" & myCustomerID & "','Closed' )"
myDatabase.Modi fy(mySqlString)
myDatabase.Disp ose()
Return True
End If
End Function
Public Function deleteProject(B yVal argProjectID As Integer) As
Boolean
Dim myDatabase As New Database
Dim mySqlString As String
If argProjectID = Nothing Then
MsgBox("You must select a project first. Deleting a project
failed!", MsgBoxStyle.Exc lamation, "Project Deletion Failed")
Return False
Else
mySqlString = "DELETE FROM Projects WHERE Project_ID = " &
argProjectID
myDatabase.Modi fy(mySqlString)
myDatabase.Disp ose()
Return True
End If
End Function
End Class
-Ivan
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!