|  |  |  | 
|---|
|  |  |  | // Event and LeadingParticipation | 
|---|
|  |  |  | subject        := edtName.Text(); | 
|---|
|  |  |  | description    := edtDescription.Text(); | 
|---|
|  |  |  | eventTypeList  := ddlEventType.Data(); | 
|---|
|  |  |  | category       := sEvent.EventCategory(); | 
|---|
|  |  |  | isDefault      := ckbApplyToNewResources.Checked(); | 
|---|
|  |  |  | startDate      := dsStartDate.Date(); | 
|---|
|  |  |  | startTimeOfDay := durStartTimeOfDay.Duration(); | 
|---|
|  |  |  | endDate        := dsStartDate.Date(); | 
|---|
|  |  |  | endDate        := dsEndDate.Date(); | 
|---|
|  |  |  | endTimeOfDay   := durEndTimeOfDay.Duration(); | 
|---|
|  |  |  | isAllDay       := false; | 
|---|
|  |  |  | isAllDay       := ckbIsAllDay.Checked(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | eventType := ddslType.Text(); | 
|---|
|  |  |  | capacity  := Real::MinReal();  // Always fill the capacity. | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // RecurrencePattern | 
|---|
|  |  |  | isRecurring        := false; | 
|---|
|  |  |  | isRecurring        := true; | 
|---|
|  |  |  | recurrenceInterval := 1; | 
|---|
|  |  |  | patternType        := LibCal_RecurrencePeriod::TYPE_WITHOUTEND(); | 
|---|
|  |  |  | patternType        := LibCal_RecurrencePattern::TYPE_DAILY(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // Daily | 
|---|
|  |  |  | daily_IsEveryWeekday := false; | 
|---|
|  |  |  | 
|---|
|  |  |  | yearly_DayOfWeek   := ''; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // RecurrencePeriod | 
|---|
|  |  |  | periodType      := LibCal_RecurrencePeriod::TYPE_WITHOUTEND(); | 
|---|
|  |  |  | periodStartDate := Date::MinDate(); | 
|---|
|  |  |  | periodEndDate   := Date::MinDate(); | 
|---|
|  |  |  | nrOfOccurrences := 0; | 
|---|
|  |  |  | periodType      := LibCal_RecurrencePeriod::TYPE_NROFOCCURRENCES(); | 
|---|
|  |  |  | periodStartDate := dsStartDate.Date(); | 
|---|
|  |  |  | periodEndDate   := startDate + 1; | 
|---|
|  |  |  | nrOfOccurrences := 1; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 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, capacity, category, isDefault, | 
|---|
|  |  |  | subject, description, eventType, eventTypeList, capacity, category, isDefault, | 
|---|
|  |  |  | startDate, startTimeOfDay, endDate, endTimeOfDay, isAllDay, | 
|---|
|  |  |  | // RecurrencePattern | 
|---|
|  |  |  | isRecurring, recurrenceInterval, patternType, | 
|---|
|  |  |  | 
|---|
|  |  |  | // RecurrencePeriod | 
|---|
|  |  |  | periodType, periodStartDate, nrOfOccurrences, periodEndDate, | 
|---|
|  |  |  | // Subscribers | 
|---|
|  |  |  | dhSubscribers.Data() ); | 
|---|
|  |  |  | dhSubscribers.Data(), true ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return event; | 
|---|
|  |  |  | *] | 
|---|