From 77cf30d295eabf2d989fce16e189b23083ceeb43 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 30 七月 2024 10:29:10 +0800
Subject: [PATCH] 日历不可用事件查询不生效

---
 /dev/null                                                                                                                   |   26 -------------
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged#298.def         |   16 ++++++++
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_ListCalendarEventTypes_OnCheckedChanged#599.def |   16 ++++++++
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl                                                        |    4 +-
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_cmSubscribers.def                              |   14 -------
 5 files changed, 34 insertions(+), 42 deletions(-)

diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
index 0df1514..1c22d42 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -16,13 +16,13 @@
         
         row := selectobject( this, LibCal_SubscriberEventRow, row, row.Subscriber() = subscriber.CalendarID() 
                              and row.Event() = event.Subject() 
-                             and row.EventType() = event.EventType().Name() 
+                             and row.EventType() = guard( event.EventType().Name(), '' )
                              );
         
         if( isnull( row ) ){
           row := this.LibCal_SubscriberEventRow( relnew, RowNr := rownr, Subscriber := subscriber.CalendarID(), 
                                                  Event := event.Subject(), 
-                                                 EventType := event.EventType().Name() );
+                                                 EventType := guard( event.EventType().Name(), '' ) );
           
           rownr := rownr + 1;
         }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_cmSubscribers.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_cmSubscribers.def
index d4f0c9a..b4c190c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_cmSubscribers.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_cmSubscribers.def
@@ -3,20 +3,6 @@
 {
   #keys: '[415136.0.666211729]'
   BaseType: 'listContextMenu'
-  Children:
-  [
-    Component mnDelete
-    {
-      #keys: '[415136.0.666211730]'
-      BaseType: 'WebMenu'
-      Properties:
-      [
-        Image: 'DELETE'
-        Taborder: 3
-        Title: 'Delete'
-      ]
-    }
-  ]
   Properties:
   [
     Taborder: 0
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_ListCalendarEventTypes_OnCheckedChanged\043599.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_ListCalendarEventTypes_OnCheckedChanged\043599.def"
new file mode 100644
index 0000000..0c0e8db
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_ListCalendarEventTypes_OnCheckedChanged\043599.def"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: ListCalendarEventTypes
+Response OnCheckedChanged () id:Response_ListCalendarEventTypes_OnCheckedChanged_599
+{
+  #keys: '[415136.0.954507945]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnCheckedChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      dhEventTypes.Data().Flush();
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged\043298.def" "b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged\043298.def"
new file mode 100644
index 0000000..f0c193b
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnCheckedChanged\043298.def"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: lstSubscribers
+Response OnCheckedChanged () id:Response_lstSubscribers_OnCheckedChanged_298
+{
+  #keys: '[415136.0.953871349]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebList_OnCheckedChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      dhSubscribers.Data().Flush();
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnSelectionChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnSelectionChanged.def
deleted file mode 100644
index b5a2634..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_OnSelectionChanged.def
+++ /dev/null
@@ -1,32 +0,0 @@
-Quintiq file version 2.0
-#parent: lstSubscribers
-Response OnSelectionChanged (
-  LibCal_Calendar selection
-) id:Response_lstSubscribers_OnSelectionChanged
-{
-  #keys: '[415136.0.666211719]'
-  CanBindMultiple: false
-  DefinitionID: 'Responsedef_WebList_OnSelectionChanged'
-  QuillAction
-  {
-    Body:
-    [*
-      // Initialize the list by setting the checkmark for the subscribing calendars when this has not been done before.
-      // This should only be done when OnSelectionChanged is executed for the first time.
-      //if( lblIsInitialized.Text() = "false" )
-      //{
-      //  // Get the calendars of the subscriptions.
-      //  calendars := selectset( dhEvent.Data(), LeadingParticipation.Subscription.Calendar, calendar, true, true ).Unique();
-      //  
-      //  traverse( calendars, Elements, subscriber )
-      //  {
-      //    lstSubscribers.ExtendCheckByKey( subscriber.Key() );
-      //  }
-      //    
-      //  // Register that the list has been initialized.
-      //  lblIsInitialized.Text( "true" );
-      //}
-    *]
-    GroupServerCalls: false
-  }
-}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_mnDelete_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_mnDelete_OnClick.def
deleted file mode 100644
index 5849adc..0000000
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Response_lstSubscribers_mnDelete_OnClick.def
+++ /dev/null
@@ -1,26 +0,0 @@
-Quintiq file version 2.0
-#parent: lstSubscribers
-Response OnClick (
-  structured[LibCal_Subscription] selection
-) id:Response_lstSubscribers_mnDelete_OnClick
-{
-  #keys: '[415136.0.666211722]'
-  CanBindMultiple: false
-  DefinitionID => /lstSubscribers/Responsedef_lstSubscribers_WebMenu_OnClick
-  Initiator: 'mnDelete'
-  QuillAction
-  {
-    Body:
-    [*
-      traverse( selection, Elements, e ){
-        leadingP := e.LeadingParticipation();
-        if( leadingP.Subscription( relsize ) > 0 ){
-          leadingP.Event().Delete();
-          leadingP.Delete();
-        }
-        e.Delete();
-      }
-    *]
-    GroupServerCalls: false
-  }
-}

--
Gitblit v1.9.3