| | |
| | | //查询是否已有同名在批量界面创建的事件s |
| | | event := selectobject( owner_i, Event, event, event.Subject() = subject_i |
| | | and event.EventType() = eventtype_i ); |
| | | info( '-------------', not isnull( event ), ismultiple ); |
| | | |
| | | //只有通过批量创建界面且已有同名事件进入下面操作 |
| | | if( ismultiple and not isnull( event ) ){ |
| | | lp := event.LeadingParticipation(); |
| | |
| | | leadingETI := lp.CreateTimeInterval( starttime, endtime, event.Capacity() ); |
| | | } |
| | | // info( '-----------------------2-----------------', lp.ExplicitTimeInterval( relsize ) ); |
| | | // if( not isnull( leadingETI ) ){ |
| | | // traverse( lp, Subscription, subscription, subscribers_i.Find( subscription.Calendar() ) >= 0 and |
| | | // startDate <= subscription.Calendar().EndDate() and |
| | | // endDate >= subscription.Calendar().StartDate() and |
| | | // ( isnull( subscription.RecurrencePeriod() ) or |
| | | // ( startDate <= subscription.RecurrencePeriod().EndDate() and |
| | | // endDate >= subscription.RecurrencePeriod().StartDate() ) ) ){ |
| | | // info( '-----------------------1-----------------', subscription.ExplicitTimeInterval( relsize ) ); |
| | | // subscribingETI := subscription.CreateTimeInterval( starttime, endtime, event.Capacity() ); |
| | | // |
| | | // if( not isnull( subscribingETI ) ){ |
| | | // subscribingETI.LeadingETI( relset, leadingETI ); |
| | | // } |
| | | // info( '-----------------------4-----------------', subscription.ExplicitTimeInterval( relsize ) ); |
| | | // } |
| | | // } |
| | | // info( '-----------------------3-----------------', lp.ExplicitTimeInterval( relsize ) ); |
| | | if( not isnull( leadingETI ) ){ |
| | | traverse( lp, Subscription, subscription, subscribers_i.Find( subscription.Calendar() ) >= 0 ){ |
| | | traverse( subscription, ExplicitTimeInterval, eti, not ( eti.Start() = starttime and eti.End() = endtime ) ){ |
| | | eti.Delete(); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | event := LibCal_Event::CreateUpdateFromUI( owner_i, participation_i, subject_i, description_i, type_i, capacity_i, category_i, isDefault_i, |
| | | startDate_i, startTimeOfDay_i, endDate_i, endTimeOfDay_i, isAllDay_i, |