1 |
unit LabelData;
|
2 |
|
3 |
// Denne klasse bruges til at samle alle de parametre der skal bruges omkring indleveringspakker
|
4 |
// Constructor'en har selv ansvaret for at pille de relevante data ud af XML dokumentet
|
5 |
|
6 |
|
7 |
interface
|
8 |
uses
|
9 |
XMLDoc,
|
10 |
Xml.XMLIntf;
|
11 |
|
12 |
type
|
13 |
TLabelData = class
|
14 |
public
|
15 |
|
16 |
Overskrift : string;
|
17 |
|
18 |
Stregkode : string;
|
19 |
Tjekkode : string;
|
20 |
|
21 |
//Modtager
|
22 |
Navn : string;
|
23 |
Vejnavn : string;
|
24 |
Postnr : string;
|
25 |
|
26 |
//Afsender
|
27 |
AfsenderNavn: string;
|
28 |
AfsenderAdresse: string;
|
29 |
AfsenderPostnr: string;
|
30 |
|
31 |
|
32 |
PakkeshopNr : string;
|
33 |
PakkeshopNavn : string;
|
34 |
PakkeshopAddr : string;
|
35 |
PakkeshopPostnr : string;
|
36 |
|
37 |
PakkeshopSted : string;
|
38 |
PakkeshopTurid : string;
|
39 |
|
40 |
Koreliste : string;
|
41 |
|
42 |
Shop2Direkte : string;
|
43 |
|
44 |
constructor Create(xmlDoc : TXMLDocument);
|
45 |
|
46 |
end;
|
47 |
|
48 |
|
49 |
|
50 |
implementation
|
51 |
|
52 |
|
53 |
constructor TLabelData.Create(xmlDoc: TXMLDocument);
|
54 |
var
|
55 |
PakkeKontrolNode: Xml.XMLIntf.IXMLNode;
|
56 |
begin
|
57 |
|
58 |
PakkeKontrolNode := xmlDoc.ChildNodes.FindNode('PakkeKontrol'); // Cache opslaget der finder PakkeKontrol noden
|
59 |
|
60 |
Overskrift := PakkeKontrolNode.ChildNodes.FindNode('Overskrift').Text;
|
61 |
|
62 |
Stregkode := PakkeKontrolNode.ChildNodes.FindNode('Stregkode').Text;
|
63 |
Tjekkode := PakkeKontrolNode.ChildNodes.FindNode('Tjekkode').Text;
|
64 |
|
65 |
Navn := PakkeKontrolNode.ChildNodes.FindNode('Navn').Text;
|
66 |
Vejnavn := PakkeKontrolNode.ChildNodes.FindNode('Vejnavn').Text;
|
67 |
Postnr := PakkeKontrolNode.ChildNodes.FindNode('Postnr').Text;
|
68 |
|
69 |
AfsenderNavn := PakkeKontrolNode.ChildNodes.FindNode('AfsenderNavn').Text;
|
70 |
AfsenderAdresse := PakkeKontrolNode.ChildNodes.FindNode('AfsenderAdresse').Text;
|
71 |
AfsenderPostnr := PakkeKontrolNode.ChildNodes.FindNode('AfsenderPostnr').Text;
|
72 |
|
73 |
|
74 |
PakkeshopNr := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopNr').Text;
|
75 |
PakkeshopNavn := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopNavn').Text;
|
76 |
PakkeshopAddr := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopAddr').Text;
|
77 |
PakkeshopPostnr := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopPostnr').Text;
|
78 |
PakkeshopTurid := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopTurid').Text;
|
79 |
|
80 |
PakkeshopSted := PakkeKontrolNode.ChildNodes.FindNode('PakkeshopSted').Text;
|
81 |
|
82 |
Koreliste := PakkeKontrolNode.ChildNodes.FindNode('Koreliste').Text;
|
83 |
|
84 |
Shop2Direkte := PakkeKontrolNode.ChildNodes.FindNode('Shop2Direkte').Text;
|
85 |
|
86 |
|
87 |
end;
|
88 |
|
89 |
|
90 |
end.
|