Hi there
I am exploring this and see if this one make sense. For instance I have 2 abstract objects called: Customer and Tender. The relationship is that Customer can have many Tenders.
My question is how to achieve like this on the TestClient app:
1) customer.InTender[0].ID = ???
What method to handle to handle this? Do I need to pass CustomerID into Customer constructor to achieve this or ... ?
2) If I want to get all tenders for that particular customer should I do this:
customer.InTender.Get()
3) HOw do I differentiate between All Tender VS All Customer Tender (point 3). I guess it will be like this. One with ID of CUstomer and the other one without?
inTender.Get()
I appreciate your feedback.
===========================================
public abstract class Customer
{
protected Int64 id;
protected string name;
protected ArrayList tender;
public abstract ArrayList Tender
{
get;
set;
}
public abstract Int64 ID
{
get;
set;
}
public abstract string Name
{
get;
set;
}
public abstract bool Update();
public abstract bool Add();
public abstract bool Delete();
}
public class CorporateCustomer : Customer
{
public CorporateCustomer ()
{}
public override ArrayList Tender
{
get
{
return tender
}
set
{
tender = value;
}
}
public override Int64 ID
{
get
{
return id;
}
set
{
id = value;
}
}
public override string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public override bool Update()
{
return true;
}
public override bool Add()
{
return true;
}
public override bool Delete()
{
return true;
}
}
public abstract class Tender
{
protected Int64 id;
protected string name;
public abstract bool Update();
public abstract bool Add();
public abstract bool Delete();
}
public class InTender : Tender
{
public InTender ()
{}
public override Int64 ID
{
get
{
return id;
}
set
{
id = value;
}
}
public override string Name
{
get
{
return name;
}
set
{
name = value;
}
}
public override bool Update()
{
return true;
}
public override bool Add()
{
return true;
}
public override bool Delete()
{
return true;
}
}