If you want to indicate a pair of object structures, we can use the following way (indicating a structure of a library list, which contains the library single and related details):
Public Class Form: PersistenceCapable
{
PRIVATE EntityData Form;
Private formdetail formdetail;
#REGION constructor
Public form (): this (true)
{}
Public Form (Bool Autoinit)
{
Form = EntityPrototypeManager.Getemptyentity ("form");
IF (Autoinit)
Form.NewRecord ("form");
}
Public Form (entityData Entity)
{
Form = Entity;
}
#ndregion
#region attribute
Public String Formid
{
Get {Return Form ["FormID", "Form"]. TOSTRING ();
Set {form ["formid", "form"] = value;
}
Public DateTime FormTime
{
Get {return form.getdatetime ("formtime", "form");
Set {form ["formtime", "form"] = value;
}
Public FormDetail Formdail
{
get
{
IF (FormDetail == Null)
{
Formdetail = New formdetail (form);
}
Return Formdetail;
}
}
#ndregion
#Region PersistenceCapable member
Public int ObjectCount
{
get
{
Return form.entitycount;
}
}
Public EntityData EntityData
{
get
{
Return Form;
}
set
{
Form = value;
}
}
Public bool next ()
{
Return Form.next ("form");
}
Public void first ()
{
Form.First ("form");
}
Public void addnew ()
{
Form.NewRecord ("form");
}
#ndregion
}
Public Class Formdetail: PersistenceCapable
{
PRIVATE EntityData Form;
#REGION constructor
Public Formdetail (): this (true)
{}
Public FormDetail (Bool Autoinit)
{
Form = EntityPrototypeManager.Getemptyentity ("form");
IF (Autoinit)
Form.NewRecord ("formdetail");
}
Public FormDetail (entityData Entity)
{
Form = Entity;
}
#ndregion
#region attribute
Public String Formdetailid
{
Get {Return Form ["formdetailid", "formdetail"]. TOSTRING ();} set {form ["formdetailid", "formdetail"] = value;}
}
Public String Formid
{
Get {Return Form ["FormID", "FormDetail"]. TOSTRING ();
Set {form ["formid", "formdail"] = value;
}
Public String ProductID
{
Get {Return Form ["ProductID", "FormDetail"]. TOSTRING ();
Set {form ["productID", "formdetail"] = value;
}
Public Decimal Incount
{
Get {Return Form.GetDecimal ("Incount", "FormDetail");
Set {form ["incount", "formdetail"] = value;
}
#ndregion
#Region PersistenceCapable member
Public int ObjectCount
{
get
{
Return Form.Tables ["formdetail"]. Rows.count;
}
}
Public EntityData EntityData
{
get
{
Return Form;
}
set
{
Form = value;
}
}
Public bool next ()
{
Return Form.next ("formdetail");
}
Public void first ()
{
Form.First ("formdetail");
}
Public void addnew ()
{
Form.NewRecord ("formdetail");
}
#ndregion
}