From 7ba9073f61f44b41b941ab6ee732d02b47b988f4 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期四, 30 五月 2024 18:11:41 +0800
Subject: [PATCH] 日历不可用事件界面完成

---
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
index d1da787..f9cfed4 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeWeek.qbl
@@ -4,7 +4,8 @@
   LibCal_SubscriberEventTable table,
   LibCal_SubscriberEventRow row,
   DateTime starttime,
-  DateTime endtime
+  DateTime endtime,
+  String desc
 )
 {
   TextBody:
@@ -20,13 +21,22 @@
         column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() );
       }
       
-      duration := startTime.StartOfNextWeek() - startTime;
       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 );
+        row.LibCal_SubscriberEventCell( relinsert, cell );
       }
     //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() );
-      cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() );
-      row.LibCal_SubscriberEventCell( relinsert, cell );
     }
   *]
 }

--
Gitblit v1.9.3