Quintiq file version 2.0
|
#parent: #root
|
Method InitializeTable (
|
LibCal_Calendars subscribers
|
)
|
{
|
TextBody:
|
[*
|
// 甄兰鸽 May-28-2024 (created)
|
rownr := this.LibCal_SubscriberEventRow( relsize );
|
|
traverse( subscribers, Elements, subscriber ){
|
|
traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){
|
event := participation.Event();
|
|
row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID()
|
and row.Event() = event.Subject()
|
and row.EventType() = guard( event.EventType().Name(), '' )
|
);
|
|
if( isnull( row ) ){
|
row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(),
|
Event := event.Subject(),
|
EventType := guard( event.EventType().Name(), '' ) );
|
|
rownr := rownr + 1;
|
}
|
|
traverse( participation, ExplicitTimeInterval, eti ){
|
row.InitializeDate( this, eti.Start(), eti.End(), event.Description() );
|
}
|
|
}
|
}
|
|
//traverse( this, LibCal_SubscriberEventColumn, column ){
|
// traverse( this, LibCal_SubscriberEventRow, row ){
|
// if( not exists( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ) ) {
|
// cell := column.LibCal_SubscriberEventCell( relnew, Value := '' );
|
// row.LibCal_SubscriberEventCell( relinsert, cell );
|
// }
|
// }
|
//}
|
*]
|
}
|