From 7d1851c05553b46b81a647c0fd207a3b91973b64 Mon Sep 17 00:00:00 2001
From: lihongji <3117313295@qq.com>
Date: 星期四, 16 五月 2024 22:32:02 +0800
Subject: [PATCH] 发动机匹配导入导出

---
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_OnOK.def                                                                               |    6 
 _Main/BL/InfoMessages.qbl                                                                                                                                          |   42 +
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadDateTime.qbl                                                                                   |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataColumn/_ROOT_Type_GeneralExcelImportAndExportDataColumn.qbl                                                           |    9 
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Response_List1_MenuDelete_OnClick.def                                                                       |   15 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Component_pnlContent.def                                                                        |   78 ++
 _Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def                                                                                |   20 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Response_pnlActions_btnOk_OnClick.def                                                         |   10 
 _Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_ColumnIndex.qbl                                                                                      |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_FileBinaryValue.qbl                                                                                  |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataColumn/Function_CalcColumnIndex.qbl                                                                                   |   13 
 _Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bExport_OnClick.def                                                                                 |   10 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlActions_btnOk_OnClick.def                                                           |   17 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_column.qbl                                     |   17 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_Edit.def                                                                                 |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/_ROOT_Component_DialogCreateEditThreeDigitCode.def                                            |   10 
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_IsXLSX.qbl                                                                                           |    7 
 _Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bExport_OnClick.def                                                                    |   10 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_column.qbl                                            |   27 +
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataSource_Archive_Archive_GeneralExcelI.qbl                                                                |   23 
 _Main/BL/Type_ThreeDigitCode/StaticMethod_Upload.qbl                                                                                                               |   46 +
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDat.qbl                                                                |   26 +
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swBottom.def                                                                                      |   20 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_QuintiqType.qbl                                        |    7 
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/_ROOT_Component_frmStandardAnalysis857.def                                                                  |   18 
 _Main/BL/Type_SixDigitCode/StaticMethod_Download.qbl                                                                                                               |   48 ++
 _Main/BL/Type_ThreeDigitCode/StaticMethod_Download.qbl                                                                                                             |   34 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Component_pnlContent.def                                                                      |   24 
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTop.def                                                                                         |   29 +
 _Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bImport_OnClick.def                                                                    |   33 +
 _Main/BL/Type_GeneralExcelImportAndExportDataRow/Attribute_RowNr.qbl                                                                                               |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/Method_SyncRows.qbl                                                                                             |   39 +
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_Name.qbl                                                                                             |    7 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_Edit.def                                                                               |    4 
 _Main/UI/MacroPlannerWebApp/Component_FormPR_PP_Budget/Response_pHeader_bImport_OnClick.def                                                                        |   33 +
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/Attribute_Name.qbl                                                                                              |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_table.qbl                                      |   27 +
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/StaticMethod_Upload.qbl                                                                                        |   22 
 _Main/BL/Type_GeneralExcelImportAndExportDataCell/Attribute_Value.qbl                                                                                              |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_Name.qbl                                                                                             |    7 
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_List1.def                                                                                         |   46 +
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/_ROOT_Type_GeneralExcelImportAndExportDataSource.qbl                                                           |    9 
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor#456.qbl                                                                |   23 
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Method_ReadStructure.qbl                                                                                       |   26 +
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_OnOK.def                                                                                 |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadUser.qbl                                                                                       |    7 
 _Main/BL/Type_GeneralExcelImportAndExportDataRow/_ROOT_Type_GeneralExcelImportAndExportDataRow.qbl                                                                 |    9 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlEnginePartNumber_OnSelectionChanged#537.def                              |   16 
 _Main/BL/Type_SixDigitCode/StaticMethod_Upload.qbl                                                                                                                 |   59 ++
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/_ROOT_Type_GeneralExcelImportAndExportDataTable.qbl                                                             |    9 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_Key.qbl                                                |    7 
 _Main/BL/Type_PR_PP_Budget/StaticMethod_Upload.qbl                                                                                                                 |   57 ++
 _Main/BL/Type_ThreeDigitCode/StaticMethod_ValidateInput.qbl                                                                                                        |   33 +
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_table.qbl                                             |   27 +
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_Key.qbl                                         |    7 
 _Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTopMost.def                                                                                     |   30 +
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_QuintiqType.qbl                                 |    7 
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDa.qbl                                                                |   26 +
 _Main/BL/Type_GeneralExcelImportAndExportDataCell/_ROOT_Type_GeneralExcelImportAndExportDataCell.qbl                                                               |    9 
 _Main/BL/Type_SixDigitCode/StaticMethod_ValidateInput.qbl                                                                                                          |   45 +
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/_ROOT_XML_GeneralExcelImportAndExportDataTableXMLHeaders.qbl |    8 
 _Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bImport_OnClick.def                                                                                 |   33 +
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor#716.qbl                                                                |   23 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlVehicleModel_OnSelectionChanged#640.def                                  |   16 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/_ROOT_XML_GeneralExcelImportAndExportDataTableXML.qbl               |    8 
 _Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/_ROOT_Component_DialogCreateEditSixDigitCode.def                                                |   10 
 _Main/BL/Relations/Relation_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataC.qbl                                                                |   23 
 _Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_cell.qbl                                              |   17 
 _Main/BL/Type_Archive/StaticMethod_VerifyTheFileName.qbl                                                                                                           |   17 
 69 files changed, 1,373 insertions(+), 28 deletions(-)

diff --git a/_Main/BL/InfoMessages.qbl b/_Main/BL/InfoMessages.qbl
index 220018c..7e07cdc 100644
--- a/_Main/BL/InfoMessages.qbl
+++ b/_Main/BL/InfoMessages.qbl
@@ -2,6 +2,14 @@
 #parent: #root
 InfoMessages id:#InfoMessages #extension
 {
+  InfoMessage A_VWED_GeneralExcelImportAndExportDataSource_UploadError1
+  {
+    DefaultText: 'Please upload a file in the format xlsx or xls'
+  }
+  InfoMessage A_VWED_GeneralExcelImportAndExportDataSource_UploadError2
+  {
+    DefaultText: 'File name mismatch'
+  }
   InfoMessage A_VWED_PR_PP_Budget_VerificationRules1 (
     const String fieldName
   )
@@ -40,4 +48,38 @@
   {
     DefaultText: 'The vehicle model, engine part number, and existing data do not match'
   }
+  InfoMessage A_VWED_SixDigitCode_Code
+  {
+    DefaultText: 'Code'
+  }
+  InfoMessage A_VWED_SixDigitCode_Curve
+  {
+    DefaultText: 'Curve'
+  }
+  InfoMessage A_VWED_SixDigitCode_VerificationRules1 (
+    constcontent String fieldName
+  )
+  {
+    DefaultText: 'Missing mandatory field锛欯fieldName@'
+  }
+  InfoMessage A_VWED_SixDigitCode_VerificationRules2
+  {
+    DefaultText: 'There are duplicate six digit codes present'
+  }
+  InfoMessage A_VWED_SixDigitCode_VerificationRules3
+  {
+    DefaultText: 'Inconsistent model and system Sales Segments'
+  }
+  InfoMessage A_VWED_SixDigitCode_VerificationRules4
+  {
+    DefaultText: 'The engine part number is inconsistent with the system Products'
+  }
+  InfoMessage A_VWED_Success
+  {
+    DefaultText: 'Success'
+  }
+  InfoMessage A_VWED_ThreeDigitCode_VerificationRules2
+  {
+    DefaultText: 'There are duplicate three digit codes present'
+  }
 }
diff --git a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDa.qbl b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDa.qbl
new file mode 100644
index 0000000..6d9433b
--- /dev/null
+++ b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDa.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDataCell_GeneralExcelImportAndExportDataCell_GeneralExcelImportAndExportDataColumn
+{
+  #keys: '1[413988.0.1161870213]'
+  ProceduralSequenceRelationStrategy
+  {
+    #keys: '13[0.0.0][413988.0.1161870232][413988.0.1161870226][413988.0.1161870233][413988.0.1161870227][413988.0.1161870234][413988.0.1161870228][413988.0.1161870235][413988.0.1161870229][413988.0.1161870236][413988.0.1161870230][413988.0.1161870237][413988.0.1161870231]'
+    SequenceElementSuffix: 'CellInColumn'
+    SequenceSuffix: 'CellInColumn'
+  }
+  RelationSide.LeftSide GeneralExcelImportAndExportDataCell
+  {
+    #keys: '3[413988.0.1161870215][413988.0.1161870214][413988.0.1161870216]'
+    Cardinality: '1toN'
+    ObjectDefinition: GeneralExcelImportAndExportDataColumn
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataColumn
+  {
+    #keys: '3[413988.0.1161870218][413988.0.1161870217][413988.0.1161870219]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataCell
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataC.qbl b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataC.qbl
new file mode 100644
index 0000000..d501221
--- /dev/null
+++ b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataC.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataCell_GeneralExcelImportAndExportDataCell_GeneralExcelImportAndExportDataRow
+{
+  #keys: '1[413988.0.1161870263]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide GeneralExcelImportAndExportDataCell
+  {
+    #keys: '3[413988.0.1161870265][413988.0.1161870264][413988.0.1161870266]'
+    Cardinality: '1toN'
+    ObjectDefinition: GeneralExcelImportAndExportDataRow
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataRow
+  {
+    #keys: '3[413988.0.1161870268][413988.0.1161870267][413988.0.1161870269]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataCell
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataSource_Archive_Archive_GeneralExcelI.qbl b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataSource_Archive_Archive_GeneralExcelI.qbl
new file mode 100644
index 0000000..7f5ef9c
--- /dev/null
+++ b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataSource_Archive_Archive_GeneralExcelI.qbl
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataSource_Archive_Archive_GeneralExcelImportAndExportDataSource
+{
+  #keys: '1[413988.0.1161870117]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide Archive
+  {
+    #keys: '3[413988.0.1161870119][413988.0.1161870118][413988.0.1161870120]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataSource
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataSource
+  {
+    #keys: '3[413988.0.1161870122][413988.0.1161870121][413988.0.1161870123]'
+    Cardinality: '1toN'
+    ObjectDefinition: Archive
+    OwningSide: 'Owned'
+  }
+}
diff --git "a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043456.qbl" "b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043456.qbl"
new file mode 100644
index 0000000..657618c
--- /dev/null
+++ "b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043456.qbl"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDataSource_GeneralExcelImportAndExportDataSource_GeneralExcelImportAndExportDataTable
+{
+  #keys: '1[413988.0.1161910094]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide GeneralExcelImportAndExportDataSource
+  {
+    #keys: '3[413988.0.1161910096][413988.0.1161910095][413988.0.1161910097]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataTable
+    OwningSide: 'Reference'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataTable
+  {
+    #keys: '3[413988.0.1161910099][413988.0.1161910098][413988.0.1161910100]'
+    Cardinality: '1toN'
+    ObjectDefinition: GeneralExcelImportAndExportDataSource
+    OwningSide: 'Owned'
+  }
+}
diff --git "a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043716.qbl" "b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043716.qbl"
new file mode 100644
index 0000000..2d16dc3
--- /dev/null
+++ "b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExpor\043716.qbl"
@@ -0,0 +1,23 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataRow_GeneralExcelImportAndExportDataTable
+{
+  #keys: '1[413988.0.1161910076]'
+  DefaultRelationStrategy
+  {
+  }
+  RelationSide.LeftSide GeneralExcelImportAndExportDataRow
+  {
+    #keys: '3[413988.0.1161910078][413988.0.1161910077][413988.0.1161910079]'
+    Cardinality: '1toN'
+    ObjectDefinition: GeneralExcelImportAndExportDataTable
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataTable
+  {
+    #keys: '3[413988.0.1161910081][413988.0.1161910080][413988.0.1161910082]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataRow
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDat.qbl b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDat.qbl
new file mode 100644
index 0000000..7c76088
--- /dev/null
+++ b/_Main/BL/Relations/Relation_GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDat.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Relation GeneralExcelImportAndExportDataTable_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDataColumn_GeneralExcelImportAndExportDataTable
+{
+  #keys: '1[413988.0.1161910041]'
+  ProceduralSequenceRelationStrategy
+  {
+    #keys: '13[0.0.0][413988.0.1161910060][413988.0.1161910054][413988.0.1161910061][413988.0.1161910055][413988.0.1161910062][413988.0.1161910056][413988.0.1161910063][413988.0.1161910057][413988.0.1161910064][413988.0.1161910058][413988.0.1161910065][413988.0.1161910059]'
+    SequenceElementSuffix: 'Column'
+    SequenceSuffix: 'Column'
+  }
+  RelationSide.LeftSide GeneralExcelImportAndExportDataColumn
+  {
+    #keys: '3[413988.0.1161910043][413988.0.1161910042][413988.0.1161910044]'
+    Cardinality: '1toN'
+    ObjectDefinition: GeneralExcelImportAndExportDataTable
+    OwningSide: 'Owned'
+  }
+  RelationSide.RightSide GeneralExcelImportAndExportDataTable
+  {
+    #keys: '3[413988.0.1161910046][413988.0.1161910045][413988.0.1161910047]'
+    Cardinality: '0to1'
+    ObjectDefinition: GeneralExcelImportAndExportDataColumn
+    OwningSide: 'Reference'
+  }
+}
diff --git a/_Main/BL/Type_Archive/StaticMethod_VerifyTheFileName.qbl b/_Main/BL/Type_Archive/StaticMethod_VerifyTheFileName.qbl
new file mode 100644
index 0000000..b993a9a
--- /dev/null
+++ b/_Main/BL/Type_Archive/StaticMethod_VerifyTheFileName.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod VerifyTheFileName (
+  JSON uploadJson
+)
+{
+  TextBody:
+  [*
+    fileNames := uploadJson.Get( "name" ).GetString().Tokenize( "." );
+    
+    fileNameSuffix := fileNames.Element( fileNames.Size() - 1 );
+    
+    if ( fileNameSuffix <> "xlsx" and fileNameSuffix <> "xls" ) {
+      error( Translations::A_VWED_GeneralExcelImportAndExportDataSource_UploadError1() );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataCell/Attribute_Value.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataCell/Attribute_Value.qbl
new file mode 100644
index 0000000..575c4a7
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataCell/Attribute_Value.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Value
+{
+  #keys: '3[413988.0.1161870283][413988.0.1161870282][413988.0.1161870284]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataCell/_ROOT_Type_GeneralExcelImportAndExportDataCell.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataCell/_ROOT_Type_GeneralExcelImportAndExportDataCell.qbl
new file mode 100644
index 0000000..3b0e09b
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataCell/_ROOT_Type_GeneralExcelImportAndExportDataCell.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type GeneralExcelImportAndExportDataCell
+{
+  #keys: '5[413988.0.1161910028][413988.0.1161910026][0.0.0][413988.0.1161910027][413988.0.1161910029]'
+  BaseType: Object
+  StructuredName: 'GeneralExcelImportAndExportDataCells'
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_ColumnIndex.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_ColumnIndex.qbl
new file mode 100644
index 0000000..83665b5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_ColumnIndex.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute ColumnIndex
+{
+  #keys: '3[413988.0.1161870194][413988.0.1161870193][413988.0.1161870195]'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_Name.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_Name.qbl
new file mode 100644
index 0000000..250c94d
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[413988.0.1161870204][413988.0.1161870203][413988.0.1161870205]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Function_CalcColumnIndex.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Function_CalcColumnIndex.qbl
new file mode 100644
index 0000000..7dcda74
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/Function_CalcColumnIndex.qbl
@@ -0,0 +1,13 @@
+Quintiq file version 2.0
+#parent: #root
+Function CalcColumnIndex
+{
+  TextBody:
+  [*
+    // lihongji May-16-2024 (created)
+    
+    value := ifexpr( isnull( this.PreviousColumn() ), 0, this.PreviousColumn().ColumnIndex() + 1 );
+    
+    this.ColumnIndex( value );
+  *]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/_ROOT_Type_GeneralExcelImportAndExportDataColumn.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/_ROOT_Type_GeneralExcelImportAndExportDataColumn.qbl
new file mode 100644
index 0000000..458b155
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataColumn/_ROOT_Type_GeneralExcelImportAndExportDataColumn.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type GeneralExcelImportAndExportDataColumn
+{
+  #keys: '5[413988.0.1161910023][413988.0.1161910021][0.0.0][413988.0.1161910022][413988.0.1161910024]'
+  BaseType: Object
+  StructuredName: 'GeneralExcelImportAndExportDataColumns'
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataRow/Attribute_RowNr.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataRow/Attribute_RowNr.qbl
new file mode 100644
index 0000000..8006390
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataRow/Attribute_RowNr.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute RowNr
+{
+  #keys: '3[413988.0.1161870163][413988.0.1161870162][413988.0.1161870164]'
+  ValueType: Number
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataRow/_ROOT_Type_GeneralExcelImportAndExportDataRow.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataRow/_ROOT_Type_GeneralExcelImportAndExportDataRow.qbl
new file mode 100644
index 0000000..a3ff1b0
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataRow/_ROOT_Type_GeneralExcelImportAndExportDataRow.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type GeneralExcelImportAndExportDataRow
+{
+  #keys: '5[413988.0.1161910018][413988.0.1161910016][0.0.0][413988.0.1161910017][413988.0.1161910019]'
+  BaseType: Object
+  StructuredName: 'GeneralExcelImportAndExportDataRows'
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_FileBinaryValue.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_FileBinaryValue.qbl
new file mode 100644
index 0000000..f0860a5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_FileBinaryValue.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute FileBinaryValue
+{
+  #keys: '3[413988.0.1161870068][413988.0.1161870067][413988.0.1161870069]'
+  ValueType: BinaryValue
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_IsXLSX.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_IsXLSX.qbl
new file mode 100644
index 0000000..c1811af
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_IsXLSX.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute IsXLSX
+{
+  #keys: '3[413988.0.1161870078][413988.0.1161870077][413988.0.1161870079]'
+  ValueType: Boolean
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_Name.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_Name.qbl
new file mode 100644
index 0000000..150acba
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[413988.0.1161870088][413988.0.1161870087][413988.0.1161870089]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadDateTime.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadDateTime.qbl
new file mode 100644
index 0000000..94ace3b
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadDateTime.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UploadDateTime
+{
+  #keys: '3[413988.0.1161870098][413988.0.1161870097][413988.0.1161870099]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadUser.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadUser.qbl
new file mode 100644
index 0000000..4d762c5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Attribute_UploadUser.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute UploadUser
+{
+  #keys: '3[413988.0.1161870108][413988.0.1161870107][413988.0.1161870109]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Method_ReadStructure.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Method_ReadStructure.qbl
new file mode 100644
index 0000000..67e993b
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/Method_ReadStructure.qbl
@@ -0,0 +1,26 @@
+Quintiq file version 2.0
+#parent: #root
+Method ReadStructure
+{
+  TextBody:
+  [*
+    tableGroupHandle := TableGroupHandle::Create( this.Name() );
+    tableGroupHandle := XLS::LoadTableGroupFromBinaryData( this.FileBinaryValue().AsBinaryData(), tableGroupHandle, true, this.IsXLSX() );
+    sheets := tableGroupHandle.TableNames();
+    
+    traverse ( sheets, Elements, sheetName ) {
+      tableHandle := tableGroupHandle.Table( sheetName );
+      tableXML := TableHandle::ExportXML( tableHandle );
+      
+    //  info( tableXML.AsQUILL() );
+      
+      GeneralExcelImportAndExportDataTable::XMLImportGeneralExcelImportAndExportDataTableXMLHeaders( tableXML );
+      xlstable := GeneralExcelImportAndExportDataTable::XMLImportGeneralExcelImportAndExportDataTableXML( tableXML );
+      
+      xlstable.SyncRows();
+      
+      xlstable.Name( sheetName );
+      this.GeneralExcelImportAndExportDataTable( relinsert, &xlstable ); 
+    }
+  *]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/StaticMethod_Upload.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/StaticMethod_Upload.qbl
new file mode 100644
index 0000000..6b96d0f
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/StaticMethod_Upload.qbl
@@ -0,0 +1,22 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Upload (
+  Archive archive,
+  BinaryValue binaryValue,
+  String filePath
+) as GeneralExcelImportAndExportDataSource
+{
+  TextBody:
+  [*
+    fileName := filePath.Tokenize( "\" ).Element( filePath.Tokenize( "\" ).Size() - 1 );
+    
+    generalExcelImportAndExportDataSource := archive.GeneralExcelImportAndExportDataSource( relnew, 
+                                                                                            FileBinaryValue := binaryValue,
+                                                                                            Name            := fileName,
+                                                                                            IsXLSX          := fileName.EndsWith( "xlsx" ),
+                                                                                            UploadDateTime  := DateTime::ActualTime().Format( "Y-M2-D2 H:m:s" ),
+                                                                                            UploadUser      := guard( QuintiqUser::CurrentUser().Username(), "" ) );
+    
+    return generalExcelImportAndExportDataSource;
+  *]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataSource/_ROOT_Type_GeneralExcelImportAndExportDataSource.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/_ROOT_Type_GeneralExcelImportAndExportDataSource.qbl
new file mode 100644
index 0000000..b8c8bc5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataSource/_ROOT_Type_GeneralExcelImportAndExportDataSource.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type GeneralExcelImportAndExportDataSource
+{
+  #keys: '5[413988.0.1161870062][413988.0.1161870060][0.0.0][413988.0.1161870061][413988.0.1161870063]'
+  BaseType: Object
+  StructuredName: 'GeneralExcelImportAndExportDataSources'
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Attribute_Name.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Attribute_Name.qbl
new file mode 100644
index 0000000..06f5690
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Attribute_Name.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+Attribute Name
+{
+  #keys: '3[413988.0.1161910032][413988.0.1161910031][413988.0.1161910033]'
+  ValueType: String
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Method_SyncRows.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Method_SyncRows.qbl
new file mode 100644
index 0000000..b967bbc
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/Method_SyncRows.qbl
@@ -0,0 +1,39 @@
+Quintiq file version 2.0
+#parent: #root
+Method SyncRows
+{
+  TextBody:
+  [*
+    totalRows := 0;
+    totalColumns := this.GeneralExcelImportAndExportDataColumn( relsize );
+    
+    if ( totalColumns > 0 ) {
+      randomCol := select( this, GeneralExcelImportAndExportDataColumn, tempGEIAEDC, true );
+      totalRows := randomCol.GeneralExcelImportAndExportDataCell( relsize );
+      
+      this.GeneralExcelImportAndExportDataRow( relflush );
+      
+      cells := construct( GeneralExcelImportAndExportDataCells );
+      traverse ( this, GeneralExcelImportAndExportDataColumn, geiaedc ) {
+        cells.Add( geiaedc.FirstCellInColumn() );
+      }
+      
+      for ( i := 0; i < totalRows; i++ ) {
+        assert( selectvalues( cells, Elements, c, true, c.GeneralExcelImportAndExportDataColumn().ColumnIndex() ).ToString( "" ) = 
+                selectvalues( selectsortedset( cells, Elements, c, true, c.GeneralExcelImportAndExportDataColumn().ColumnIndex() ), Elements, c, true, c.GeneralExcelImportAndExportDataColumn().ColumnIndex() ).ToString( "" ),
+                "Assertion error in FrockDataTable::syncRows: Cells not sorted by column index" );
+        row := this.GeneralExcelImportAndExportDataRow( relnew, RowNr := i );
+        
+        newCells := construct( GeneralExcelImportAndExportDataCells );
+        
+        traverse ( cells, Elements, c ) {
+          row.GeneralExcelImportAndExportDataCell( relinsert, c );
+          
+          newCells.Add( c.NextCellInColumn() );
+        }
+        
+        cells := &newCells;
+      }
+    }
+  *]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_Key.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_Key.qbl
new file mode 100644
index 0000000..4f408a0
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_Key.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+XMLElementId
+{
+  XMLAddressType { }
+  XMLID Key { }
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_QuintiqType.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_QuintiqType.qbl
new file mode 100644
index 0000000..7468757
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLElementId_QuintiqType.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+XMLElementId
+{
+  XMLID QuintiqType { }
+  XMLQualifierType { }
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_cell.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_cell.qbl
new file mode 100644
index 0000000..062b41b
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_cell.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+XMLObjectBase.ObjectDefinitions
+{
+  IdField: Key
+  ObjectTypeField: QuintiqType
+  TargetType: GeneralExcelImportAndExportDataCell
+  XMLID cell { }
+  Attributes:
+  [
+    XMLAttribute
+    {
+      Attribute: Value
+      XMLID value { }
+    }
+  ]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_column.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_column.qbl
new file mode 100644
index 0000000..fe049a5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_column.qbl
@@ -0,0 +1,27 @@
+Quintiq file version 2.0
+#parent: #root
+XMLObjectBase.ObjectDefinitions
+{
+  IdField: Key
+  ObjectTypeField: QuintiqType
+  TargetType: GeneralExcelImportAndExportDataColumn
+  XMLID column { }
+  Aggregates:
+  [
+    XMLAggregate
+    {
+      ElementDefinition: cell
+      GenerateOutput: false
+      Relation: GeneralExcelImportAndExportDataCell
+      XMLID GeneralExcelImportAndExportDataCell { }
+    }
+  ]
+  Attributes:
+  [
+    XMLAttribute
+    {
+      Attribute: Name
+      XMLID name { }
+    }
+  ]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_table.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_table.qbl
new file mode 100644
index 0000000..69c4609
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/XMLObjectBase_table.qbl
@@ -0,0 +1,27 @@
+Quintiq file version 2.0
+#parent: #root
+XMLObjectBase.ObjectDefinitions
+{
+  IdField: Key
+  ObjectTypeField: QuintiqType
+  TargetType: GeneralExcelImportAndExportDataTable
+  XMLID table { }
+  Aggregates:
+  [
+    XMLAggregate
+    {
+      ElementDefinition: column
+      GenerateOutput: false
+      Relation: GeneralExcelImportAndExportDataColumn
+      XMLID GeneralExcelImportAndExportDataColumn { }
+    }
+  ]
+  Attributes:
+  [
+    XMLAttribute
+    {
+      Attribute: Name
+      XMLID name { }
+    }
+  ]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/_ROOT_XML_GeneralExcelImportAndExportDataTableXML.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/_ROOT_XML_GeneralExcelImportAndExportDataTableXML.qbl
new file mode 100644
index 0000000..4f9c8c5
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXML/_ROOT_XML_GeneralExcelImportAndExportDataTableXML.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#root
+#parent: #root
+XML GeneralExcelImportAndExportDataTableXML
+{
+  Direction: 'ImportExport'
+  Root: table
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_Key.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_Key.qbl
new file mode 100644
index 0000000..4f408a0
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_Key.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+XMLElementId
+{
+  XMLAddressType { }
+  XMLID Key { }
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_QuintiqType.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_QuintiqType.qbl
new file mode 100644
index 0000000..7468757
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLElementId_QuintiqType.qbl
@@ -0,0 +1,7 @@
+Quintiq file version 2.0
+#parent: #root
+XMLElementId
+{
+  XMLID QuintiqType { }
+  XMLQualifierType { }
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_column.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_column.qbl
new file mode 100644
index 0000000..28144df
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_column.qbl
@@ -0,0 +1,17 @@
+Quintiq file version 2.0
+#parent: #root
+XMLObjectBase.ObjectDefinitions
+{
+  IdField: Key
+  ObjectTypeField: QuintiqType
+  TargetType: GeneralExcelImportAndExportDataColumn
+  XMLID column { }
+  Attributes:
+  [
+    XMLAttribute
+    {
+      Attribute: Name
+      XMLID name { }
+    }
+  ]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_table.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_table.qbl
new file mode 100644
index 0000000..69c4609
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/XMLObjectBase_table.qbl
@@ -0,0 +1,27 @@
+Quintiq file version 2.0
+#parent: #root
+XMLObjectBase.ObjectDefinitions
+{
+  IdField: Key
+  ObjectTypeField: QuintiqType
+  TargetType: GeneralExcelImportAndExportDataTable
+  XMLID table { }
+  Aggregates:
+  [
+    XMLAggregate
+    {
+      ElementDefinition: column
+      GenerateOutput: false
+      Relation: GeneralExcelImportAndExportDataColumn
+      XMLID GeneralExcelImportAndExportDataColumn { }
+    }
+  ]
+  Attributes:
+  [
+    XMLAttribute
+    {
+      Attribute: Name
+      XMLID name { }
+    }
+  ]
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/_ROOT_XML_GeneralExcelImportAndExportDataTableXMLHeaders.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/_ROOT_XML_GeneralExcelImportAndExportDataTableXMLHeaders.qbl
new file mode 100644
index 0000000..8920fd6
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/XML_GeneralExcelImportAndExportDataTableXMLHeaders/_ROOT_XML_GeneralExcelImportAndExportDataTableXMLHeaders.qbl
@@ -0,0 +1,8 @@
+Quintiq file version 2.0
+#root
+#parent: #root
+XML GeneralExcelImportAndExportDataTableXMLHeaders
+{
+  Direction: 'ImportExport'
+  Root: table
+}
diff --git a/_Main/BL/Type_GeneralExcelImportAndExportDataTable/_ROOT_Type_GeneralExcelImportAndExportDataTable.qbl b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/_ROOT_Type_GeneralExcelImportAndExportDataTable.qbl
new file mode 100644
index 0000000..4f7a399
--- /dev/null
+++ b/_Main/BL/Type_GeneralExcelImportAndExportDataTable/_ROOT_Type_GeneralExcelImportAndExportDataTable.qbl
@@ -0,0 +1,9 @@
+Quintiq file version 2.0
+#root
+#parent: #DomainModel
+Type GeneralExcelImportAndExportDataTable
+{
+  #keys: '5[413988.0.1161910013][413988.0.1161910011][0.0.0][413988.0.1161910012][413988.0.1161910014]'
+  BaseType: Object
+  StructuredName: 'GeneralExcelImportAndExportDataTables'
+}
diff --git a/_Main/BL/Type_PR_PP_Budget/StaticMethod_Upload.qbl b/_Main/BL/Type_PR_PP_Budget/StaticMethod_Upload.qbl
new file mode 100644
index 0000000..c39857b
--- /dev/null
+++ b/_Main/BL/Type_PR_PP_Budget/StaticMethod_Upload.qbl
@@ -0,0 +1,57 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Upload (
+  MacroPlan macroPlan,
+  GeneralExcelImportAndExportDataTable table
+)
+{
+  TextBody:
+  [*
+    // 娓呯┖鍘熷鏁版嵁
+    macroPlan.PR_PP_Budget( relflush );
+    
+    // 鏍¢獙鏂囦欢鍚�
+    if ( table.GeneralExcelImportAndExportDataSource().Name() <> "鍙戝姩鏈哄尮閰�-PR&PP&Budget.xlsx" ) {
+      error( Translations::A_VWED_GeneralExcelImportAndExportDataSource_UploadError2() );
+    }
+    
+    // 鐢熸垚鏁版嵁
+    rowSize := table.GeneralExcelImportAndExportDataRow( relsize );
+    
+    for ( rowIndex := 0; rowIndex < rowSize; rowIndex++ ) {
+      row := select( table, GeneralExcelImportAndExportDataRow, tempGEIAEDR, tempGEIAEDR.RowNr() = rowIndex );
+      
+      modelCell               := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
+      modelCodeCell           := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
+      engineCell              := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
+      //producingAreaCell       := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 3 );
+      vehicleModelCell        := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 4 );
+      enginePartNumberCell    := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 5 );
+      //engineFourDigitCodeCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 6 );
+      
+      macroPlan.PR_PP_Budget( relnew, 
+                              Model               := guard( modelCell.Value(), "" ),
+                              ModelCode           := guard( modelCodeCell.Value(), "" ),
+                              Engine              := guard( engineCell.Value(), "" ),
+                              ProducingArea       := guard( select( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = guard( vehicleModelCell.Value(), "" ) ).Parent().Parent().Name(), "" ),
+                              VehicleModel        := guard( vehicleModelCell.Value(), "" ),
+                              EnginePartNumber    := guard( enginePartNumberCell.Value(), "" ),
+                              EngineFourDigitCode := guard( select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = guard( enginePartNumberCell.Value(), "" ) ).Notes(), "" ) ); 
+    }
+    
+    // 鏍¢獙鏁版嵁
+    feedback            := "";
+    sanitycheckfeedback := "";
+    flag                := true;
+    
+    traverse ( macroPlan, PR_PP_Budget, prppb, flag ) {
+      PR_PP_Budget::ValidateInput( feedback, sanitycheckfeedback, macroPlan, prppb.Model(), prppb.ModelCode(), prppb.Engine(), prppb.ProducingArea(), prppb.VehicleModel(), prppb.EnginePartNumber(),
+                                   prppb.EngineFourDigitCode(), prppb );
+      flag := feedback = "";
+    }
+    
+    if ( not flag ) {
+      error( feedback );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_SixDigitCode/StaticMethod_Download.qbl b/_Main/BL/Type_SixDigitCode/StaticMethod_Download.qbl
new file mode 100644
index 0000000..30d5066
--- /dev/null
+++ b/_Main/BL/Type_SixDigitCode/StaticMethod_Download.qbl
@@ -0,0 +1,48 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Download (
+  MacroPlan macroPlan
+) as BinaryValue
+{
+  TextBody:
+  [*
+    xmlDOMI := XMLDOMImplementation::Create();
+    xmlDOM  := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name><column><name>鍏綅鐮�</name><type>String</type></column><column><name>Curve</name><type>String</type></column><column><name>杞﹀瀷</name><type>String</type></column><column><name>浜у湴</name><type>String</type></column><column><name>鍙戝姩鏈�</name><type>String</type></column><column><name>鍔熺巼</name><type>String</type></column><column><name>鍙戝姩鏈洪浂浠跺彿</name><type>String</type></column><column><name>鍙戝姩鏈哄洓浣嶇爜</name><type>String</type></column><column><name>澶囨敞</name><type>String</type></column></table>' );
+    
+    tableElement              := xmlDOM.GetElementByTagName( "table", 0 );
+    
+    codeColumn                := tableElement.GetElementByTagName( "column", 0 ); // Code
+    curveColumn               := tableElement.GetElementByTagName( "column", 1 ); // Curve
+    vehicleModelColumn        := tableElement.GetElementByTagName( "column", 2 ); // 杞﹀瀷
+    productingAreaColumn      := tableElement.GetElementByTagName( "column", 3 ); // 浜у湴
+    engineColumn              := tableElement.GetElementByTagName( "column", 4 ); // 鍙戝姩鏈�
+    powerColumn               := tableElement.GetElementByTagName( "column", 5 ); // 鍔熺巼
+    enginePartNumberColumn    := tableElement.GetElementByTagName( "column", 6 ); // 鍙戝姩鏈洪浂浠跺彿
+    engineFourDigitCodeColumn := tableElement.GetElementByTagName( "column", 7 ); // 鍙戝姩鏈哄洓浣嶇爜
+    remarksColumn             := tableElement.GetElementByTagName( "column", 8 ); // 澶囨敞
+    
+    traverse ( macroPlan, SixDigitCode, sdc ) {
+      PR_PP_Budget::ExportCreateCell( xmlDOM, codeColumn, sdc.Code() );                               // Code
+      PR_PP_Budget::ExportCreateCell( xmlDOM, curveColumn, sdc.Curve() );                             // Curve
+      PR_PP_Budget::ExportCreateCell( xmlDOM, vehicleModelColumn, sdc.VehicleModel() );               // 杞﹀瀷
+      PR_PP_Budget::ExportCreateCell( xmlDOM, productingAreaColumn, sdc.ProducingArea() );            // 浜у湴
+      PR_PP_Budget::ExportCreateCell( xmlDOM, engineColumn, sdc.Engine() );                           // 鍙戝姩鏈�
+      PR_PP_Budget::ExportCreateCell( xmlDOM, powerColumn, sdc.Power() );                             // 鍔熺巼
+      PR_PP_Budget::ExportCreateCell( xmlDOM, enginePartNumberColumn, sdc.EnginePartNumber() );       // 鍙戝姩鏈洪浂浠跺彿
+      PR_PP_Budget::ExportCreateCell( xmlDOM, engineFourDigitCodeColumn, sdc.EngineFourDigitCode() ); // 鍙戝姩鏈哄洓浣嶇爜
+      PR_PP_Budget::ExportCreateCell( xmlDOM, remarksColumn, sdc.Remarks() );                         // 鍙戝姩鏈洪浂浠跺彿
+    }
+    
+    xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
+    
+    //info( xmlString );
+    
+    tableGroupHandle := TableGroupHandle::Create( "Sheet1" );
+    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+    tableGroupHandle.Add( tableHandle );
+    
+    binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return binaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_SixDigitCode/StaticMethod_Upload.qbl b/_Main/BL/Type_SixDigitCode/StaticMethod_Upload.qbl
new file mode 100644
index 0000000..f66e52c
--- /dev/null
+++ b/_Main/BL/Type_SixDigitCode/StaticMethod_Upload.qbl
@@ -0,0 +1,59 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Upload (
+  MacroPlan macroPlan,
+  GeneralExcelImportAndExportDataTable table
+)
+{
+  TextBody:
+  [*
+    // 娓呯┖鍘熷鏁版嵁
+    macroPlan.SixDigitCode( relflush );
+    
+    // 鏍¢獙鏂囦欢鍚�
+    if ( table.GeneralExcelImportAndExportDataSource().Name() <> "鍙戝姩鏈哄尮閰�-鍏綅鐮�.xlsx" ) {
+      error( Translations::A_VWED_GeneralExcelImportAndExportDataSource_UploadError2() );
+    }
+    
+    // 鐢熸垚鏁版嵁
+    rowSize := table.GeneralExcelImportAndExportDataRow( relsize );
+    
+    for ( rowIndex := 0; rowIndex < rowSize; rowIndex++ ) {
+      row := select( table, GeneralExcelImportAndExportDataRow, tempGEIAEDR, tempGEIAEDR.RowNr() = rowIndex );
+      
+      codeCell             := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
+      curveCell            := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
+      vehicleModelCell     := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 2 );
+      engineCell           := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 4 );
+      powerCell            := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 5 );
+      enginePartNumberCell := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 6 );
+      remarksCell          := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 8 );
+      
+      macroPlan.SixDigitCode( relnew, 
+                              Code                := guard( codeCell.Value(), "" ),
+                              Curve               := guard( curveCell.Value(), "" ),
+                              VehicleModel        := guard( vehicleModelCell.Value(), "" ),
+                              ProducingArea       := guard( select( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = guard( vehicleModelCell.Value(), "" ) ).Parent().Parent().Name(), "" ),
+                              Engine              := guard( engineCell.Value(), "" ),
+                              Power               := guard( powerCell.Value(), "" ),
+                              EnginePartNumber    := guard( enginePartNumberCell.Value(), "" ),
+                              EngineFourDigitCode := guard( select( macroPlan, Product_MP, tempPMP, tempPMP.ID() = guard( enginePartNumberCell.Value(), "" ) ).Notes(), "" ),
+                              Remarks             := guard( remarksCell.Value(), "" ) ); 
+    }
+    
+    // 鏍¢獙鏁版嵁
+    feedback            := "";
+    sanitycheckfeedback := "";
+    flag                := true;
+    
+    traverse ( macroPlan, SixDigitCode, sdc, flag ) {
+      SixDigitCode::ValidateInput( feedback, sanitycheckfeedback, macroPlan, sdc.Code(), sdc.Curve(), sdc.VehicleModel(), sdc.ProducingArea(), sdc.Engine(), sdc.Power(), sdc.EnginePartNumber(), 
+                                   sdc.EngineFourDigitCode(), sdc.Remarks(), sdc );
+      flag := feedback = "";
+    }
+    
+    if ( not flag ) {
+      error( feedback );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_SixDigitCode/StaticMethod_ValidateInput.qbl b/_Main/BL/Type_SixDigitCode/StaticMethod_ValidateInput.qbl
new file mode 100644
index 0000000..135791d
--- /dev/null
+++ b/_Main/BL/Type_SixDigitCode/StaticMethod_ValidateInput.qbl
@@ -0,0 +1,45 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ValidateInput (
+  output String feedback_o,
+  output String sanitycheckfeedback_o,
+  MacroPlan macroPlan,
+  String code,
+  String curve,
+  String vehicleModel,
+  String productingArea,
+  String engine,
+  String power,
+  String enginePartNumber,
+  String engineFourDigitCode,
+  String remarks,
+  SixDigitCode selection
+) declarative remote as Boolean
+{
+  TextBody:
+  [*
+    // lihongji May-14-2024 (created)
+    feedback_o            := "";
+    sanitycheckfeedback_o := "";
+    
+    if ( code.TrimBoth() = "" or curve.TrimBoth() = "" or vehicleModel.TrimBoth() = "" or enginePartNumber.TrimBoth() = "" ) {
+      feedback_o            := ifexpr( code.TrimBoth() = "", Translations::A_VWED_SixDigitCode_Code() + "銆�", "" )                         +  
+                               ifexpr( curve.TrimBoth() = "", Translations::A_VWED_SixDigitCode_Curve() + "銆�", "" )                       +
+                               ifexpr( vehicleModel.TrimBoth() = "", Translations::A_VWED_PR_PP_Budget_VehicleModel() + "銆�", "" )         +
+                               ifexpr( enginePartNumber.TrimBoth() = "", Translations::A_VWED_PR_PP_Budget_EnginePartNumber() + "銆�", "" );
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules1( guard( feedback_o.SubString( 0, feedback_o.Length() - 1 ), "error" ) );
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    } else if ( code.TrimBoth() <> "" and exists( macroPlan, SixDigitCode, tempSDC, tempSDC.Code() = code and tempSDC <> selection ) ) {
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules2();
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    } else if ( vehicleModel.TrimBoth() <> "" and not exists( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = vehicleModel ) ) {
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules3();
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    } else if ( enginePartNumber.TrimBoth() <> "" and not exists( macroPlan, Product_MP, tempPMP, tempPMP.ID() = enginePartNumber ) ) {
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules4();
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    }
+    
+    return feedback_o = "";
+  *]
+}
diff --git a/_Main/BL/Type_ThreeDigitCode/StaticMethod_Download.qbl b/_Main/BL/Type_ThreeDigitCode/StaticMethod_Download.qbl
new file mode 100644
index 0000000..3300b16
--- /dev/null
+++ b/_Main/BL/Type_ThreeDigitCode/StaticMethod_Download.qbl
@@ -0,0 +1,34 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Download (
+  MacroPlan macroPlan
+) as BinaryValue
+{
+  TextBody:
+  [*
+    xmlDOMI := XMLDOMImplementation::Create();
+    xmlDOM  := xmlDOMI.CreateDocumentFromString( '<?xml version="1.0" encoding="UTF-16"?><table><name>Sheet1</name><column><name>涓変綅鐮�</name><type>String</type></column><column><name>杞﹀瀷</name><type>String</type></column></table>' );
+    
+    tableElement              := xmlDOM.GetElementByTagName( "table", 0 );
+    
+    codeColumn                := tableElement.GetElementByTagName( "column", 0 ); // Code
+    vehicleModelColumn        := tableElement.GetElementByTagName( "column", 1 ); // 杞﹀瀷
+    
+    traverse ( macroPlan, ThreeDigitCode, sdc ) {
+      PR_PP_Budget::ExportCreateCell( xmlDOM, codeColumn, sdc.Code() );                               // Code
+      PR_PP_Budget::ExportCreateCell( xmlDOM, vehicleModelColumn, sdc.VehicleModel() );               // 杞﹀瀷
+    }
+    
+    xmlString := xmlDOMI.CreateSerializer().WriteToString( xmlDOM )
+    
+    //info( xmlString );
+    
+    tableGroupHandle := TableGroupHandle::Create( "Sheet1" );
+    tableHandle      := TableHandle::ImportXML( BinaryValue::Construct( xmlString ) );
+    tableGroupHandle.Add( tableHandle );
+    
+    binaryData := XLS::SaveTableGroupToBinaryData( tableGroupHandle, true );
+    
+    return binaryData.AsBinaryValue();
+  *]
+}
diff --git a/_Main/BL/Type_ThreeDigitCode/StaticMethod_Upload.qbl b/_Main/BL/Type_ThreeDigitCode/StaticMethod_Upload.qbl
new file mode 100644
index 0000000..db33e5a
--- /dev/null
+++ b/_Main/BL/Type_ThreeDigitCode/StaticMethod_Upload.qbl
@@ -0,0 +1,46 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod Upload (
+  MacroPlan macroPlan,
+  GeneralExcelImportAndExportDataTable table
+)
+{
+  TextBody:
+  [*
+    // 娓呯┖鍘熷鏁版嵁
+    macroPlan.ThreeDigitCode( relflush );
+    
+    // 鏍¢獙鏂囦欢鍚�
+    if ( table.GeneralExcelImportAndExportDataSource().Name() <> "鍙戝姩鏈哄尮閰�-涓変綅鐮�.xlsx" ) {
+      error( Translations::A_VWED_GeneralExcelImportAndExportDataSource_UploadError2() );
+    }
+    
+    // 鐢熸垚鏁版嵁
+    rowSize := table.GeneralExcelImportAndExportDataRow( relsize );
+    
+    for ( rowIndex := 0; rowIndex < rowSize; rowIndex++ ) {
+      row := select( table, GeneralExcelImportAndExportDataRow, tempGEIAEDR, tempGEIAEDR.RowNr() = rowIndex );
+      
+      codeCell             := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 0 );
+      vehicleModelCell     := select( row, GeneralExcelImportAndExportDataCell, tempGEIAEDC, tempGEIAEDC.GeneralExcelImportAndExportDataColumn().ColumnIndex() = 1 );
+      
+      macroPlan.ThreeDigitCode( relnew, 
+                                Code                := guard( codeCell.Value(), "" ),
+                                VehicleModel        := guard( vehicleModelCell.Value(), "" ) ); 
+    }
+    
+    // 鏍¢獙鏁版嵁
+    feedback            := "";
+    sanitycheckfeedback := "";
+    flag                := true;
+    
+    traverse ( macroPlan, ThreeDigitCode, tdc, flag ) {
+      ThreeDigitCode::ValidateInput( feedback, sanitycheckfeedback, macroPlan, tdc.Code(), tdc.VehicleModel(), tdc );
+      flag := feedback = "";
+    }
+    
+    if ( not flag ) {
+      error( feedback );
+    }
+  *]
+}
diff --git a/_Main/BL/Type_ThreeDigitCode/StaticMethod_ValidateInput.qbl b/_Main/BL/Type_ThreeDigitCode/StaticMethod_ValidateInput.qbl
new file mode 100644
index 0000000..11a68d6
--- /dev/null
+++ b/_Main/BL/Type_ThreeDigitCode/StaticMethod_ValidateInput.qbl
@@ -0,0 +1,33 @@
+Quintiq file version 2.0
+#parent: #root
+StaticMethod ValidateInput (
+  output String feedback_o,
+  output String sanitycheckfeedback_o,
+  MacroPlan macroPlan,
+  String code,
+  String vehicleModel,
+  ThreeDigitCode selection
+) declarative remote as Boolean
+{
+  TextBody:
+  [*
+    // lihongji May-14-2024 (created)
+    feedback_o            := "";
+    sanitycheckfeedback_o := "";
+    
+    if ( code.TrimBoth() = "" or vehicleModel.TrimBoth() = "" ) {
+      feedback_o            := ifexpr( code.TrimBoth() = "", Translations::A_VWED_SixDigitCode_Code() + "銆�", "" )                 +  
+                               ifexpr( vehicleModel.TrimBoth() = "", Translations::A_VWED_PR_PP_Budget_VehicleModel() + "銆�", "" );
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules1( guard( feedback_o.SubString( 0, feedback_o.Length() - 1 ), "error" ) );
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    } else if ( code.TrimBoth() <> "" and exists( macroPlan, ThreeDigitCode, tempTDC, tempTDC.Code() = code and tempTDC <> selection ) ) {
+      feedback_o            := Translations::A_VWED_ThreeDigitCode_VerificationRules2();
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    } else if ( vehicleModel.TrimBoth() <> "" and not exists( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = vehicleModel ) ) {
+      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules3();
+      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
+    }
+    
+    return feedback_o = "";
+  *]
+}
diff --git a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
index 0267fea..5c6c5c5 100644
--- a/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
+++ b/_Main/UI/MacroPlanner/Component_ApplicationLibMacroPlanner/Component_mbMainMenu.def
@@ -77,6 +77,26 @@
             }
           ]
         }
+        Component menuSeparator833 { #keys: '[413988.0.1164544044]' BaseType: 'Menu' Properties: [ Separator: true ] }
+        Component ComponentMenu469 { #keys: '[413988.0.1164544687]' BaseType: 'ComponentMenu' Properties: [ ComponentType: 'frmStandardAnalysis857' Text: '' ] }
+      ]
+      Properties:
+      [
+        ModeledStringList ChildOrdering
+        {
+          c: MenuFunctions
+          c: MenuSeparatorFunctions
+          c: MenuConfiguration
+          c: Menu38
+          c: MenuEditKnowledgeTables
+          c: Menu18
+          c: MenuAuthorization
+          c: MenuAdministrativeTools1
+          c: Menu8
+          c: MenuSelectDemoDataset
+          c: menuSeparator833
+          c: ComponentMenu469
+        }
       ]
     }
   ]
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_List1.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_List1.def
new file mode 100644
index 0000000..0977714
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_List1.def
@@ -0,0 +1,46 @@
+Quintiq file version 2.0
+Component List1
+{
+  #keys: '[530.0.3531950]'
+  BaseType: 'List1'
+  IsDerived: true
+  Children:
+  [
+    Component popupList1
+    {
+      #keys: '[530.0.5957094]'
+      BaseType: 'popupList1'
+      IsDerived: true
+      Children:
+      [
+        Component PopupParent
+        {
+          #keys: '[514.0.129466]'
+          BaseType: 'PopupParent'
+          IsDerived: true
+          Children:
+          [
+            Component menuSeparator { #keys: '[413988.0.1164545508]' BaseType: 'Menu' Properties: [ Separator: true ] }
+            Component MenuDelete { #keys: '[413988.0.1164545559]' BaseType: 'Menu' Properties: [ Image: 'DELETE' Text: 'Delete' ] }
+          ]
+          Properties:
+          [
+            ModeledStringList ChildOrdering
+            {
+              c: MenuActions
+              c: MenuFilter
+              c: menuListQuintiqSetQuantor
+              c: menuOLSeparator0
+              c: menuUseFilter
+              c: menuAppendFilter
+              c: menuClearAnalysisFilter
+              c: MenuClearAnalysisConfigurationsList
+              c: menuSeparator
+              c: MenuDelete
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swBottom.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swBottom.def
new file mode 100644
index 0000000..1541eaf
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swBottom.def
@@ -0,0 +1,20 @@
+Quintiq file version 2.0
+Component swBottom
+{
+  #keys: '[530.0.3531811]'
+  BaseType: 'swBottom'
+  IsDerived: true
+  Children:
+  [
+    Component spBottomRight
+    {
+      #keys: '[530.0.3531813]'
+      BaseType: 'spBottomRight'
+      IsDerived: true
+      Children:
+      [
+        #child: List1
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTop.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTop.def
new file mode 100644
index 0000000..9f648c1
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTop.def
@@ -0,0 +1,29 @@
+Quintiq file version 2.0
+Component swTop
+{
+  #keys: '[530.0.3531806]'
+  BaseType: 'swTop'
+  IsDerived: true
+  Children:
+  [
+    Component spTopLeft
+    {
+      #keys: '[530.0.3531807]'
+      BaseType: 'spTopLeft'
+      IsDerived: true
+      Children:
+      [
+        Component Analysis
+        {
+          #keys: '[530.0.3532065]'
+          BaseType: 'Analysis'
+          IsDerived: true
+          Properties:
+          [
+            GlobalInstance: 'Archive'
+          ]
+        }
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTopMost.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTopMost.def
new file mode 100644
index 0000000..0cad53e
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Component_swTopMost.def
@@ -0,0 +1,30 @@
+Quintiq file version 2.0
+Component swTopMost
+{
+  #keys: '[530.0.3531801]'
+  BaseType: 'swTopMost'
+  IsDerived: true
+  Children:
+  [
+    Component SplitterPane1
+    {
+      #keys: '[530.0.3531802]'
+      BaseType: 'SplitterPane1'
+      IsDerived: true
+      Children:
+      [
+        #child: swTop
+      ]
+    }
+    Component SplitterPane2
+    {
+      #keys: '[530.0.3531803]'
+      BaseType: 'SplitterPane2'
+      IsDerived: true
+      Children:
+      [
+        #child: swBottom
+      ]
+    }
+  ]
+}
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Response_List1_MenuDelete_OnClick.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Response_List1_MenuDelete_OnClick.def
new file mode 100644
index 0000000..7022a41
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/Response_List1_MenuDelete_OnClick.def
@@ -0,0 +1,15 @@
+Quintiq file version 2.0
+#parent: List1
+Response OnClick (
+  structured[Object] selection
+) id:Response_List1_MenuDelete_OnClick
+{
+  #keys: '[413988.0.1164545589]'
+  Body:
+  [*
+    MacroPlan::DeleteObjects( selection );
+  *]
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_List1_Menu_OnClick'
+  Initiator: 'MenuDelete'
+}
diff --git a/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/_ROOT_Component_frmStandardAnalysis857.def b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/_ROOT_Component_frmStandardAnalysis857.def
new file mode 100644
index 0000000..12af73e
--- /dev/null
+++ b/_Main/UI/MacroPlanner/Component_frmStandardAnalysis857/_ROOT_Component_frmStandardAnalysis857.def
@@ -0,0 +1,18 @@
+Quintiq file version 2.0
+#root
+#parent: MacroPlanner
+OrphanComponent frmStandardAnalysis857
+{
+  #keys: '[413988.0.1164544060]'
+  BaseType: 'frmStandardAnalysis'
+  Children:
+  [
+    #child: swTopMost
+  ]
+  Properties:
+  [
+    Height: 506
+    Title: 'Archive'
+    Width: 965
+  ]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Component_pnlContent.def
index 17b8dc0..91cb35a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Component_pnlContent.def
@@ -27,17 +27,6 @@
         Taborder: 1
       ]
     }
-    Component efVehicleModel
-    {
-      #keys: '[413988.0.1148720711]'
-      BaseType: 'WebEditField'
-      Properties:
-      [
-        DataBinding: 'DataHolderDialogData.Data.VehicleModel'
-        Label: 'Vehicle Model'
-        Taborder: 2
-      ]
-    }
     Component efProducingArea
     {
       #keys: '[413988.0.1148720713]'
@@ -45,6 +34,7 @@
       Properties:
       [
         DataBinding: 'DataHolderDialogData.Data.ProducingArea'
+        Enabled: false
         Label: 'Producing Area'
         Taborder: 3
       ]
@@ -71,17 +61,6 @@
         Taborder: 5
       ]
     }
-    Component efEnginePartNumber
-    {
-      #keys: '[413988.0.1148720719]'
-      BaseType: 'WebEditField'
-      Properties:
-      [
-        DataBinding: 'DataHolderDialogData.Data.EnginePartNumber'
-        Label: 'Engine Part Number'
-        Taborder: 6
-      ]
-    }
     Component efEngineFourDigitCode
     {
       #keys: '[413988.0.1148720721]'
@@ -89,6 +68,7 @@
       Properties:
       [
         DataBinding: 'DataHolderDialogData.Data.EngineFourDigitCode'
+        Enabled: false
         Label: 'Engine Four Digit Code'
         Taborder: 7
       ]
@@ -104,6 +84,60 @@
         Taborder: 8
       ]
     }
+    Component ddlVehicleModel id:ddlVehicleModel_119
+    {
+      #keys: '[413988.0.1167500317]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'SalesSegment_MP'
+      Children:
+      [
+        Component deContent199 id:deContent199_720
+        {
+          #keys: '[413988.0.1167500318]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'SalesSegment_MP'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'Name'
+        Label: 'Vehicle Model'
+        Taborder: 2
+      ]
+    }
+    Component ddlEnginePartNumber id:ddlEnginePartNumber_582
+    {
+      #keys: '[413988.0.1167500457]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'Product_MP'
+      Children:
+      [
+        Component deContent id:deContent_144
+        {
+          #keys: '[413988.0.1167500458]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'Product_MP'
+          ]
+        }
+      ]
+      Properties:
+      [
+        DisplayField: 'ID'
+        Label: 'Engine Part Number'
+        Taborder: 6
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_Edit.def
index 26e644b..0bf8f85 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_Edit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_Edit.def
@@ -9,7 +9,14 @@
   [*
     data := shadow( selection );
     
+    ssmp := select( MacroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = selection.VehicleModel() );
+    ddlVehicleModel.Data( ssmp );
+    
+    pmp  := select( MacroPlan, Product_MP, tempPMP, tempPMP.ID() = selection.EnginePartNumber() );
+    ddlEnginePartNumber.Data( pmp );
+    
     DataHolderDialogData.Data( &data );
+    dhSelectionSixDigitCode.Data( selection );
     
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_OnOK.def
index f533f6c..93bffd9 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Method_OnOK.def
@@ -8,7 +8,12 @@
     // On ok
     Form.ApplyChanges();
     
-    DataHolderDialogData.Data().Commit();
+    data := DataHolderDialogData.Data();
+    
+    data.VehicleModel( guard( ddlVehicleModel.Data().Name(), "" ) );
+    data.EnginePartNumber( guard( ddlEnginePartNumber.Data().ID(), "" ) );
+    
+    data.Commit();
     
     Form.Close();
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlActions_btnOk_OnClick.def
index dc55f58..768cd0a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlActions_btnOk_OnClick.def
@@ -4,6 +4,23 @@
 {
   #keys: '[413988.0.1148570679]'
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    sanitycheckfeedback := '';
+    return SixDigitCode::ValidateInput( feedback,
+                                        sanitycheckfeedback,
+                                        MacroPlan,
+                                        efCode.Text(),
+                                        efCurve.Text(),
+                                        ddlVehicleModel.Data().Name(),
+                                        efProducingArea.Text(),
+                                        efEngine.Text(),
+                                        efPower.Text(),
+                                        ddlEnginePartNumber.Data().ID(),
+                                        efEngineFourDigitCode.Text(),
+                                        efRemarks.Text(),
+                                        dhSelectionSixDigitCode.Data() );
+  *]
   QuillAction
   {
     Body:
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlEnginePartNumber_OnSelectionChanged\043537.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlEnginePartNumber_OnSelectionChanged\043537.def"
new file mode 100644
index 0000000..01294a0
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlEnginePartNumber_OnSelectionChanged\043537.def"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pnlContent/ddlEnginePartNumber_582
+Response OnSelectionChanged () id:Response_pnlContent_ddlEnginePartNumber_OnSelectionChanged_537
+{
+  #keys: '[413988.0.1167500455]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      efEngineFourDigitCode.Text( guard( this.Data().Notes(), "" ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git "a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlVehicleModel_OnSelectionChanged\043640.def" "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlVehicleModel_OnSelectionChanged\043640.def"
new file mode 100644
index 0000000..46abb32
--- /dev/null
+++ "b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/Response_pnlContent_ddlVehicleModel_OnSelectionChanged\043640.def"
@@ -0,0 +1,16 @@
+Quintiq file version 2.0
+#parent: pnlContent/ddlVehicleModel_119
+Response OnSelectionChanged () id:Response_pnlContent_ddlVehicleModel_OnSelectionChanged_640
+{
+  #keys: '[413988.0.1167500315]'
+  CanBindMultiple: false
+  DefinitionID: 'Responsedef_WebDropDownList_OnSelectionChanged'
+  QuillAction
+  {
+    Body:
+    [*
+      efProducingArea.Text( guard( this.Data().Parent().Parent().Name(), "" ) );
+    *]
+    GroupServerCalls: false
+  }
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/_ROOT_Component_DialogCreateEditSixDigitCode.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/_ROOT_Component_DialogCreateEditSixDigitCode.def
index ce45008..734e49d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/_ROOT_Component_DialogCreateEditSixDigitCode.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditSixDigitCode/_ROOT_Component_DialogCreateEditSixDigitCode.def
@@ -19,6 +19,16 @@
         Taborder: 2
       ]
     }
+    Component dhSelectionSixDigitCode
+    {
+      #keys: '[413988.0.1166161525]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'SixDigitCode'
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Component_pnlContent.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Component_pnlContent.def
index b6fcc49..2caab62 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Component_pnlContent.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Component_pnlContent.def
@@ -16,13 +16,29 @@
         Taborder: 0
       ]
     }
-    Component efVehicleModel
+    Component ddlVehicleModel
     {
-      #keys: '[413988.0.1149413314]'
-      BaseType: 'WebEditField'
+      #keys: '[413988.0.1167810823]'
+      BaseType: 'WebDropDownList'
+      Databinding: 'SalesSegment_MP'
+      Children:
+      [
+        Component deContent199
+        {
+          #keys: '[413988.0.1167810824]'
+          BaseType: 'WebDataExtractor'
+          Properties:
+          [
+            DataType: 'MacroPlan'
+            Source: 'MacroPlan'
+            Taborder: 0
+            Transformation: 'SalesSegment_MP'
+          ]
+        }
+      ]
       Properties:
       [
-        DataBinding: 'DataHolderDialogData.Data.VehicleModel'
+        DisplayField: 'Name'
         Label: 'Vehicle Model'
         Taborder: 1
       ]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_Edit.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_Edit.def
index d7fa2f6..b021c20 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_Edit.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_Edit.def
@@ -9,7 +9,11 @@
   [*
     data := shadow( selection );
     
+    ssmp := select( MacroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = selection.VehicleModel() );
+    ddlVehicleModel.Data( ssmp );
+    
     DataHolderDialogData.Data( &data );
+    dhSelectionThreeDigitCode.Data( selection );
     
     ApplicationMacroPlanner.ShowFormModal( this );
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_OnOK.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_OnOK.def
index f4fee66..3de1c4c 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_OnOK.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Method_OnOK.def
@@ -8,7 +8,11 @@
     // On ok
     Form.ApplyChanges();
     
-    DataHolderDialogData.Data().Commit();
+    data := DataHolderDialogData.Data();
+    
+    data.VehicleModel( guard( ddlVehicleModel.Data().Name(), "" ) );
+    
+    data.Commit();
     
     Form.Close();
   *]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Response_pnlActions_btnOk_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Response_pnlActions_btnOk_OnClick.def
index 34c846c..d1fa965 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Response_pnlActions_btnOk_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/Response_pnlActions_btnOk_OnClick.def
@@ -4,6 +4,16 @@
 {
   #keys: '[413988.0.1149411986]'
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    sanitycheckfeedback := '';
+    return ThreeDigitCode::ValidateInput( feedback,
+                                          sanitycheckfeedback,
+                                          MacroPlan,
+                                          efCode.Text(),
+                                          ddlVehicleModel.Data().Name(),
+                                          dhSelectionThreeDigitCode.Data() );
+  *]
   QuillAction
   {
     Body:
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/_ROOT_Component_DialogCreateEditThreeDigitCode.def b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/_ROOT_Component_DialogCreateEditThreeDigitCode.def
index d8b80bf..fa5b240 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/_ROOT_Component_DialogCreateEditThreeDigitCode.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditThreeDigitCode/_ROOT_Component_DialogCreateEditThreeDigitCode.def
@@ -19,6 +19,16 @@
         Taborder: 2
       ]
     }
+    Component dhSelectionThreeDigitCode
+    {
+      #keys: '[413988.0.1167410600]'
+      BaseType: 'WebDataHolder'
+      Databinding: 'ThreeDigitCode'
+      Properties:
+      [
+        Taborder: 3
+      ]
+    }
   ]
   Properties:
   [
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bExport_OnClick.def
index a7f6969..811ff53 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bExport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bExport_OnClick.def
@@ -5,8 +5,18 @@
   #keys: '[413988.0.1147413980]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
   QuillAction
   {
+    Body:
+    [*
+      binaryValue := ThreeDigitCode::Download( MacroPlan );
+      
+      Application.Download( "鍙戝姩鏈哄尮閰�-涓変綅鐮�.xlsx", binaryValue.AsBinaryData() );
+    *]
     GroupServerCalls: false
   }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bImport_OnClick.def
index 3d75f01..9f14d31 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_Form989/Response_pHeader_bImport_OnClick.def
@@ -5,8 +5,41 @@
   #keys: '[413988.0.1147413979]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
   QuillAction
   {
+    Body:
+    [*
+      try {
+        uploadJsonString := Application.GetFile();
+        if ( uploadJsonString <> "" ) {
+          uploadJson := JSON::Parse( uploadJsonString );
+          Archive::VerifyTheFileName( uploadJson );
+                
+          fileName := uploadJson.Get( "name" ).GetString();
+          base64String := uploadJson.Get( "data" ).GetString();
+              
+          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+          
+          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( Archive, webFileBinaryData, fileName );
+          generalExcelImportAndExportDataSource.ReadStructure();
+          
+          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+          
+          ThreeDigitCode::Upload( MacroPlan, selection );
+          
+          // 鍚庣画鍒犻櫎
+          generalExcelImportAndExportDataSource.Delete();
+          
+          WebMessageBox::Success( Translations::A_VWED_Success() );
+        }
+      } onerror {
+        WebMessageBox::Error( e.GeneralInformation() );
+      }
+    *]
     GroupServerCalls: false
   }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormPR_PP_Budget/Response_pHeader_bImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormPR_PP_Budget/Response_pHeader_bImport_OnClick.def
index 903035c..41b869f 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormPR_PP_Budget/Response_pHeader_bImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormPR_PP_Budget/Response_pHeader_bImport_OnClick.def
@@ -5,8 +5,41 @@
   #keys: '[413988.0.1141930584]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
   QuillAction
   {
+    Body:
+    [*
+      try {
+        uploadJsonString := Application.GetFile();
+        if ( uploadJsonString <> "" ) {
+          uploadJson := JSON::Parse( uploadJsonString );
+          Archive::VerifyTheFileName( uploadJson );
+                
+          fileName := uploadJson.Get( "name" ).GetString();
+          base64String := uploadJson.Get( "data" ).GetString();
+              
+          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+          
+          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( Archive, webFileBinaryData, fileName );
+          generalExcelImportAndExportDataSource.ReadStructure();
+          
+          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+          
+          PR_PP_Budget::Upload( MacroPlan, selection );
+          
+          // 鍚庣画鍒犻櫎
+          generalExcelImportAndExportDataSource.Delete();
+          
+          WebMessageBox::Success( Translations::A_VWED_Success() );
+        }
+      } onerror {
+        WebMessageBox::Error( e.GeneralInformation() );
+      }
+    *]
     GroupServerCalls: false
   }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bExport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bExport_OnClick.def
index 079d0f8..7b2aeec 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bExport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bExport_OnClick.def
@@ -5,8 +5,18 @@
   #keys: '[413988.0.1146140232]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
   QuillAction
   {
+    Body:
+    [*
+      binaryValue := SixDigitCode::Download( MacroPlan );
+      
+      Application.Download( "鍙戝姩鏈哄尮閰�-鍏綅鐮�.xlsx", binaryValue.AsBinaryData() );
+    *]
     GroupServerCalls: false
   }
 }
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bImport_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bImport_OnClick.def
index 506669c..785331d 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bImport_OnClick.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormSixDigitCode/Response_pHeader_393_bImport_OnClick.def
@@ -5,8 +5,41 @@
   #keys: '[413988.0.1146140231]'
   CanBindMultiple: false
   DefinitionID: 'Responsedef_WebButton_OnClick'
+  Precondition:
+  [*
+    return not isnull( MacroPlan );
+  *]
   QuillAction
   {
+    Body:
+    [*
+      try {
+        uploadJsonString := Application.GetFile();
+        if ( uploadJsonString <> "" ) {
+          uploadJson := JSON::Parse( uploadJsonString );
+          Archive::VerifyTheFileName( uploadJson );
+                
+          fileName := uploadJson.Get( "name" ).GetString();
+          base64String := uploadJson.Get( "data" ).GetString();
+              
+          webFileBinaryData := BinaryData::FromBase64EncodedString( base64String ).AsBinaryValue();
+          
+          generalExcelImportAndExportDataSource := GeneralExcelImportAndExportDataSource::Upload( Archive, webFileBinaryData, fileName );
+          generalExcelImportAndExportDataSource.ReadStructure();
+          
+          selection := select( generalExcelImportAndExportDataSource, GeneralExcelImportAndExportDataTable, tempGEIAEDT, tempGEIAEDT.Name() = "Sheet1" );
+          
+          SixDigitCode::Upload( MacroPlan, selection );
+          
+          // 鍚庣画鍒犻櫎
+          generalExcelImportAndExportDataSource.Delete();
+          
+          WebMessageBox::Success( Translations::A_VWED_Success() );
+        }
+      } onerror {
+        WebMessageBox::Error( e.GeneralInformation() );
+      }
+    *]
     GroupServerCalls: false
   }
 }

--
Gitblit v1.9.3