| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Download ( |
| | | MacroPlan macroPlan |
| | | MacroPlan macroPlan, |
| | | OfflinePlanRows selectedOPRs |
| | | ) as BinaryValue |
| | | { |
| | | TextBody: |
| | |
| | | |
| | | opt := maxselect( macroPlan, OfflinePlanTable, tempOPT, true, tempOPT.SaveDateTime() ); |
| | | opcs := selectsortedset( opt, OfflinePlanColumn, tempOPC, true, tempOPC.ColumnDate() ); |
| | | oprs := selectsortedset( opt, OfflinePlanRow, tempOPR, true, tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() ); |
| | | oprs := selectsortedset( selectedOPRs, Elements, tempOPR, true, tempOPR.ProductionLine(), tempOPR.ProductID(), tempOPR.Type() ); |
| | | traverse ( opcs, Elements, opc ) { |
| | | column := xmlDOM.CreateElement( "column" ); |
| | | name := xmlDOM.CreateElement( "name" ); |
| | | type := xmlDOM.CreateElement( "type" ); |
| | | name.TextContent( ifexpr( opc.ColumnDate() < macroPlan.StartOfPlanning().Date(), "", opc.ColumnDate().Format( "Y/M2/D2" ) ) ); |
| | | name.TextContent( ifexpr( opc.ColumnDate() < macroPlan.StartOfPlanning().Date(), "*", opc.ColumnDate().Format( "Y/M2/D2" ) ) ); |
| | | type.TextContent( "String" ); |
| | | column.AppendChild( name ); |
| | | column.AppendChild( type ); |