Quintiq file version 2.0
#parent: #root
Method GetRecurrenceInterval () as Number id:Method_LibCal_dlgEvent_GetRecurrenceInterval
{
  #keys: '[146730.0.1659844605]'
  Body:
  [*
    interval    := 1;
    patternType := this.GetPatternType();
    
    if( patternType = LibCal_RecurrencePattern::TYPE_DAILY() )
    {
      interval := [Number]edtEveryNrOfDays.Text();
    }
    else if( patternType = LibCal_RecurrencePattern::TYPE_WEEKLY() )
    {
      interval := [Number]edtEveryNrOfWeeks.Text();
    }
    else if( patternType = LibCal_RecurrencePattern::TYPE_MONTHLY() )
    {
      interval := ifexpr( ckbMonthlyDay.Checked(), [Number]edtMonthlyDayEveryNrOfMonths.Text(),
                                                   [Number]edtMonthlyPatternEveryNrOfMonths.Text() );
    }
    else if( patternType = LibCal_RecurrencePattern::TYPE_YEARLY() )
    {
      interval := [Number]edtEveryNrOfYears.Text();
    }
    
    return interval;
  *]
}
