1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
|
'Componente dello scritto dell'utente di servizi di integrazione dell'assistente di Microsoft SQL
'Questa è la vostra nuova componente dello scritto in Microsoft Visual Basic .NET
'ScriptMain è il codice categoria del entrypoint per le componenti dello scritto
Sistema delle importazioni
Importazioni System.Data
Importazioni System.Math
Importazioni System.IO
Importazioni Microsoft.SqlServer.Dts.Pipeline.Wrapper
Importazioni Microsoft.SqlServer.Dts.Runtime.Wrapper
Importazioni System.Xml
Codice categoria pubblico ScriptMain
Eredita UserComponent
Interruttore fioco come StreamWriter
'Oltre che usando la dichiarazione delle importazioni System.Xml un riferimento deve aggiungersi al
'Assemblea di System.Xml (prescelta Progetto-Aggiungere il riferimento dall'ido)
Oscurare il xWriter come XmlTextWriter
Oscurare OutputFileType come stringa “.csv o .xml„
Il pubblico ignora PreExecute secondario ()
'Leggere soltanto le variabili
Oscurare il gsPickUp come stringa = Me.Variables.gsPickUp “D:\ftproot\Out\Avid„
Oscurare il gsPickUpFilename come stringa = Me.Variables.gsPickUpFilename “1_AVID_„
Oscurare il gsPickUpFileExtn come stringa = Me.Variables.gsPickUpFileExtn “.csv„
Oscurare il gsMemoText come stringa = testo dell'appunto di Me.Variables.gsMemoText “: accreditare la registrazione„
Oscurare il gsStatementText come stringa = testo di dichiarazione di Me.Variables.gsStatementText “: accreditare la registrazione„
Oscurare il gsRunMode come stringa = Me.Variables.gsRunMode “AGGIORNAMENTO„
Oscurare il gsFileType come stringa = Me.Variables.gsFileType
Oscurare il nome di schedario come stringa = gsPickUp & “\„ & gsPickUpFilename
nome di schedario = nome di schedario & (disposizione (ora (), “yyyyMMddHHmm„) .ToString)
'MsgBox (nome di schedario)
OutputFileType = gsPickUpFileExtn
Se OutputFileType = “.xml„ allora
nome di schedario = nome di schedario & gsPickUpFileExtn
'xWriter = nuovo XmlTextWriter (Me.Connections.XMLConnection.ConnectionString, niente)
'xWriter.WriteStartDocument ()
'xWriter.WriteComment (“lima di cliente analizzata using lo scritto„)
'xWriter.WriteStartElement (“x„, “cliente„, “http://some.org/name ")
'xWriter.WriteAttributeString (“nome di schedario„, Me.Connections.XMLConnection.ConnectionString)
xWriter = nuovo XmlTextWriter (nome di schedario, niente)
'xWriter.Formatting = Formatting.Indented
'xWriter.Indentation = 0
xWriter.WriteStartDocument ()
xWriter.WriteComment (“lima di cliente analizzata using lo scritto„)
xWriter.WriteStartElement (“x„, “comunicazione„, "")
'xWriter.WriteAttributeString (“tipo„, gsFileType)
Concluder se
Concludere il sommergibile
Il pubblico ignora ParsedInput_ProcessInputRow secondario (fila di ByVal come ParsedInputBuffer)
Se OutputFileType = “.xml„ allora
xWriter.WriteString (Environment.NewLine)
xWriter.WriteStartElement (“x„, “comunicazione„, "")
xWriter.WriteAttributeString (“tipo„, “LogSMS„)
xWriter.WriteElementString (“CommunicationLog_SMSId„, Row.CommunicationLogSMSId.ToString)
xWriter.WriteElementString (“CommunicationLogId„, Row.CommunicationLogId.ToString)
xWriter.WriteElementString (“LMDealershipCode„, Row.LMDealershipCode.ToString)
xWriter.WriteElementString (“MQDealershipId„, Row.MQDealershipId.ToString)
xWriter.WriteElementString (“ChannelCode„, Row.ChannelCode.ToString)
xWriter.WriteElementString (“VersionId„, Row.VersionId.ToString)
xWriter.WriteElementString (“InstanceId„, Row.InstanceId.ToString)
xWriter.WriteElementString (“SendDateTime„, Row.SendDateTime.ToString)
xWriter.WriteElementString (“TimeZone„, Row.TimeZone.ToString)
xWriter.WriteElementString (“CampaignType„, Row.CampaignType.ToString)
xWriter.WriteElementString (“CampaignCode„, Row.CampaignCode.ToString)
xWriter.WriteElementString (“CampaignName„, Row.CampaignName.ToString)
xWriter.WriteElementString (“CustomerFirstName„, Row.CustomerFirstName.ToString)
xWriter.WriteElementString (“CustomerLastName„, Row.CustomerLastName.ToString)
xWriter.WriteElementString (“CustomerAddress1„, Row.CustomerAddress1.ToString)
xWriter.WriteElementString (“CustomerAddress2„, Row.CustomerAddress2.ToString)
xWriter.WriteElementString (“CustomerCity„, Row.CustomerCity.ToString)
xWriter.WriteElementString (“CustomerState„, Row.CustomerState.ToString)
xWriter.WriteElementString (“CustomerZip„, Row.CustomerZip.ToString)
xWriter.WriteElementString (“CustomerHomePhoneNumber„, Row.CustomerHomePhoneNumber.ToString)
xWriter.WriteElementString (“CustomerCellPhoneNumber„, Row.CustomerCellPhoneNumber.ToString)
xWriter.WriteElementString (“CustomerEmailAddress„, Row.CustomerEmailAddress.ToString)
xWriter.WriteElementString (“VIN„, Row.VIN.ToString)
xWriter.WriteElementString (“DMSEventDateTime„, Row.DMSEventDateTime.ToString)
xWriter.WriteElementString (“DMSEventType„, Row.DMSEventType.ToString)
xWriter.WriteElementString (“DMSRetailCode„, Row.DMSRetailCode.ToString)
xWriter.WriteElementString (“IsTest„, Row.IsTest.ToString)
xWriter.WriteElementString (“ToPhoneNumber„, Row.ToPhoneNumber.ToString)
xWriter.WriteElementString (“FromEmailAddress„, Row.FromEmailAddres.ToString)
xWriter.WriteElementString (“oggetto„, Row.Subject.ToString)
xWriter.WriteElementString (“testo„, fila. [Testo] .ToString)
xWriter.WriteElementString (“ProcessDateTime„, Row.ProcessDateTime.ToString)
xWriter.WriteElementString (“SourceCode„, Row.SourceCode.ToString)
xWriter.WriteElementString (“SourceId1Name„, Row.SourceId1Name.ToString)
xWriter.WriteElementString (“SourceId1Value„, Row.SourceId1Value.ToString)
xWriter.WriteElementString (“SourceId2Name„, Row.SourceId2Name.ToString)
xWriter.WriteElementString (“SourceId2Value„, Row.SourceId2Value.ToString)
xWriter.WriteElementString (“SourceId3Name„, Row.SourceId3Name.ToString)
xWriter.WriteElementString (“SourceId3Value„, Row.SourceId3Value.ToString)
xWriter.WriteEndElement ()
'xWriter.WriteString (Environment.NewLine)
'Scrivere (“ ")
Concluder se
Concludere il sommergibile
Il pubblico ignora PostExecute secondario ()
Se OutputFileType = “.xml„ allora
'xWriter.WriteStartElement (“RecordCount„)
'xWriter.WriteString (Me.Variables.giSuccessCount.ToString)
'xWriter.WriteEndElement ()
'xWriter.WriteEndElement ()
xWriter.WriteEndDocument ()
xWriter.Close ()
Concluder se
Concludere il sommergibile
Concludere il codice categoria
|