big problem with simple set statement

corpse

Newcomer
Joined
Dec 12, 2002
Messages
12
Location
chicago area
I'm confused about a simple set statement...

I have an object called Employee, which it's properties are set when the app loads.
Then as a public form variable I have my oOrder object, and that has an OrderTaker property of the Employee type.

When I click the new order button, I'm doing...
oOrder.OrderTaker = new isrOrderEntry.Employee
oOrder.OrderTaker = tmpform.EmployeeLoggedIn <--- problem line

EmployeeLoggedIn is also of Employee type, and I have confirmed that EmployeeLoggedIn has all of it's properties set. When I hit the problem line, it does not give an error, but it does not set the data. I can set the properties 1 by 1 in the command window, but I can't do this stinkin copy. Every other time it has worked fine.. Am I missing something really dumb??
 
Here are 2 chunks of the code, the first is the employee object..
the second is how I'm using it and where it fails..
The Employee object is in the isrOrderEntry project/solution (the middler tier)..
The new order button is on a MDIChild form in the front-end.

I create the Employee object like...

Public Class Employee
Private blnIsDirty As Boolean
Private p_intempid As Int16
Private p_txtLoginID As String
Private p_strLastName As String
Private p_strFirstName As String
Private p_lstGroups As New ArrayList

Public Property EmployeeID() As Int16
Get
EmployeeID = p_intempid
End Get
Set(ByVal Value As Int16)
p_intempid = Value
End Set
End Property
.
.
Public Sub New()
blnIsDirty = False
p_intempid = 0
p_txtLoginID = ""
p_strLastName = ""
p_strFirstName = ""
p_lstGroups = New ArrayList
End Sub
End Class


Here's the new order code...

Private Sub btnNewOrder_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewOrder.Click

' blank out the current order
Me.oOrder = New isrOrderEntry.Order
Dim tmpform As frmOrderParent
tmpform = Me.MdiParent

oOrder.OrderTaker = New isrOrderEntry.Employee
oOrder.OrderTaker = tmpform.EmployeeLoggedIn
; *** The above line is the ONLY line that refuses to work.. if I Stop at this line, tmpform.EmployeeLoggedIn has all properties set with values; but oOrder.OrderTaker stays at the same values.


Dim tmpLI As New isrOrderEntry.LineItem

oOrder.LineItems = New isrOrderEntry.LineItems
oOrder.LineItems.Add(tmpLI)

tmpLI.Star.StarName = "test"
tmpLI.Star.StarDate = Now()
oOrder.LineItems.Item(0) = tmpLI
tmpLI = Nothing

Stop

End Sub
 
Back
Top