From de982da373b3a8df0f1d6f28263fa591403e39d0 Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期三, 12 六月 2024 14:41:07 +0800 Subject: [PATCH] 日历不可用时间表修改 --- _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl index f9cfed4..e543a38 100644 --- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl +++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl @@ -21,21 +21,25 @@ column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() ); } - if( startTime.StartOfNextWeek() > endtime ){ - duration := endtime - startTime; - cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() - , Start := startTime.Format( 'M/D/Y H:m' ) - , End := endtime.Format( 'M/D/Y H:m' ) - , Description := desc ); - row.LibCal_SubscriberEventCell( relinsert, cell ); - }else{ - duration := startTime.StartOfNextWeek() - startTime; - cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() - , Start := startTime.Format( 'M/D/Y H:m' ) - , End := startTime.StartOfNextWeek().Format( 'M/D/Y H:m' ) - , Description := desc ); + cell := selectobject( column, LibCal_SubscriberEventCell, cell, cell.LibCal_SubscriberEventRow() = row ); + if( isnull( cell ) ){ + cell := column.LibCal_SubscriberEventCell( relnew, Value := '0' + , Description := desc ); row.LibCal_SubscriberEventCell( relinsert, cell ); } + + value := [Real]cell.Value(); + if( startTime.StartOfNextWeek() > endtime ){ + duration := endtime - startTime; + value := value + duration.HoursAsReal(); + cell.Period( relnew, Start := startTime.Format( 'M/D/Y H:m' ), End := endtime.Format( 'M/D/Y H:m' ) ); + }else{ + duration := startTime.StartOfNextWeek() - startTime; + value := value + duration.HoursAsReal(); + cell.Period( relnew, Start := startTime.Format( 'M/D/Y H:m' ), End := startTime.StartOfNextWeek().Format( 'M/D/Y H:m' ) ); + } + cell.Value( [String]value ); + // info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); } *] -- Gitblit v1.9.3