lazhen
2024-07-23 887dd485907fb75b76465de86dff57eeccd9fb04
_Main/BL/Type_LibCal_Event/StaticMethod_CreateUpdateFromUI.qbl
@@ -45,9 +45,15 @@
    //      , 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;
@@ -69,7 +75,7 @@
      //修改旧事件的间隔
      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
@@ -102,7 +108,9 @@
    if( not isnull( event ) ){
      event.EventType( relset, eventtype_i );
    }
    if( ismultiple ){
      event.IsMultiple( ismultiple );
    }
    return event;
  *]
}