xiaoding721
2024-05-27 7f68c5b2e96c6707be1589ff8b5fbdcdab53f412
_Main/UI/MacroPlannerWebApp/Component_LibCal_dlgMultipleEvent/Method_CreateUpdateEventAndParticipation.def
对比新文件
@@ -0,0 +1,76 @@
Quintiq file version 2.0
#parent: #root
Method CreateUpdateEventAndParticipation () as LibCal_Event id:Method_LibCal_dlgMultipleEvent_CreateUpdateEventAndParticipation
{
  #keys: '[415136.0.649421703]'
  Body:
  [*
    sEvent    := dhEvent.Data();
    sLeadPart := dhLeadingParticipation.Data();
    // Get the values from the controls.
    // Event and LeadingParticipation
    subject        := edtName.Text();
    description    := edtDescription.Text();
    eventTypeList  := edtEventType.Text();
    category       := sEvent.EventCategory();
    isDefault      := ckbApplyToNewResources.Checked();
    startDate      := dsStartDate.Date();
    startTimeOfDay := durStartTimeOfDay.Duration();
    endDate        := dsStartDate.Date();
    endTimeOfDay   := durEndTimeOfDay.Duration();
    isAllDay       := false;
    eventType := ddslType.Text();
    capacity  := Real::MinReal();  // Always fill the capacity.
    // RecurrencePattern
    isRecurring        := false;
    recurrenceInterval := 1;
    patternType        := LibCal_RecurrencePeriod::TYPE_WITHOUTEND();
    // Daily
    daily_IsEveryWeekday := false;
    // Weekly
    weekly_Weekdays := "";
    // Monthly
    monthly_IsDay       := false;
    monthly_Day         := 0;
    monthly_WeekOfMonth := '';
    monthly_DayOfWeek   := '';
    // Yearly
    yearly_IsDate      := false;
    //month              := '';
    yearly_Month       := 0;
    yearly_Day         := 0;
    yearly_WeekOfMonth := '';
    yearly_DayOfWeek   := '';
    // RecurrencePeriod
    periodType      := LibCal_RecurrencePeriod::TYPE_WITHOUTEND();
    periodStartDate := Date::MinDate();
    periodEndDate   := Date::MinDate();
    nrOfOccurrences := 0;
    // All values are passed to the Server, only the relevant values are used there.
    event := LibCal_Event::CreateUpdateFromUI( sEvent.Calendar(), sLeadPart.WrappedInstance(),
                                               subject, description, eventType, eventTypeList, capacity, category, isDefault,
                                               startDate, startTimeOfDay, endDate, endTimeOfDay, isAllDay,
                                               // RecurrencePattern
                                               isRecurring, recurrenceInterval, patternType,
                                               daily_IsEveryWeekday,
                                               weekly_Weekdays,
                                               monthly_IsDay, monthly_Day,  monthly_WeekOfMonth, monthly_DayOfWeek,
                                               yearly_IsDate, yearly_Month, yearly_Day, yearly_WeekOfMonth, yearly_DayOfWeek,
                                               // RecurrencePeriod
                                               periodType, periodStartDate, nrOfOccurrences, periodEndDate,
                                               // Subscribers
                                               dhSubscribers.Data() );
    return event;
  *]
}