Prev: Evetlog
Next: debugger class
From: Family Tree Mike on
On 5/6/2010 4:05 PM, Jeff Johnson wrote:
> "Family Tree Mike"<FamilyTreeMike(a)ThisOldHouse.com> wrote in message
> news:%23GWL13U7KHA.2240(a)TK2MSFTNGP06.phx.gbl...
>
>> He is getting the contact info from the Employee object, which I presume
>> is the FirstName, MiddleName, LastName properties.
>
> Thaty's what I assumed at first, but his reply to my question suggests that
> that's not the case. It makes little sense given the name of the procedure,
> but then perhaps the contact info that is being retrieved is, for example,
> the employee's next of kin, which wouldn't be part of the Employee object
> but would need the Employee ID to look that info up from the database.
>
>

I guess that is possible, but why cloud the issue by stating the
employee object contained the First, Middle and Last name properties?

--
Mike
From: Jeff Johnson on
"Family Tree Mike" <FamilyTreeMike(a)ThisOldHouse.com> wrote in message
news:uYL3hlV7KHA.5476(a)TK2MSFTNGP06.phx.gbl...

>>> He is getting the contact info from the Employee object, which I presume
>>> is the FirstName, MiddleName, LastName properties.
>>
>> Thaty's what I assumed at first, but his reply to my question suggests
>> that
>> that's not the case. It makes little sense given the name of the
>> procedure,
>> but then perhaps the contact info that is being retrieved is, for
>> example,
>> the employee's next of kin, which wouldn't be part of the Employee object
>> but would need the Employee ID to look that info up from the database.
>>
>>
>
> I guess that is possible, but why cloud the issue by stating the employee
> object contained the First, Middle and Last name properties?

I'm with you, man. My first response was going to be exactly what yours was
until I saw Mr. Arnold's response and re-read cshapper's question carefully,
noting the part where he said "I need to use the employeeId in a method."


From: Mr. Arnold on
Family Tree Mike wrote:
> On 5/6/2010 4:05 PM, Jeff Johnson wrote:
>> "Family Tree Mike"<FamilyTreeMike(a)ThisOldHouse.com> wrote in message
>> news:%23GWL13U7KHA.2240(a)TK2MSFTNGP06.phx.gbl...
>>
>>> He is getting the contact info from the Employee object, which I presume
>>> is the FirstName, MiddleName, LastName properties.
>>
>> Thaty's what I assumed at first, but his reply to my question suggests
>> that
>> that's not the case. It makes little sense given the name of the
>> procedure,
>> but then perhaps the contact info that is being retrieved is, for
>> example,
>> the employee's next of kin, which wouldn't be part of the Employee object
>> but would need the Employee ID to look that info up from the database.
>>
>>
>
> I guess that is possible, but why cloud the issue by stating the
> employee object contained the First, Middle and Last name properties?
>

What else is an Employee object suppose to have in it but properties
pertaining to the employee? Contact can be another object related to the
Employee object, and Contact is linked to the Employee by EmployeeID.

But does that mean one must pass the Employee object into the method
that gets the Contact object by EemployeeID or just past the EmployeeID
(premative type) to method?

Some say yes and some say no. I say no and one doesn't need to pass the
Employee object in this case to be oops compliant.


From: Jeff Johnson on
"Mr. Arnold" <Arnold(a)Arnold.com> wrote in message
news:e5BV04V7KHA.356(a)TK2MSFTNGP05.phx.gbl...

> What else is an Employee object suppose to have in it but properties
> pertaining to the employee? Contact can be another object related to the
> Employee object, and Contact is linked to the Employee by EmployeeID.

In truth, though, "GetContactInfo" suggests to me that you're getting the
contact info ABOUT the employee, and this information should be available
directly from the Employee object. On the other hand, "GetContacts" gets the
employee's contacts, i.e., other people. But that's a matter of semantics
and could be argued either way.


From: Mr. Arnold on
Jeff Johnson wrote:
> "Mr. Arnold" <Arnold(a)Arnold.com> wrote in message
> news:e5BV04V7KHA.356(a)TK2MSFTNGP05.phx.gbl...
>
>> What else is an Employee object suppose to have in it but properties
>> pertaining to the employee? Contact can be another object related to the
>> Employee object, and Contact is linked to the Employee by EmployeeID.
>
> In truth, though, "GetContactInfo" suggests to me that you're getting the
> contact info ABOUT the employee, and this information should be available
> directly from the Employee object. On the other hand, "GetContacts" gets the
> employee's contacts, i.e., other people. But that's a matter of semantics
> and could be argued either way.
>
>

Not necessarily should the info be directly available in Employee.
ContactID can be an property in Employee object, to lookup using a
method in the Contact object.

Contact is a different object, but that doesn't mean that Contact or
Contacts cannot be hosted and loaded in Employee as an object or List<T>
of objects within Employee, if one chose to do so.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Evetlog
Next: debugger class