From 13d934438d09c738c7806f89205d409fa735adb7 Mon Sep 17 00:00:00 2001
From: lazhen <17772815105@139.com>
Date: 星期二, 23 七月 2024 13:45:38 +0800
Subject: [PATCH] 日历不可用事件界面调整

---
 _Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def |    2 +-
 _Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Name.qbl                                         |    8 ++++++++
 _Main/BL/Type_LibCal_SubscriberEventRow/Function_CalcName.qbl                                      |   13 +++++++++++++
 _Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl                               |   32 ++++++++++++++++----------------
 4 files changed, 38 insertions(+), 17 deletions(-)

diff --git a/_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Name.qbl b/_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Name.qbl
new file mode 100644
index 0000000..5a246b9
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventRow/Attribute_Name.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[415136.0.918010439][415136.0.918010438][415136.0.918010440]'
+  Description: '浜х嚎In浜嬩欢'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventRow/Function_CalcName.qbl b/_Main/BL/Type_LibCal_SubscriberEventRow/Function_CalcName.qbl
new file mode 100644
index 0000000..f027aba
--- /dev/null
+++ b/_Main/BL/Type_LibCal_SubscriberEventRow/Function_CalcName.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcName
+{
+  TextBody:
+  [*
+    // 鐢勫叞楦� Jul-23-2024 (created)
+    
+    value := this.Subscriber().Concat( " in " ).Concat( this.Event() );
+    
+    this.Name( value );
+  *]
+}
diff --git a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
index 14023ce..e3cd1e0 100644
--- a/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
+++ b/_Main/BL/Type_LibCal_SubscriberEventTable/Method_InitializeTable.qbl
@@ -8,14 +8,14 @@
   [*
     // 鐢勫叞楦� May-28-2024 (created)
     rownr                 := this.LibCal_SubscriberEventRow( relsize );
-    subscribercolumn      := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Line' );
-    if( isnull( subscribercolumn ) ){
-      subscribercolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Line' );
-    }
-    eventcolumn := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Event' );
-    if( isnull( eventcolumn ) ){
-      eventcolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Event' );
-    }
+    //subscribercolumn      := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Line' );
+    //if( isnull( subscribercolumn ) ){
+    //  subscribercolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Line' );
+    //}
+    //eventcolumn := selectobject( this, LibCal_SubscriberEventColumn, column, column.RowName() = 'Event' );
+    //if( isnull( eventcolumn ) ){
+    //  eventcolumn := this.LibCal_SubscriberEventColumn( relnew, RowName := 'Event' );
+    //}
     
     traverse( subscribers, Elements, subscriber ){
     //  info( '------------------------', subscriber.CalendarID(), subscriber.CalendarType() );
@@ -34,14 +34,14 @@
                                                  Event := event.Subject(), 
                                                  EventType := event.EventType().Name() );
           
-          subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() );
-          if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) <> 1 ){
-            subscribercell.Value( '' );
-          }
-          row.LibCal_SubscriberEventCell( relinsert, subscribercell );
-          
-          eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() );
-          row.LibCal_SubscriberEventCell( relinsert, eventcell );
+    //      subscribercell := subscribercolumn.LibCal_SubscriberEventCell( relnew, Value := row.Subscriber() );
+    //      if( counter( this, LibCal_SubscriberEventRow, linerow, linerow.Subscriber() = row.Subscriber() ) <> 1 ){
+    //        subscribercell.Value( '' );
+    //      }
+    //      row.LibCal_SubscriberEventCell( relinsert, subscribercell );
+    //      
+    //      eventcell := eventcolumn.LibCal_SubscriberEventCell( relnew, Value := row.Event() );
+    //      row.LibCal_SubscriberEventCell( relinsert, eventcell );
           rownr := rownr + 1;
         }
         
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
index 8b3cfbe..4612e07 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormCalendarUnavailableEvent/Component_MatrixEditorTable.def
@@ -55,7 +55,7 @@
       ]
       Properties:
       [
-        Legend: 'RowNr'
+        Legend: 'Name'
         SortCriteria: 'RowNr'
         Taborder: 1
       ]

--
Gitblit v1.9.3