Index: APPS/PM/Vertaling/ExcelExport.cls.xml
===================================================================
diff -u
--- APPS/PM/Vertaling/ExcelExport.cls.xml (revision 0)
+++ APPS/PM/Vertaling/ExcelExport.cls.xml (revision 106)
@@ -0,0 +1,157 @@
+
+
+
+vhLib.Macro
+1
+%RegisteredObject
+0
+
+
+
+
+
+
+1
+BronTaal:%String="N",DoelTaal:%String,Datum:%String="",Tijd:%String=""
+
+
+
+
+1
+BronTaal:%String="N",DoelTaal:%String,VertalingsGroep:%String,Datum:%String="",Tijd:%String=""
+
+
+
+
+1
+%ListOfDataTypes
+
+
+
+
+1
+Tekst:%String
+%String
+")
+]]>
+
+
+
+%SQLQuery
+VertalingsGroep:%String,LaatstGewijzigdSinds:%Integer,Brontaal:%String
+ :LaatstGewijzigdSinds)) OR (('F' = :Brontaal) AND (Frans.WijzigingsDatumTijd > :LaatstGewijzigdSinds)) OR (('E' = :Brontaal) AND (Engels.WijzigingsDatumTijd > :LaatstGewijzigdSinds)) OR (('D' = :Brontaal) AND (Duits.WijzigingsDatumTijd > :LaatstGewijzigdSinds)) )
+ GROUP BY Main.Intern, Main.Type]]>
+
+
+
+
+%SQLQuery
+VertalingsGroep:%String,Brontaal:%String
+ Select Main.Intern, Main.Type, Nederlands.Vertaling As N, Frans.Vertaling As F, Engels.Vertaling As E, Duits.Vertaling As D from Res.VertalingAbstract As Main
+ LEFT JOIN Res.VertalingAbstract As Nederlands On Nederlands.Intern = Main.Intern AND Nederlands.Taal = 'N' AND Main.Type = Nederlands.Type AND Main.Groep = Nederlands.Groep
+ LEFT JOIN Res.VertalingAbstract As Frans On Frans.Intern = Main.Intern AND Frans.Taal = 'F' AND Main.Type = Frans.Type AND Main.Groep = Frans.Groep
+ LEFT JOIN Res.VertalingAbstract As Engels On Engels.Intern = Main.Intern AND Engels.Taal = 'E' AND Main.Type = Engels.Type AND Main.Groep = Engels.Groep
+ LEFT JOIN Res.VertalingAbstract As Duits On Duits.Intern = Main.Intern AND Duits.Taal = 'D' AND Main.Type = Duits.Type AND Main.Groep = Duits.Groep
+ WHERE Main.Groep = :VertalingsGroep AND (Main.Type='K' OR Main.Type = 'O' OR Main.Type = 'L')
+ GROUP BY Main.Intern, Main.Type
+
+
+
+
+%SQLQuery
+ Select Taal From Res.VertalingAbstract
+ Group By Taal
+
+
+
+
Index: APPS/PM/Vertaling/ExcelImport.cls.xml
===================================================================
diff -u
--- APPS/PM/Vertaling/ExcelImport.cls.xml (revision 0)
+++ APPS/PM/Vertaling/ExcelImport.cls.xml (revision 106)
@@ -0,0 +1,123 @@
+
+
+
+1
+%RegisteredObject
+0
+
+
+
+Importeert enkel de 4de kolom (wat bij de export de doeltaal is), indien ImportAlleTalen = 1 dan worden alle talen geïmporteerd
+Do ##class(APPS.PM.Vertaling.ExcelImport).Import("\\NOTES01\SHARED\C S C\ExportOLW.txt","OLW",1,"23/12/2010")
+Do ##class(APPS.PM.Vertaling.ExcelImport).Import("\\NOTES01\SHARED\C S C\ImportPK.txt","PK",1,"23/12/2010")
+1
+FileLocation:%String,VertaalGroep:%String,ImportAlleTalen:%Boolean=0,DatumVanExport:%String=""
+%String
+ 2 = Talen
+ for i = 3:1:$ListLength(lbPieced) {
+ Set Taal(i-2) = ##class(Res.PI.Taal).LongToShort($LG(lbPieced,i))
+ }
+
+ Set TaalImportIndexen = ""
+ If (ImportAlleTalen)
+ {
+ For i=3:1:$Length(Stream.ReadLine(),$$$TAB) Set TaalImportIndexen = TaalImportIndexen_$ListBuild(i)
+ Do Stream.Rewind()
+ }
+ Else
+ {
+ Set TaalImportIndexen = $ListBuild(4)
+ }
+
+ While ('Stream.AtEnd) {
+ Set Line=Stream.ReadLine()
+ if (Line '= "")
+ {
+ For i=1:1:$ListLength(TaalImportIndexen)
+ {
+ Set TaalIndex = $ListGet(TaalImportIndexen,i)
+ Set TaalCode = Taal(TaalIndex-2)
+ Set Vertaling = $Piece(Line,$$$TAB,TaalIndex)
+ Set Intern = $Piece(Line,$$$TAB,1)
+ Set Type = $Piece(Line,$$$TAB,2)
+
+ If ((VertaalGroep '= "") && (Intern '= "") && (Type '= "") && (TaalCode '= ""))
+ {
+
+ Set VertalingsObject = ##class(Res.Vertaling).%OpenId(VertaalGroep_"||"_Intern_"||"_Type_"||"_TaalCode)
+ If (VertalingsObject '= "") {
+ // De vertaling bestond en is gewijzigd
+ Set VertalingsObject.Vertaling = Vertaling
+
+ If ((Tijdstip '= "") && (##class(TECH.DateTime).HorologIsGroterDan(VertalingsObject.WijzigingsDatumTijd,Tijdstip)) && VertalingsObject.%IsModified())
+ {
+ w !,"Combinatie van ("_Intern_", "_Type_", "_TaalCode_") is gewijzigd sinds de exporttijd, gelieve deze handmatig te importeren!"
+ }
+ Else
+ {
+ Set Status = VertalingsObject.%Save()
+ If ($$$ISERR(Status)) {
+ w !,"Fout: "_$$ParseStatus^vhLib(Status)
+ }
+ }
+ }
+ elseif (##class(APPS.PM.Vertaling.ExcelImport).ComboKeyTypeBestaat(Intern,Type,VertaalGroep)) {
+ // De vertaling is nieuw en moet worden toegevoegd
+ Set VertalingsObject = ##class(Res.Vertaling).%New()
+ Do VertalingsObject.GroepSetObjectId(VertaalGroep)
+ Set VertalingsObject.Intern = Intern
+ Do VertalingsObject.TypeSetObjectId(Type)
+ Do VertalingsObject.TaalSetObjectId(TaalCode)
+ Set VertalingsObject.Vertaling = Vertaling
+ Set Status = VertalingsObject.%Save()
+ if ($$$ISERR(Status)) {
+ w !,"Fout: "_$$ParseStatus^vhLib(Status)
+ }
+ }
+ else {
+ w !,"Combinatie van ("_VertaalGroep_", "_Intern_", "_Type_") bestaat nog niet in de databank!"
+ }
+
+ }
+ }
+ }
+ }
+ w !!,"... Import beëindigd"
+]]>
+
+
+
+1
+Intern:%String,TekstType:%String,Groep:%String
+%Boolean
+
+
+
+