| | |
| | | // , patternDaily_IsEveryWeekday_i, periodType_i, periodStartDate_i, nrOfOccurrences_i, periodEndDate_i ); |
| | | //查询是否已有同名事件 |
| | | event := selectobject( owner_i, Event, event, event.Subject() = subject_i |
| | | and event.StartTimeOfDay() = startTimeOfDay_i |
| | | and event.EndTimeOfDay() = endTimeOfDay_i |
| | | and event.EventType() = eventtype_i ); |
| | | and event.EventType() = eventtype_i |
| | | and ( event.LeadingParticipation().EndDate() - event.LeadingParticipation().StartDate() ) = ( endDate_i - startDate_i ) |
| | | and event.StartTimeOfDay() = startTimeOfDay_i |
| | | and event.EndTimeOfDay() = endTimeOfDay_i ); |
| | | //event := selectobject( owner_i, Event.LeadingParticipation, lp, lp.Event().Subject() = subject_i |
| | | // and lp.Event().EventType() = eventtype_i |
| | | // and ( lp.EndDate() - lp.StartDate() ) = ( endDate_i - startDate_i ) |
| | | // and lp.Event().StartTimeOfDay() = startTimeOfDay_i |
| | | // and lp.Event().EndTimeOfDay() = endTimeOfDay_i ); |
| | | //只有通过批量创建界面且已有同名事件进入下面操作 |
| | | if( ismultiple and not isnull( event ) ){ |
| | | startdate := startDate_i; |
| | |
| | | //修改旧事件的间隔 |
| | | nrOfOccurrences_i := enddate - startdate + 1; |
| | | startDate_i := startdate; |
| | | endDate_i := startdate; |
| | | endDate_i := ( event.LeadingParticipation().EndDate() - event.LeadingParticipation().StartDate() + startDate_i ); |
| | | periodStartDate_i := startdate; |
| | | periodEndDate_i := enddate; |
| | | // info( startDate_i, startTimeOfDay_i, endDate_i, endTimeOfDay_i, isAllDay_i, recurrenceInterval_i, patternType_i |
| | |
| | | if( not isnull( event ) ){ |
| | | event.EventType( relset, eventtype_i ); |
| | | } |
| | | |
| | | if( ismultiple ){ |
| | | event.IsMultiple( ismultiple ); |
| | | } |
| | | return event; |
| | | *] |
| | | } |