已添加24个文件
已修改22个文件
已删除1个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation LibCal_EventType_CalendarRegistry_LibCal_CalendarRegistry_EventType |
| | | { |
| | | #keys: '1[415136.0.714486919]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide CalendarRegistry |
| | | { |
| | | #keys: '3[415136.0.714486921][415136.0.714486920][415136.0.714486922]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: LibCal_EventType |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide EventType |
| | | { |
| | | #keys: '3[415136.0.714486924][415136.0.714486923][415136.0.714486925]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: LibCal_CalendarRegistry |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation LibCal_Event_EventType_LibCal_EventType_Event |
| | | { |
| | | #keys: '1[415136.0.714487004]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide EventType |
| | | { |
| | | #keys: '3[415136.0.714487006][415136.0.714487005][415136.0.714487007]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: LibCal_Event |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide Event |
| | | { |
| | | #keys: '3[415136.0.714487009][415136.0.714487008][415136.0.714487010]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: LibCal_EventType |
| | | OwningSide: 'Reference' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation LibCal_SubscriberEventSearch_MacroPlan_MacroPlan_LibCal_SubscriberEventSearch |
| | | { |
| | | #keys: '1[415136.0.703300877]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide MacroPlan |
| | | { |
| | | #keys: '3[415136.0.703300879][415136.0.703300878][415136.0.703300880]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: LibCal_SubscriberEventSearch |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide LibCal_SubscriberEventSearch |
| | | { |
| | | #keys: '3[415136.0.703300882][415136.0.703300881][415136.0.703300883]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: MacroPlan |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetDefaultEventType () remote as LibCal_EventType |
| | | { |
| | | Description: 'è·åé»è®¤äºä»¶ç±»å' |
| | | TextBody: 'return select( this, EventType, type, true, type.Name() = LibCal_EventType::DEFAULT_TYPE() );' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type LibCal_CalendarRegistry #extension |
| | | { |
| | | } |
| | |
| | | String subject_i, |
| | | String description_i, |
| | | String type_i, |
| | | String eventtype_i, |
| | | LibCal_EventType eventtype_i, |
| | | Real capacity_i, |
| | | LibCal_EventCategory category_i, |
| | | Boolean isDefault_i, |
| | |
| | | patternYearly_IsDate_i, patternYearly_Month_i, patternYearly_Day_i, patternYearly_WeekOfMonth_i, patternYearly_DayOfWeek_i, |
| | | periodType_i, periodStartDate_i, nrOfOccurrences_i, periodEndDate_i, subscribers_i ); |
| | | |
| | | event.EventType( eventtype_i ); |
| | | event.EventType( relset, eventtype_i ); |
| | | |
| | | return event; |
| | | *] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ID |
| | | { |
| | | #keys: '3[415136.0.714581728][415136.0.714581727][415136.0.714581729]' |
| | | IsReadOnly: true |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Name |
| | | { |
| | | #keys: '3[415136.0.714581709][415136.0.714581708][415136.0.714581710]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Name |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Create ( |
| | | LibCal_CalendarRegistry owner_i, |
| | | String categoryName_i |
| | | ) as LibCal_EventType |
| | | { |
| | | Description: 'å建' |
| | | TextBody: |
| | | [* |
| | | return owner_i.EventType( relnew,ID := categoryName_i, |
| | | Name := categoryName_i ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DEFAULT_TYPE () const declarative remote as String |
| | | { |
| | | Description: 'Can be extended to define the name of the general EventCategory, which will always be created.' |
| | | TextBody: 'return "端åè";' |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetAvailableTypes () as owning Strings |
| | | { |
| | | Description: 'Can be extended to return the applicable available EventCategories, in addition to the general category that will always be generated.' |
| | | TextBody: |
| | | [* |
| | | categories := construct( Strings ); |
| | | |
| | | // By default there is an EventCategory for each of the EventTypes. |
| | | // This method can be extended in order to have other available EventCategories. |
| | | // A general category will always be added automatically. |
| | | categories.Add( 'å³å¨è' ); |
| | | categories.Add( '端åè' ); |
| | | categories.Add( 'å½åºè' ); |
| | | categories.Add( 'ä¸ç§è' ); |
| | | |
| | | return &categories; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod InitializeEventTypes ( |
| | | LibCal_CalendarRegistry registry_i |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | traverse( LibCal_EventType::GetAvailableTypes(), Elements, type ) |
| | | { |
| | | LibCal_EventType::Create( registry_i, type ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type LibCal_EventType |
| | | { |
| | | #keys: '5[415136.0.714581706][415136.0.714581704][0.0.0][415136.0.714581705][415136.0.714581707]' |
| | | BaseType: Object |
| | | StructuredName: 'LibCal_EventTypes' |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | value := false; |
| | | info( this.Index(), this.Period(), start, end ); |
| | | if( this.Index() < 2 ){ |
| | | //info( this.Index(), this.LibCal_SubscriberEventTable().Name(), this.Period(), start, end ); |
| | | if( this.Index() < 2 or ( this.Period() >= start and this.Period() <= end ) ){ |
| | | value := true; |
| | | } |
| | | |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method FilterBySubscriberAndEventType ( |
| | | LibCal_Calendars subscribers |
| | | LibCal_Calendars subscribers, |
| | | LibCal_EventTypes eventtypes |
| | | ) declarative remote as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-29-2024 (created) |
| | | value := false; |
| | | if( exists( subscribers, Elements, e, e.CalendarID() = this.Subscriber() ) ){ |
| | | if( exists( subscribers, Elements, e, e.CalendarID() = this.Subscriber() ) and exists( eventtypes, Elements, e, e.Name() = this.EventType() ) ){ |
| | | value := true; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute End |
| | | { |
| | | #keys: '3[415136.0.703300868][415136.0.703300867][415136.0.703300869]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Start |
| | | { |
| | | #keys: '3[415136.0.703300858][415136.0.703300857][415136.0.703300859]' |
| | | ValueType: Date |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type LibCal_SubscriberEventSearch |
| | | { |
| | | #keys: '5[415136.0.703300854][415136.0.703300852][0.0.0][415136.0.703300853][415136.0.703300855]' |
| | | BaseType: Object |
| | | Description: 'æ¥åä¸å¯ç¨äºä»¶ç颿¥è¯¢æ¡ä»¶' |
| | | StructuredName: 'LibCal_SubscriberEventSearchs' |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeTable ( |
| | | LibCal_Calendars subscribers, |
| | | LibCal_EventCategory category |
| | | LibCal_Calendars subscribers |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | traverse( subscribers, Elements, subscriber ){ |
| | | // info( '------------------------', subscriber.CalendarID(), subscriber.CalendarType() ); |
| | | // traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation ){ |
| | | traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory() = category ){ |
| | | traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){ |
| | | // info( '------------------------', participation.Event().Subject(), '------', participation.Event().EventCategory().Name() ); |
| | | event := participation.Event(); |
| | | row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() and row.Event() = event.Subject() and row.EventType() = event.EventType() ); |
| | | row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() |
| | | and row.Event() = event.Subject() |
| | | and row.EventType() = event.EventType().Name() |
| | | ); |
| | | if( isnull( row ) ){ |
| | | row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), Event := event.Subject(), EventType := event.EventType() ); |
| | | row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), |
| | | Event := event.Subject(), |
| | | EventType := event.EventType().Name() ); |
| | | |
| | | if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) = 1 ){ |
| | | subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, subscribercell ); |
| | | subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() ); |
| | | if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) <> 1 ){ |
| | | subscribercell.Value( '' ); |
| | | } |
| | | row.LibCal_SubscriberEventCell( relinsert, subscribercell ); |
| | | |
| | | eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() ); |
| | | row.LibCal_SubscriberEventCell( relinsert, eventcell ); |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | 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 ); |
| | | } |
| | | } |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Export ( |
| | | LibCal_SubscriberEventTable table |
| | | ) as BinaryValue |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-30-2024 (created) |
| | | // lihongji Jun-8-2023 (created) |
| | | returnBinaryData := BinaryData::Construct(); |
| | | tableGroupHandle := TableGroupHandle::Create( "" ); |
| | | |
| | | xmlImpl := XMLDOMImplementation::Create(); |
| | | xmlDoc := xmlImpl.CreateDocument(); |
| | | xmlSeri := xmlImpl.CreateSerializer(); |
| | | |
| | | xmlTable := xmlDoc.CreateElement( "table" ); |
| | | xmlTableName := xmlDoc.CreateElement( "name" ); |
| | | xmlTableName.TextContent( table.Name() ); |
| | | xmlTable.AppendChild( xmlTableName ); |
| | | |
| | | traverse ( table, LibCal_SubscriberEventColumn, column ) { |
| | | xmlColumn := xmlDoc.CreateElement( "column" ); |
| | | xmlColumnName := xmlDoc.CreateElement( "name" ); |
| | | if( column.Index() = 0 ){ |
| | | xmlColumnName.TextContent( '产线' ); |
| | | }else if(column.Index() = 1 ){ |
| | | xmlColumnName.TextContent( 'äºä»¶' ); |
| | | }else{ |
| | | xmlColumnName.TextContent( column.Name() ); |
| | | } |
| | | xmlColumn.AppendChild( xmlColumnName ); |
| | | xmlColumnType := xmlDoc.CreateElement( "type" ); |
| | | xmlColumnType.TextContent( "String" ); |
| | | xmlColumn.AppendChild( xmlColumnType ); |
| | | |
| | | rowTotal := table.LibCal_SubscriberEventRow( relsize ); |
| | | for ( i := 0; i < rowTotal; i++ ) { |
| | | cell := select( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow().RowNr() = i ); |
| | | row := cell.LibCal_SubscriberEventRow(); |
| | | xmlCell := xmlDoc.CreateElement( "cell" ); |
| | | if( column.Index() = 0 ){ |
| | | xmlCell.SetAttribute( "value", row.Subscriber() ); |
| | | }else if(column.Index() = 1 ){ |
| | | xmlCell.SetAttribute( "value", row.Event() ); |
| | | }else{ |
| | | xmlCell.SetAttribute( "value", cell.Value() ); |
| | | } |
| | | xmlColumn.AppendChild( xmlCell ); |
| | | } |
| | | |
| | | xmlTable.AppendChild( xmlColumn ); |
| | | } |
| | | |
| | | xmlDoc.AppendChild( xmlTable ); |
| | | xmlStr := xmlSeri.WriteToString( xmlDoc ); |
| | | tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlStr ) ); |
| | | tableGroupHandle.Add( tableHandle ); |
| | | //} |
| | | |
| | | returnBinaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true ); |
| | | |
| | | return returnBinaryData.AsBinaryValue(); |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod InitializeTable ( |
| | | LibCal_Calendars subscribers, |
| | | LibCal_Calendar owner, |
| | | LibCal_EventCategory category |
| | | LibCal_Calendar owner |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ May-28-2024 (created) |
| | | owner.LibCal_SubscriberEventTable( relflush ); |
| | | if( owner.LibCal_SubscriberEventTable( relsize ) < 1 ){ |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := 'Day', Name := 'Day' ); |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := 'Week', Name := 'Week' ); |
| | | owner.LibCal_SubscriberEventTable( relnew, ID := 'Month', Name := 'Month' ); |
| | | } |
| | | info('-----------------------------', owner.LibCal_SubscriberEventTable( relsize ), subscribers.Size(), isnull( category ) ); |
| | | info('-----------------------------', owner.LibCal_SubscriberEventTable( relsize ), subscribers.Size() ); |
| | | traverse( owner, LibCal_SubscriberEventTable, table ){ |
| | | table.InitializeTable( subscribers, category ); |
| | | table.InitializeTable( subscribers ); |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component ListCalendarEventTypes |
| | | { |
| | | #keys: '[415136.0.714793803]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component DataExtractorCalendarEventTypes |
| | | { |
| | | #keys: '[415136.0.714793804]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_CalendarRegistry' |
| | | Source: 'LibCal_GlobalState.dhGlobalCalendarRegistry' |
| | | Taborder: 0 |
| | | Transformation: 'EventType' |
| | | ] |
| | | } |
| | | #child: listActionBarPageCalendarEventTypes |
| | | Component DataSetLevelCalendarEventTypes |
| | | { |
| | | #keys: '[415136.0.714793809]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: listContextMenuCalendarEventTypes |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Name","title":"Name","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Name"}}]' |
| | | ContextMenu: 'listContextMenuCalendarEventTypes' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | SelectionCheckboxes: true |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_SubscriberEventTable' |
| | | FilterArguments: 'subscribers:dhSubscribers' |
| | | FixedFilter: 'object.FilterBySubscriberAndEventType( subscribers )' |
| | | FilterArguments: 'subscribers:dhSubscribers;eventtypes:dhEventTypes' |
| | | FixedFilter: 'object.FilterBySubscriberAndEventType( subscribers, eventtypes )' |
| | | Source: 'dhTable' |
| | | Taborder: 0 |
| | | Transformation: 'LibCal_SubscriberEventRow' |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'LibCal_SubscriberEventTable' |
| | | FilterArguments: 'starttime:dhStartDate;endtime:dhEndDate' |
| | | Description: 'object.FilterByDatePeriod( Date::MinDate(), Date::MaxDate() )' |
| | | FilterArguments: 'period:dhDate' |
| | | FixedFilter: 'object.FilterByDatePeriod( period.Start(), period.End() )' |
| | | Source: 'dhTable' |
| | | Taborder: 0 |
| | | Transformation: 'LibCal_SubscriberEventColumn' |
| | |
| | | { |
| | | #keys: '[415136.0.658772868]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: ListCalendarEventTypes |
| | | Component dhEventTypes |
| | | { |
| | | #keys: '[415136.0.714794191]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[LibCal_EventType]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | FixedSize: true |
| | | MinimumColumns: 39 |
| | | Taborder: 1 |
| | | Title: 'Event type' |
| | | ] |
| | | } |
| | |
| | | [ |
| | | FixedSize: true |
| | | Orientation: 'horizontal' |
| | | Taborder: 2 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component dhCategory |
| | | { |
| | | #keys: '[415136.0.701811642]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'LibCal_EventCategory' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhStartDate id:dhStartDate_529 |
| | | Component dhDate |
| | | { |
| | | #keys: '[415136.0.701820404]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'Date' |
| | | Databinding: 'LibCal_SubscriberEventSearch' |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component dhEndDate id:dhEndDate_480 |
| | | { |
| | | #keys: '[415136.0.701820426]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'Date' |
| | | Properties: |
| | | [ |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageCalendarEventTypes |
| | | { |
| | | #keys: '[415136.0.714793806]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuCalendarEventTypes |
| | | { |
| | | #keys: '[415136.0.714793811]' |
| | | BaseType: 'listContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | |
| | | #keys: '[415136.0.666291565]' |
| | | Body: |
| | | [* |
| | | |
| | | owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar(); |
| | | |
| | | category_i := selectobject( owner_i,CalendarRegistry.EventCategory, category, category.Name() = 'Unavaliable' ); |
| | | dhCategory.Data(category_i); |
| | | |
| | | sEvent := owner_i.Event( relshadow, |
| | | EventID := [String]Key::NextPersistentKey(), |
| | |
| | | calendar := sLeadPart.Calendar(); |
| | | potentialSubscribers := calendar.GetPotentialSubscribers(); |
| | | |
| | | period := MacroPlan.LibCal_SubscriberEventSearch( relnew, Start := Date::MinDate(), End := Date::MaxDate() ); |
| | | |
| | | dhDate.Data( period ); |
| | | // Remove the calendar of the initiator (cannot subscribe to self). |
| | | initiator := sEvent.Calendar(); |
| | | if( potentialSubscribers.Find( initiator ) >= 0 ) |
| | |
| | | dhPotentialSubscribers.Data( &potentialSubscribers ); |
| | | |
| | | lstSubscribers.CheckAll(); |
| | | ListCalendarEventTypes.CheckAll(); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListCalendarEventTypes |
| | | Response OnCheckedChanged ( |
| | | structured[LibCal_EventType] checkeditems |
| | | ) id:Response_ListCalendarEventTypes_OnCheckedChanged |
| | | { |
| | | #keys: '[415136.0.714794303]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebList_OnCheckedChanged' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | enventtypes := checkeditems.Copy(); |
| | | dhEventTypes.Data( &enventtypes ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | dhEndDate.Data(this.Date()); |
| | | period := dhDate.Data(); |
| | | period.End( this.Date() ); |
| | | dhDate.Data( period ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | dhStartDate.Data(this.Date()); |
| | | period := dhDate.Data(); |
| | | period.Start( this.Date() ); |
| | | dhDate.Data( period ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | info( '--------------------------------', dhStartDate.Data(), dhEndDate.Data() ) |
| | | binaryValue := LibCal_SubscriberEventTable::Export( dhTable.Data() ); |
| | | |
| | | Application.Download( "Unavailable events.xlsx", binaryValue.AsBinaryData() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data(), dhCategory.Data() ); |
| | | //åå§åæ°æ® |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data() ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | owner_i := LibCal_GlobalState.dhGlobalCalendarRegistry().Data().CommonCalendar(); |
| | | owner_i := dhCalendar.Data(); |
| | | if( owner_i.LibCal_SubscriberEventTable( relsize ) < 1 ){ |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data(), dhCategory.Data() ); |
| | | LibCal_SubscriberEventTable::InitializeTable( dhPotentialSubscribers.Data(), dhCalendar.Data() ); |
| | | } |
| | | table := selectobject( owner_i, LibCal_SubscriberEventTable, table, table.ID() = this.BoundValue() ); |
| | | |
| | |
| | | [ |
| | | Label: 'Event type' |
| | | NumberOfColumns: 0 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dhEventTypes |
| | | { |
| | | #keys: '[415136.0.705611943]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[LibCal_EventType]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component edtEventType |
| | | Component ddlEventType |
| | | { |
| | | #keys: '[415136.0.657922077]' |
| | | BaseType: 'WebEditField' |
| | | #keys: '[415136.0.705611783]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'LibCal_EventType' |
| | | Children: |
| | | [ |
| | | Component deEventType |
| | | { |
| | | #keys: '[415136.0.705611784]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[LibCal_EventType]' |
| | | Source: 'dhEventTypes' |
| | | Taborder: 0 |
| | | Transformation: 'Elements' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DataBinding: 'dhEvent.Data.EventType' |
| | | Taborder: 1 |
| | | Description: 'dhEvent.Data.EventType' |
| | | DisplayField: 'Name' |
| | | NumberOfColumns: 15 |
| | | ShowLabel: false |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CreateEvent ( |
| | | LibCal_Calendar owner_i, |
| | | LibCal_EventCategory category_i, |
| | | DateTime start_i, |
| | | DateTime end_i |
| | | ) id:Method_LibCal_dlgEvent_CreateEvent_791 #extension |
| | | { |
| | | Body: |
| | | [* |
| | | timezone := owner_i.GetTimeZone(); |
| | | |
| | | // Create a new Event... |
| | | sEvent := owner_i.Event( relshadow, |
| | | EventID := [String]Key::NextPersistentKey(), |
| | | StartTimeOfDay := start_i.TimeOfDay( timezone ), |
| | | EndTimeOfDay := end_i .TimeOfDay( timezone ), |
| | | EventCategory := category_i, |
| | | IsDefault := owner_i.istype( LibCal_CommonCalendar ) ); |
| | | |
| | | // Special case: by default the EventType is 'Unavailable', but when an event is created for |
| | | // category 'Available' or 'Partial' then set the Type to 'Available' resp 'Partial'. |
| | | if( guard( category_i.Name() = LibCal_Event::TYPE_AVAILABLE(), false ) ) |
| | | { |
| | | sEvent.Type( LibCal_Event::TYPE_AVAILABLE() ); |
| | | } |
| | | else if( guard( category_i.Name() = LibCal_Event::TYPE_PARTIAL(), false ) ) |
| | | { |
| | | sEvent.Type( LibCal_Event::TYPE_PARTIAL() ); |
| | | } |
| | | |
| | | // Set the Event and the related controls... |
| | | // The values are explicitly assigned here 'at the beginning' to the controls, |
| | | // so that the values can be used by the rest of the logic. Databinding is executed too late for that. |
| | | // Further initialization is done in the OnCreated of the Dialog. |
| | | dhEvent.Data( &sEvent ); |
| | | this.SetEventData(); |
| | | |
| | | // ...and an accompanying LeadingParticipation. |
| | | // Only set the dates, the times will be updated from the Event later if necessary. |
| | | sLeadPart := owner_i.Participation( relshadow, LibCal_LeadingParticipation, |
| | | ParticipationID := [String]Key::NextPersistentKey(), |
| | | StartDate := start_i.Date( timezone ), |
| | | EndDate := end_i .Date( timezone ) ); |
| | | |
| | | // Set the Participation and the related controls |
| | | // (only the DataHolders, the Date-controls are set later on, after the recurrence has been initialized) |
| | | dhStartDate.Data( sLeadPart.StartDate() ); |
| | | dhEndDate.Data( sLeadPart.EndDate() ); |
| | | dhLeadingParticipation.Data( &sLeadPart ); |
| | | |
| | | // Initialize the capacity here, when done in the OnCreate() edtCapacity is not disabled correctly. |
| | | this.InitializeCapacity(); |
| | | |
| | | // Initialize the category here, when done in the OnCreate() there is no selection in the DropDownList. |
| | | // Select the general category for new events. |
| | | this.InitializeCategories(); |
| | | this.InitializeEventTypes(); |
| | | ddlCategory.Data( owner_i.CalendarRegistry().GetGeneralEventCategory() ); |
| | | ddlEventType.Data( owner_i.CalendarRegistry().GetDefaultEventType() ); |
| | | |
| | | // Must be done here, when done in the OnCreate() the checkmarks are not always set when the dialog is opened for editing an event. |
| | | // Pre-select all resources as subscriber when creating a common event. |
| | | this.InitializeSubscribers(); |
| | | if( owner_i.istype( LibCal_CommonCalendar ) ) |
| | | { |
| | | lstSubscribers.CheckAll(); |
| | | } |
| | | |
| | | // Open the dialog. |
| | | this.Show( "modal" ); |
| | | *] |
| | | } |
| | |
| | | subject := edtName.Text(); |
| | | description := edtDescription.Text(); |
| | | category := ddlCategory.Data(); |
| | | eventTypeList := edtEventType.Text(); |
| | | eventTypeList := ddlEventType.Data(); |
| | | isDefault := ckbApplyToNewResources.Checked(); |
| | | startDate := dsStartDate.Date(); |
| | | startTimeOfDay := durStartTimeOfDay.Duration(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeEventTypes () id:Method_LibCal_dlgEvent_InitializeEventTypes |
| | | { |
| | | #keys: '[415136.0.706730202]' |
| | | Body: |
| | | [* |
| | | participation := dhLeadingParticipation.Data(); |
| | | calendar := participation.Calendar(); |
| | | |
| | | eventtypes := calendar.CalendarRegistry().EventType( relget ); |
| | | |
| | | dhEventTypes.Data( &eventtypes ); |
| | | |
| | | // The applicable EventCategory is selected in ddlCategory.OnCreate() |
| | | *] |
| | | } |
| | |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component edtEventType |
| | | { |
| | | #keys: '[415136.0.647401498]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | Label: 'Event type' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component durStartTimeOfDay |
| | | { |
| | | #keys: '[415136.0.647401500]' |
| | |
| | | Label: 'Start time' |
| | | MaxDuration: P0DT23H59M0S |
| | | MinDuration: P0DT0H0M0S |
| | | Taborder: 7 |
| | | Taborder: 8 |
| | | ] |
| | | } |
| | | Component dhStartTimeOfDay |
| | |
| | | Databinding: 'Duration' |
| | | Properties: |
| | | [ |
| | | Taborder: 8 |
| | | Taborder: 9 |
| | | ] |
| | | } |
| | | Component durEndTimeOfDay |
| | |
| | | Label: 'End time' |
| | | MaxDuration: P0DT23H59M0S |
| | | MinDuration: P0DT0H0M0S |
| | | Taborder: 9 |
| | | Taborder: 10 |
| | | ] |
| | | } |
| | | Component dhEndTimeOfDay |
| | |
| | | Databinding: 'Duration' |
| | | Properties: |
| | | [ |
| | | Taborder: 10 |
| | | Taborder: 11 |
| | | ] |
| | | } |
| | | Component edtDescription |
| | |
| | | Multiline: true |
| | | NumberOfColumns: 29 |
| | | ShowLabel: false |
| | | Taborder: 12 |
| | | Taborder: 13 |
| | | ] |
| | | } |
| | | Component dsStartDate |
| | |
| | | [ |
| | | DateFormat: 'DMMY' |
| | | Label: 'Date' |
| | | Taborder: 5 |
| | | Taborder: 6 |
| | | ] |
| | | } |
| | | Component dhStartDate |
| | |
| | | Databinding: 'Date' |
| | | Properties: |
| | | [ |
| | | Taborder: 6 |
| | | Taborder: 7 |
| | | ] |
| | | } |
| | | Component lblDescription id:lblDescription_456 |
| | |
| | | [ |
| | | Label: 'Description' |
| | | NumberOfColumns: 0 |
| | | Taborder: 11 |
| | | Taborder: 12 |
| | | ] |
| | | } |
| | | Component ButtonCreate |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'æ°å»º' |
| | | Taborder: 13 |
| | | Taborder: 14 |
| | | ] |
| | | } |
| | | Component ddslType id:ddslType_360 |
| | |
| | | ShowLabel: false |
| | | Sorting: 'none' |
| | | Strings: 'Available;Unavailable' |
| | | Taborder: 2 |
| | | Taborder: 1 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | DataBinding: 'dhEvent.Data.IsDefault' |
| | | Label: 'Apply to new resources' |
| | | NumberOfColumns: 0 |
| | | Taborder: 3 |
| | | Taborder: 4 |
| | | Tooltip: 'If checked, calendars of new resources will automatically subscribe to the event.' |
| | | Visible: false |
| | | ] |
| | |
| | | NumberOfColumns: 0 |
| | | ShowLabel: false |
| | | SizeRatio: 0 |
| | | Taborder: 4 |
| | | Taborder: 5 |
| | | Text: '<Timezone>' |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component dhEventTypes id:dhEventTypes_836 |
| | | { |
| | | #keys: '[415136.0.706740648]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'structured[LibCal_EventType]*' |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component ddlEventType id:ddlEventType_568 |
| | | { |
| | | #keys: '[415136.0.706740548]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'LibCal_EventType' |
| | | Children: |
| | | [ |
| | | Component deEventType id:deEventType_393 |
| | | { |
| | | #keys: '[415136.0.706740549]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'structured[LibCal_EventType]' |
| | | Source: 'dhEventTypes' |
| | | Taborder: 0 |
| | | Transformation: 'Elements' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | DisplayField: 'Name' |
| | | NumberOfColumns: 15 |
| | | ShowLabel: false |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | |
| | | // Initialize the capacity here, when done in the OnCreate() edtCapacity is not disabled correctly. |
| | | this.InitializeCapacity(); |
| | | |
| | | this.InitializeEventTypes(); |
| | | |
| | | ddlEventType.Data( owner_i.CalendarRegistry().GetDefaultEventType() ); |
| | | |
| | | // Initialize the category here, when done in the OnCreate() there is no selection in the DropDownList. |
| | | // Select the general category for new events. |
| | | //this.InitializeCategories(); |
| | |
| | | // Event and LeadingParticipation |
| | | subject := edtName.Text(); |
| | | description := edtDescription.Text(); |
| | | eventTypeList := edtEventType.Text(); |
| | | eventTypeList := ddlEventType.Data(); |
| | | category := sEvent.EventCategory(); |
| | | isDefault := ckbApplyToNewResources.Checked(); |
| | | startDate := dsStartDate.Date(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method InitializeEventTypes () id:Method_LibCal_dlgMultipleEvent_InitializeEventTypes |
| | | { |
| | | #keys: '[415136.0.706780096]' |
| | | Body: |
| | | [* |
| | | participation := dhLeadingParticipation.Data(); |
| | | calendar := participation.Calendar(); |
| | | |
| | | eventtypes := calendar.CalendarRegistry().EventType( relget ); |
| | | |
| | | dhEventTypes.Data( &eventtypes ); |
| | | |
| | | // The applicable EventCategory is selected in ddlCategory.OnCreate() |
| | | *] |
| | | } |