Results 1 to 3 of 3

Thread: [RESOLVED][02/03] Object Oriented Structure sample

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Resolved [RESOLVED][02/03] Object Oriented Structure sample

    Does anyone can give example regarding ParentChild OO ?

    ex: Manajer have direct employee like Supervisor, Supervisor have direct employee like Staff

    so i can set the something like this Manajer.Employee.Add(New Supervisor)
    Supervisor.Employee.Add(New Staff)..

    but i just don't know about its Class structure ..

    pls give some insight

    thx..
    Last edited by erickwidya; Dec 12th, 2007 at 04:18 AM.

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: [02/03] Object Oriented Structure sample

    perhaps like Collection of Class so i can use something like this

    for each Staff in Supervisor.Employees
    'do some stuff here
    next

    or

    for each Role in User.Roles
    'do some stuff here
    next

    i've been doing it using VB6 but i just don't how to do it in .NET

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: [02/03] Object Oriented Structure sample

    there is a way same like in VB 6 i think

    my scenario is something like this one product can have many child product where child product can also have many product

    A
    A1
    A1.1
    A1.2
    B
    B1
    B1.1
    B2
    B2.1
    B2.1.1
    B2.1.2
    and so on

    i have two class for Products and ProductCollections
    basically ProductCollection is holding Product where Product can have ProductCollections too (confuse? )

    i'm attaching the example for it..

    HTH

    thanks,

    erick
    Attached Files Attached Files

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width