From 1aa50242db4bd962c4bbf68e7f8eb8c003bbde9a Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期三, 29 五月 2024 17:43:12 +0800
Subject: [PATCH] 日历不可用事件界面产线筛选

---
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
index 58fb472..61af153 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -22,15 +22,17 @@
     traverse( subscribers, Elements, subscriber ){
     //  info( '------------------------', subscriber.CalendarID(), subscriber.CalendarType() );
     //  traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation ){
-      traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory().Name() = 'Unavailable' ){
+      traverse( subscriber,Participation.astype( LibCal_Subscription ).LeadingParticipation, participation, participation.Event().EventCategory() = category ){
     //    info( '------------------------', participation.Event().Subject(), '------', participation.Event().EventCategory().Name() );
         event := participation.Event();
         row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() and row.Event() = event.Subject() and row.EventType() = event.EventType() );
         if( isnull( row ) ){
           row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), Event := event.Subject(), EventType := event.EventType() );
           
-          subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() );
-          row.LibCal_SubscriberEventCell( relinsert, subscribercell );
+          if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) = 1 ){
+            subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() );
+            row.LibCal_SubscriberEventCell( relinsert, subscribercell );
+          }
           
           eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() );
           row.LibCal_SubscriberEventCell( relinsert, eventcell );
@@ -39,7 +41,7 @@
     
         endTime     := participation.EndDate().DateTime( timezone ).AddAsPeriod( timezone, event.EndTimeOfDay() );
         startTime   := participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() );
-    //    info( participation.StartDate().DateTime( timezone ).AddAsPeriod( timezone, event.StartTimeOfDay() ), endTime );
+    //    info( this.ID(), startTime, endTime );
         if( this.ID() = 'Day' ){
           this.InitializeDay( this, row, startTime, endTime );
         }else if( this.ID() = 'Week' ){

--
Gitblit v1.9.3