Produced by Araxis Merge on 11/2/2017 7:18:11 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | CAPRI_CIF.zip\CAPRI_CIF\Source | managetemplatedefs.pas | Wed Nov 1 18:09:30 2017 UTC |
2 | CAPRI_CIF.zip\CAPRI_CIF\Source | managetemplatedefs.pas | Wed Nov 1 19:28:44 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 1342 |
Changed | 1 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | unit manag etemplated efs; | |
2 | ||
3 | interface | |
4 | ||
5 | uses | |
6 | Windows, | |
7 | Messages , | |
8 | SysUtils , | |
9 | Classes, | |
10 | Graphics , | |
11 | Controls , | |
12 | Forms, | |
13 | Dialogs, | |
14 | ComCtrls , | |
15 | ExtCtrls , | |
16 | StdCtrls , | |
17 | Diaccess , | |
18 | Fmcmpnts , | |
19 | Fmcntrls , | |
20 | Trpcb, | |
21 | CCOWRPCB roker, | |
22 | CCOWRPCB rokerCAPRI , | |
23 | DialogsC APRI, | |
24 | ORCtrls, | |
25 | CAPRISup port, | |
26 | ORFn; | |
27 | ||
28 | type | |
29 | TfrmMana geTemplate Definition s = class( TForm) | |
30 | GroupB ox2: TGrou pBox; | |
31 | FMList BoxRelease dTemplates : TFMListB ox; | |
32 | FMList erReleased Templates: TFMLister ; | |
33 | RPCBro kerDevAcco unt: TCCOW RPCBrokerC APRI; | |
34 | FMList erReleased TemplatesL ocal: TFML ister; | |
35 | PageCo ntrol1: TP ageControl ; | |
36 | TabShe et1: TTabS heet; | |
37 | TabShe et2: TTabS heet; | |
38 | Label1 : TLabel; | |
39 | Label2 : TLabel; | |
40 | Label3 : TLabel; | |
41 | Label4 : TLabel; | |
42 | Label6 : TLabel; | |
43 | Label7 : TLabel; | |
44 | Label8 : TLabel; | |
45 | GroupB ox3: TGrou pBox; | |
46 | FMList BoxRelease dTemplates Local: TFM ListBox; | |
47 | GroupB ox1: TGrou pBox; | |
48 | Label9 : TLabel; | |
49 | Label1 0: TLabel; | |
50 | Label1 1: TLabel; | |
51 | Label1 2: TLabel; | |
52 | Shape1 : TShape; | |
53 | ORList BoxUpdate: TORListBo x; | |
54 | ORList BoxNew: TO RListBox; | |
55 | Button ImportOnly : TButton; | |
56 | Button ImportAll: TButton; | |
57 | ORList BoxTestVer sions: TOR ListBox; | |
58 | Button ImportOnly Test: TBut ton; | |
59 | Button ImportAllT est: TButt on; | |
60 | Button ReloadList : TButton; | |
61 | FMEdit 1: TFMEdit ; | |
62 | FMEdit 2: TFMEdit ; | |
63 | FMEdit 3: TFMEdit ; | |
64 | FMEdit 4: TFMEdit ; | |
65 | FMEdit 5: TFMEdit ; | |
66 | FMEdit 6: TFMEdit ; | |
67 | FMComm entsMemo: TFMMemo; | |
68 | Button 1: TButton ; | |
69 | FMGets TemplateIn fo: TFMGet s; | |
70 | RichEd itFormDef: TRichEdit ; | |
71 | proced ure Button ReloadList Click(Send er: TObjec t); | |
72 | proced ure FormCl oseQuery(S ender: TOb ject; var CanClose: Boolean); | |
73 | proced ure FMList BoxRelease dTemplates LocalClick (Sender: T Object); | |
74 | proced ure Button 1Click(Sen der: TObje ct); | |
75 | proced ure FMEdit 1Change(Se nder: TObj ect); | |
76 | proced ure ORList BoxTestVer sionsClick (Sender: T Object); | |
77 | proced ure ORList BoxNewClic k(Sender: TObject); | |
78 | proced ure Button ImportAllC lick(Sende r: TObject ); | |
79 | proced ure Button ImportOnly Click(Send er: TObjec t); | |
80 | proced ure Button ImportAllT estClick(S ender: TOb ject); | |
81 | proced ure Button ImportOnly TestClick( Sender: TO bject); | |
82 | private | |
83 | { Priv ate declar ations } | |
84 | public | |
85 | { Publ ic declara tions } | |
86 | end; | |
87 | ||
88 | var | |
89 | frmManag eTemplateD efinitions : TfrmMana geTemplate Definition s; | |
90 | ||
91 | implementa tion | |
92 | ||
93 | uses main; | |
94 | ||
95 | var | |
96 | xUpdatin g: boolean ; | |
97 | maxLines : integer; | |
98 | ||
99 | {$R *.DFM} | |
100 | ||
101 | procedure TfrmManage TemplateDe finitions. ButtonRelo adListClic k(Sender: TObject); | |
102 | var | |
103 | x, y: in teger; | |
104 | foundfla g: boolean ; | |
105 | foundupd ate: boole an; | |
106 | foundupd ateIEN: st ring; | |
107 | tempstri ng, tempst ringlocal: string; | |
108 | begin | |
109 | xUpdatin g := True; | |
110 | fmGetsTe mplateInfo .RPCBroker := frmMai n.RPCBroke r1; | |
111 | ButtonIm portAll.En abled := F alse; | |
112 | ButtonIm portOnly.E nabled := False; | |
113 | ButtonIm portAllTes t.Enabled := False; | |
114 | ButtonIm portOnlyTe st.Enabled := False; | |
115 | FMEdit1. Color := c lWhite; | |
116 | FMEdit2. Color := c lWhite; | |
117 | FMEdit3. Color := c lWhite; | |
118 | FMEdit4. Color := c lWhite; | |
119 | FMEdit5. Color := c lWhite; | |
120 | FMEdit6. Color := c lWhite; | |
121 | FMCommen tsMemo.Col or := clWh ite; | |
122 | Button1. Enabled := False; | |
123 | FMEdit1. Text := '' ; | |
124 | FMEdit2. Text := '' ; | |
125 | FMEdit3. Text := '' ; | |
126 | FMEdit4. Text := '' ; | |
127 | FMEdit5. Text := '' ; | |
128 | FMEdit6. Text := '' ; | |
129 | FMCommen tsMemo.Lin es.Clear; | |
130 | ||
131 | screen.c ursor := c rHourglass ; | |
132 | ORListBo xNew.Items .Clear; | |
133 | ORListBo xUpdate.It ems.Clear; | |
134 | ORListBo xTestVersi ons.Items. Clear; | |
135 | RPCBroke rDevAccoun t.Connecte d := False ; | |
136 | RPCBroke rDevAccoun t.RPCTimeL imit := 28 800; | |
137 | RPCBrokerD evAccount. Server := 'cor. DNS . URL '; | |
138 | RPCBrokerD evAccount. ListenerPo rt := PORT ; | |
139 | RPCBroke rDevAccoun t.ANUUserS pecs := | |
140 | Author SSN + '^' + | |
141 | Author Name + '^' + | |
142 | UserDi vision + ' ^' + // Si te | |
143 | UserDivi sionNumber + '^' + / / Site num | |
144 | AuthorIE N; | |
145 | try | |
146 | RPCBroke rDevAccoun t.Connecte d := True except beg in | |
147 | frmM ain.Animat eLogo(Fals e); | |
148 | RPCB rokerDevAc count.Conn ected := F alse; | |
149 | Show MessageCAP RI('Develo pment acco unt server cannot be accessed! '); | |
150 | appl ication.te rminate; | |
151 | exit ; | |
152 | end | |
153 | end; | |
154 | if not R PCBrokerDe vAccount.C reateConte xt('DVBA C APRI GUI') then begi n | |
155 | ShowMe ssageCAPRI ('Could no t use opti on "DVBA C APRI GUI!" '); | |
156 | applic ation.term inate; | |
157 | end; | |
158 | FMListBo xReleasedT emplates.G etList; | |
159 | screen.c ursor := c rHourglass ; | |
160 | RPCBroke rDevAccoun t.Connecte d := False ; | |
161 | screen.c ursor := c rHourglass ; | |
162 | FMListBo xReleasedT emplatesLo cal.GetLis t; | |
163 | screen.c ursor := c rHourglass ; | |
164 | FMListBo xReleasedT emplatesLo cal.visibl e := false ; | |
165 | for x := 0 to FMLi stBoxRelea sedTemplat es.Items.C ount - 1 d o begin | |
166 | FMList BoxRelease dTemplates .ItemIndex := x; | |
167 | FoundF lag := fal se; | |
168 | FoundU pdate := F alse; | |
169 | FoundU pdateIEN : = ''; | |
170 | tempst ring := FM ListBoxRel easedTempl ates.Items [x]; | |
171 | for y := 0 to FM ListBoxRel easedTempl atesLocal. Items.Coun t - 1 do b egin | |
172 | FMLi stBoxRelea sedTemplat esLocal.It emIndex := y; | |
173 | temp stringloca l := FMLis tBoxReleas edTemplate sLocal.Ite ms[y]; | |
174 | if f rmMain.Pie ce(tempStr ing, '^', 1) = frmMa in.Piece(t empStringl ocal, '^', 1) then | |
175 | if frmMain.P iece(tempS tring, '^' , 2) <> fr mMain.Piec e(tempStri ngLocal, ' ^', 2) the n begin | |
176 | FoundUpdat e := True; | |
177 | FoundUpdat eIEN := FM ListBoxRel easedTempl atesLocal. GetSelecte dRecord.IE N; | |
178 | en d; | |
179 | if t empstring = tempstri nglocal th en | |
180 | fo undflag := true; | |
181 | end; | |
182 | if fou ndflag <> true then | |
183 | if f oundUpdate = true th en begin | |
184 | // Add to up date secti on | |
185 | OR ListBoxUpd ate.Items. Add(FoundU pdateIEN + '^' + FML istBoxRele asedTempla tes.Getsel ectedRecor d.IEN + '^ ' + tempst ring); | |
186 | end | |
187 | else begin | |
188 | // Add to ne w section | |
189 | if Pos('T', frmMain.Pi ece(frmMai n.Piece(te mpstring, '^', 1), ' ~', 2)) > 0 then beg in | |
190 | ORListBoxT estVersion s.Items.Ad d(FMListBo xReleasedT emplates.G etselected Record.IEN + '^' + t empstring) ; | |
191 | en d | |
192 | el se begin | |
193 | ORListBoxN ew.Items.A dd(FMListB oxReleased Templates. Getselecte dRecord.IE N + '^' + tempstring ); | |
194 | en d; | |
195 | end; | |
196 | end; | |
197 | ||
198 | // Remov e activati on date fr om display to user | |
199 | if FMLis tBoxReleas edTemplate sLocal.Ite ms.Count > 0 then | |
200 | for x := FMListB oxReleased TemplatesL ocal.Items .Count - 1 downto 0 do | |
201 | FMLi stBoxRelea sedTemplat esLocal.It ems[x] := frmMain.Pi ece(FMList BoxRelease dTemplates Local.Item s[x], '^', 1); | |
202 | ||
203 | FMListBo xReleasedT emplatesLo cal.visibl e := True; | |
204 | screen.c ursor := c rDefault; | |
205 | ||
206 | if FMLis tBoxReleas edTemplate sLocal.Ite ms.Count > 0 then be gin | |
207 | FMList BoxRelease dTemplates Local.Item Index := 0 ; | |
208 | FMList BoxRelease dTemplates LocalClick (Applicati on); | |
209 | end; | |
210 | ||
211 | if (ORLi stBoxUpdat e.Items.Co unt > 0) o r (ORListB oxNew.Item s.Count > 0) then | |
212 | Button ImportAll. Enabled := True; | |
213 | if ORLis tBoxTestVe rsions.Ite ms.Count > 0 then | |
214 | Button ImportAllT est.Enable d := True; | |
215 | xUpdatin g := False ; | |
216 | end; | |
217 | ||
218 | procedure TfrmManage TemplateDe finitions. FormCloseQ uery(Sende r: TObject ; | |
219 | var CanC lose: Bool ean); | |
220 | begin | |
221 | // Preve nt exit if broker ca ll is runn ing. | |
222 | if ANURe moteProced ureCallInP rogress = True then | |
223 | CanClo se := Fals e; | |
224 | if FMEdi t1.Color = clYellow then | |
225 | if App lication.M essageBox( 'Save your changes o n the "Edi t Local" t ab before closing? If you ans wer "no," your chang es will be lost.', ' Save?', 4) = 6 then begin | |
226 | Butt on1Click(A pplication ); | |
227 | end; | |
228 | end; | |
229 | ||
230 | procedure TfrmManage TemplateDe finitions. FMListBoxR eleasedTem platesLoca lClick( | |
231 | Sender: TObject); | |
232 | begin | |
233 | if FMEdi t1.Color = clYellow then | |
234 | if App lication.M essageBox( 'Save your changes? If you do n''t save, changes w ill be los t.', 'Save ?', 4) = 6 then begi n | |
235 | Butt on1Click(A pplication ); | |
236 | exit ; | |
237 | end; | |
238 | xUpdatin g := true; | |
239 | FMGetsTe mplateInfo .IENS := F MListBoxRe leasedTemp latesLocal .GetSelect edRecord.I EN; | |
240 | FMGetsTe mplateInfo .GetAndFil l; | |
241 | FMEdit1. Color := c lWhite; | |
242 | FMEdit2. Color := c lWhite; | |
243 | FMEdit3. Color := c lWhite; | |
244 | FMEdit4. Color := c lWhite; | |
245 | FMEdit5. Color := c lWhite; | |
246 | FMEdit6. Color := c lWhite; | |
247 | FMCommen tsMemo.Col or := clWh ite; | |
248 | Button1. Enabled := False; | |
249 | xUpdatin g := False ; | |
250 | end; | |
251 | ||
252 | procedure TfrmManage TemplateDe finitions. Button1Cli ck(Sender: TObject); | |
253 | begin | |
254 | if FMEdi t1.FMModif ied then | |
255 | if FME dit1.Valid ate then b egin | |
256 | frmM ain.fmfile r1.AddChgd Control(FM Edit1); | |
257 | FMEd it1.Text : = FMEdit1. FMCtrlExte rnal; | |
258 | end | |
259 | else b egin | |
260 | frmM ain.FMVali dator1.Dis playErrors ; | |
261 | FMEd it1.Text : = FMEdit1. FMTag; | |
262 | end; | |
263 | if FMEdi t2.FMModif ied then | |
264 | if FME dit2.Valid ate then b egin | |
265 | frmM ain.fmfile r1.AddChgd Control(FM Edit2); | |
266 | FMEd it2.Text : = FMEdit2. FMCtrlExte rnal; | |
267 | end | |
268 | else b egin | |
269 | frmM ain.FMVali dator1.Dis playErrors ; | |
270 | FMEd it2.Text : = FMEdit2. FMTag; | |
271 | end; | |
272 | if FMEdi t3.FMModif ied then | |
273 | if FME dit3.Valid ate then b egin | |
274 | frmM ain.fmfile r1.AddChgd Control(FM Edit3); | |
275 | FMEd it3.Text : = FMEdit3. FMCtrlExte rnal; | |
276 | end | |
277 | else b egin | |
278 | frmM ain.FMVali dator1.Dis playErrors ; | |
279 | FMEd it3.Text : = FMEdit3. FMTag; | |
280 | end; | |
281 | if FMEdi t4.FMModif ied then | |
282 | if FME dit4.Valid ate then b egin | |
283 | frmM ain.fmfile r1.AddChgd Control(FM Edit4); | |
284 | FMEd it4.Text : = FMEdit4. FMCtrlExte rnal; | |
285 | end | |
286 | else b egin | |
287 | frmM ain.FMVali dator1.Dis playErrors ; | |
288 | FMEd it4.Text : = FMEdit4. FMTag; | |
289 | end; | |
290 | if FMEdi t5.FMModif ied then | |
291 | if FME dit5.Valid ate then b egin | |
292 | frmM ain.fmfile r1.AddChgd Control(FM Edit5); | |
293 | FMEd it5.Text : = FMEdit5. FMCtrlExte rnal; | |
294 | end | |
295 | else b egin | |
296 | frmM ain.FMVali dator1.Dis playErrors ; | |
297 | FMEd it5.Text : = FMEdit5. FMTag; | |
298 | end; | |
299 | if FMEdi t6.FMModif ied then | |
300 | if FME dit6.Valid ate then b egin | |
301 | frmM ain.fmfile r1.AddChgd Control(FM Edit6); | |
302 | FMEd it6.Text : = FMEdit6. FMCtrlExte rnal; | |
303 | end | |
304 | else b egin | |
305 | frmM ain.FMVali dator1.Dis playErrors ; | |
306 | FMEd it6.Text : = FMEdit6. FMTag; | |
307 | end; | |
308 | frmMain. fmfiler1.A ddChgdCont rol(FMComm entsMemo); | |
309 | if frmMa in.FMFiler 1.Anything ToFile the n | |
310 | if frm Main.FMFil er1.Update then begi n | |
311 | end | |
312 | else b egin | |
313 | Show messageCAP RI('All da ta wasn''t saved. P lease doub le-check t he entries and try a gain.'); | |
314 | end; | |
315 | ||
316 | FMEdit1. Color := c lWhite; | |
317 | FMEdit2. Color := c lWhite; | |
318 | FMEdit3. Color := c lWhite; | |
319 | FMEdit4. Color := c lWhite; | |
320 | FMEdit5. Color := c lWhite; | |
321 | FMEdit6. Color := c lWhite; | |
322 | FMCommen tsMemo.Col or := clWh ite; | |
323 | Button1. Enabled := False; | |
324 | if xUpda ting <> tr ue then | |
325 | button ReloadList Click(appl ication); | |
326 | end; | |
327 | ||
328 | procedure TfrmManage TemplateDe finitions. FMEdit1Cha nge(Sender : TObject) ; | |
329 | begin | |
330 | if xupda ting = Fal se then be gin | |
331 | FMEdit 1.Color := clYellow; | |
332 | FMEdit 2.Color := clYellow; | |
333 | FMEdit 3.Color := clYellow; | |
334 | FMEdit 4.Color := clYellow; | |
335 | FMEdit 5.Color := clYellow; | |
336 | FMEdit 6.Color := clYellow; | |
337 | FMComm entsMemo.C olor := cl Yellow; | |
338 | Button 1.Enabled := True; | |
339 | end; | |
340 | end; | |
341 | ||
342 | procedure TfrmManage TemplateDe finitions. ORListBoxT estVersion sClick( | |
343 | Sender: TObject); | |
344 | var | |
345 | x: integ er; | |
346 | foundfla g: boolean ; | |
347 | begin | |
348 | foundfla g := false ; | |
349 | if ORLis tBoxTestVe rsions.Ite ms.Count > 0 then | |
350 | for x := 0 to OR ListBoxTes tVersions. Items.Coun t - 1 do | |
351 | if O RListBoxTe stVersions .Selected[ x] = true then | |
352 | fo undflag := true; | |
353 | if Found Flag = tru e then | |
354 | Button ImportOnly Test.Enabl ed := True | |
355 | else | |
356 | Button ImportOnly Test.Enabl ed := Fals e; | |
357 | end; | |
358 | ||
359 | procedure TfrmManage TemplateDe finitions. ORListBoxN ewClick(Se nder: TObj ect); | |
360 | var | |
361 | x: integ er; | |
362 | foundfla g: boolean ; | |
363 | begin | |
364 | foundfla g := false ; | |
365 | if ORLis tBoxUpdate .Items.Cou nt > 0 the n | |
366 | for x := 0 to OR ListBoxUpd ate.Items. Count - 1 do | |
367 | if O RListBoxUp date.Selec ted[x] = t rue then | |
368 | fo undflag := true; | |
369 | if ORLis tBoxNew.It ems.Count > 0 then | |
370 | for x := 0 to OR ListBoxNew .Items.Cou nt - 1 do | |
371 | if O RListBoxNe w.Selected [x] = true then | |
372 | fo undflag := true; | |
373 | if Found Flag = tru e then | |
374 | Button ImportOnly .Enabled : = True | |
375 | else | |
376 | Button ImportOnly .Enabled : = False; | |
377 | end; | |
378 | ||
379 | procedure TfrmManage TemplateDe finitions. ButtonImpo rtAllClick ( | |
380 | Sender: TObject); | |
381 | var | |
382 | x: integ er; | |
383 | begin | |
384 | if Appli cation.Mes sageBox('A re you sur e you want to update your temp late defin itions?', 'Update Te mplates?', 4) <> 6 t hen | |
385 | exit; | |
386 | ||
387 | if ORLis tBoxUpdate .Items.Cou nt > 0 the n | |
388 | for x := 0 to OR ListBoxUpd ate.Items. Count - 1 do | |
389 | ORLi stBoxUpdat e.Selected [x] := tru e; | |
390 | if ORLis tBoxNew.It ems.Count > 0 then | |
391 | for x := 0 to OR ListBoxNew .Items.Cou nt - 1 do | |
392 | ORLi stBoxNew.S elected[x] := true; | |
393 | ButtonIm portOnlyCl ick(Applic ation); | |
394 | ||
395 | end; | |
396 | ||
397 | procedure TfrmManage TemplateDe finitions. ButtonImpo rtOnlyClic k( | |
398 | Sender: TObject); | |
399 | var | |
400 | x, y, xx : integer; | |
401 | fmDateNo w: string; | |
402 | tempIEN: string; | |
403 | begin | |
404 | if Appli cation.Mes sageBox('A re you sur e you want to update your temp late defin itions?', 'Update Te mplates?', 4) <> 6 t hen | |
405 | exit; | |
406 | ||
407 | xUpdatin g := True; | |
408 | frmMain. RPCBroker1 .RemotePro cedure := 'ORWU DT'; | |
409 | frmMain. RPCBroker1 .Param[1]. Value := ' NOW'; | |
410 | frmMain. RPCBroker1 .Param[1]. PType := l iteral; | |
411 | frmMain. RPCBroker1 .Call; | |
412 | fmdateno w := frmMa in.RPCBrok er1.Result s[0]; | |
413 | fmdateno w := copy( fmdatenow, 1, pos('. ', fmdaten ow) - 1); | |
414 | // Conne ct to Serv er | |
415 | frmMain. RPCBroker1 .ANUUserSp ecs := | |
416 | Author SSN + '^' + | |
417 | Author Name + '^' + | |
418 | UserDi vision + ' ^' + // Si te | |
419 | UserDivi sionNumber + '^' + / / Site num | |
420 | AuthorIE N; | |
421 | try | |
422 | RPCBroke rDevAccoun t.Connecte d := True except beg in | |
423 | frmM ain.Animat eLogo(Fals e); | |
424 | RPCB rokerDevAc count.Conn ected := F alse; | |
425 | Show MessageCAP RI('Develo pment acco unt server cannot be accessed! '); | |
426 | appl ication.te rminate; | |
427 | exit ; | |
428 | end | |
429 | end; | |
430 | if not R PCBrokerDe vAccount.C reateConte xt('DVBA C APRI GUI') then begi n | |
431 | ShowMe ssageCAPRI ('Could no t use opti on "DVBA C APRI GUI!" '); | |
432 | applic ation.term inate; | |
433 | end; | |
434 | ||
435 | // Now g et forms | |
436 | fmGetsTe mplateInfo .RPCBroker := RPCBro kerDevAcco unt; | |
437 | for x := 0 to ORLi stBoxNew.I tems.Count - 1 do | |
438 | if ORL istBoxNew. Selected[x ] = True t hen begin | |
439 | fmGe tsTemplate Info.RPCBr oker := RP CBrokerDev Account; | |
440 | fmGe tsTemplate Info.IENS := piece(O RListBoxNe w.Items[x] , '^', 1); | |
441 | fmGe tsTemplate Info.GetAn dFill; | |
442 | // N ow get for m definiti on | |
443 | RPCB rokerDevAc count.Remo teProcedur e := 'DVBA B TEMPLATE DEFINITIO N'; | |
444 | RPCB rokerDevAc count.Para m[0].Value := Piece( fmGetsTemp lateInfo.I ENS, ',', 1); | |
445 | RPCB rokerDevAc count.Para m[0].PType := litera l; | |
446 | RPCB rokerDevAc count.Para m[1].Value := '1'; | |
447 | RPCB rokerDevAc count.Para m[1].PType := litera l; | |
448 | //fr mMain.RPCB rokerCall; RPCBroker DevAccount .Call; | |
449 | try | |
450 | RP CBrokerDev Account.Ca ll; | |
451 | exce pt | |
452 | on EBrokerEr ror do beg in | |
453 | ANURemoteP rocedureCa llInProgre ss := Fals e; | |
454 | ShowMessag eCAPRI('DV BAB TEMPLA TE DEFINIT ION could not be acc essed!'); | |
455 | en d; | |
456 | end; | |
457 | Quic kCopy(RPCB rokerDevAc count.Resu lts, RichE ditFormDef ); | |
458 | // G ot everyth ing. Thes e are new forms, not updates, so need so save them into a ne w record. | |
459 | ||
460 | FMEd it1.IENS : = '+1,'; | |
461 | FMEd it2.IENS : = '+1,'; | |
462 | FMEd it3.IENS : = '+1,'; | |
463 | FMEd it4.IENS : = '+1,'; | |
464 | FMEd it5.IENS : = '+1,'; | |
465 | FMEd it6.IENS : = '+1,'; | |
466 | FMCo mmentsMemo .IENS := ' +1,'; | |
467 | Butt on1Click(A pplication ); | |
468 | xx : = 0; | |
469 | MaxL ines := 20 0; | |
470 | temp IEN := frm Main.FMFil er1.FindIe n('+1,'); | |
471 | if P os('^396.1 84', RichE ditFormDef .Lines[0]) = 0 then | |
472 | Ri chEditForm Def.Lines. Insert(0, '^396.184^ ' + inttos tr(RichEdi tFormDef.L ines.Count ) + '^' + inttostr(R ichEditFor mDef.Lines .Count) + '^' + fmda tenow + '^ ^^^'); | |
473 | repe at begin | |
474 | frmMain.RP CBroker1.R emoteProce dure := 'D VBAB TEMPL ATE DEFINI TION UPDT' ; | |
475 | frmMain.RP CBroker1.P aram[0].Va lue := tem pIEN; | |
476 | frmMain.RP CBroker1.P aram[0].PT ype := lit eral; | |
477 | frmMain.RP CBroker1.P aram[1].Va lue := '1' ; | |
478 | frmMain.RP CBroker1.P aram[1].PT ype := lit eral; | |
479 | y := 0; | |
480 | repeat beg in | |
481 | frmMai n.RPCBroke r1.Param[2 ].Mult[int tostr(y + 1)] := ric hEditFormD ef.lines[x x + y]; | |
482 | frmMai n.RPCBroke r1.Param[2 ].PType := list; | |
483 | inc(y) ; | |
484 | end until ((y + xx > RichEditF ormDef.Lin es.Count - 1) or (y = maxlines )); | |
485 | frmMain.RP CBroker1.P aram[3].Va lue := int tostr(y); | |
486 | frmMain.RP CBroker1.P aram[3].PT ype := lit eral; | |
487 | frmMain.RP CBroker1.P aram[4].Va lue := int tostr(xx); | |
488 | frmMain.RP CBroker1.P aram[4].PT ype := lit eral; | |
489 | frmMain.RP CBroker1.C all; | |
490 | xx := xx + y; | |
491 | end until (xx > richEdit FormDef.Li nes.Count - 1); | |
492 | end; | |
493 | ||
494 | // Now g et forms | |
495 | fmGetsTe mplateInfo .RPCBroker := RPCBro kerDevAcco unt; | |
496 | for x := 0 to ORLi stBoxUpdat e.Items.Co unt - 1 do | |
497 | if ORL istBoxUpda te.Selecte d[x] = Tru e then beg in | |
498 | fmGe tsTemplate Info.RPCBr oker := RP CBrokerDev Account; | |
499 | fmGe tsTemplate Info.IENS := piece(O RListBoxUp date.Items [x], '^', 2); | |
500 | fmGe tsTemplate Info.GetAn dFill; | |
501 | // N ow get for m definiti on | |
502 | RPCB rokerDevAc count.Remo teProcedur e := 'DVBA B TEMPLATE DEFINITIO N'; | |
503 | RPCB rokerDevAc count.Para m[0].Value := Piece( fmGetsTemp lateInfo.I ENS, ',', 1); | |
504 | RPCB rokerDevAc count.Para m[0].PType := litera l; | |
505 | RPCB rokerDevAc count.Para m[1].Value := '1'; | |
506 | RPCB rokerDevAc count.Para m[1].PType := litera l; | |
507 | //fr mMain.RPCB rokerCall; RPCBroker DevAccount .Call; | |
508 | try | |
509 | RP CBrokerDev Account.Ca ll; | |
510 | exce pt | |
511 | on EBrokerEr ror do beg in | |
512 | ANURemoteP rocedureCa llInProgre ss := Fals e; | |
513 | ShowMessag eCAPRI('DV BAB TEMPLA TE DEFINIT ION could not be acc essed!'); | |
514 | en d; | |
515 | end; | |
516 | Quic kCopy(RPCB rokerDevAc count.Resu lts, RichE ditFormDef ); | |
517 | // G ot everyth ing. Thes e are new forms, not updates, so need so save them into a ne w record. | |
518 | ||
519 | FMEd it1.IENS : = Piece(OR ListBoxUpd ate.Items[ x], '^', 1 ); | |
520 | FMEd it2.IENS : = FMEdit1. IENS; | |
521 | FMEd it3.IENS : = FMEdit1. IENS; | |
522 | FMEd it4.IENS : = FMEdit1. IENS; | |
523 | FMEd it5.IENS : = FMEdit1. IENS; | |
524 | FMEd it6.IENS : = FMEdit1. IENS; | |
525 | FMCo mmentsMemo .IENS := F MEdit1.IEN S; | |
526 | Butt on1Click(A pplication ); | |
527 | xx : = 0; | |
528 | MaxL ines := 20 0; | |
529 | temp IEN := FME dit1.IENS; | |
530 | if P os('^396.1 84', RichE ditFormDef .Lines[0]) = 0 then | |
531 | Ri chEditForm Def.Lines. Insert(0, '^396.184^ ' + inttos tr(RichEdi tFormDef.L ines.Count ) + '^' + inttostr(R ichEditFor mDef.Lines .Count) + '^' + fmda tenow + '^ ^^^'); | |
532 | repe at begin | |
533 | frmMain.RP CBroker1.R emoteProce dure := 'D VBAB TEMPL ATE DEFINI TION UPDT' ; | |
534 | frmMain.RP CBroker1.P aram[0].Va lue := tem pIEN; | |
535 | frmMain.RP CBroker1.P aram[0].PT ype := lit eral; | |
536 | frmMain.RP CBroker1.P aram[1].Va lue := '1' ; | |
537 | frmMain.RP CBroker1.P aram[1].PT ype := lit eral; | |
538 | y := 0; | |
539 | repeat beg in | |
540 | frmMai n.RPCBroke r1.Param[2 ].Mult[int tostr(y + 1)] := ric hEditFormD ef.lines[x x + y]; | |
541 | frmMai n.RPCBroke r1.Param[2 ].PType := list; | |
542 | inc(y) ; | |
543 | end until ((y + xx > RichEditF ormDef.Lin es.Count - 1) or (y = maxlines )); | |
544 | frmMain.RP CBroker1.P aram[3].Va lue := int tostr(y); | |
545 | frmMain.RP CBroker1.P aram[3].PT ype := lit eral; | |
546 | frmMain.RP CBroker1.P aram[4].Va lue := int tostr(xx); | |
547 | frmMain.RP CBroker1.P aram[4].PT ype := lit eral; | |
548 | frmMain.RP CBroker1.C all; | |
549 | xx := xx + y; | |
550 | end until (xx > richEdit FormDef.Li nes.Count - 1); | |
551 | end; | |
552 | ||
553 | RPCBroke rDevAccoun t.Connecte d := False ; | |
554 | buttonRe loadListCl ick(Applic ation); | |
555 | xUpdatin g := False ; | |
556 | end; | |
557 | ||
558 | procedure TfrmManage TemplateDe finitions. ButtonImpo rtAllTestC lick( | |
559 | Sender: TObject); | |
560 | var | |
561 | x: integ er; | |
562 | begin | |
563 | if Appli cation.Mes sageBox('A re you sur e you want to update your temp late defin itions?', 'Update Te mplates?', 4) <> 6 t hen | |
564 | exit; | |
565 | ||
566 | if ORLis tBoxTestVe rsions.Ite ms.Count > 0 then | |
567 | for x := 0 to OR ListBoxTes tVersions. Items.Coun t - 1 do | |
568 | ORLi stBoxTestV ersions.Se lected[x] := true; | |
569 | ButtonIm portOnlyTe stClick(Ap plication) ; | |
570 | end; | |
571 | ||
572 | procedure TfrmManage TemplateDe finitions. ButtonImpo rtOnlyTest Click( | |
573 | Sender: TObject); | |
574 | var | |
575 | x, y, xx : integer; | |
576 | fmDateNo w: string; | |
577 | tempIEN: string; | |
578 | begin | |
579 | if Appli cation.Mes sageBox('A re you sur e you want to update your temp late defin itions?', 'Update Te mplates?', 4) <> 6 t hen | |
580 | exit; | |
581 | ||
582 | xUpdatin g := True; | |
583 | frmMain. RPCBroker1 .RemotePro cedure := 'ORWU DT'; | |
584 | frmMain. RPCBroker1 .Param[1]. Value := ' NOW'; | |
585 | frmMain. RPCBroker1 .Param[1]. PType := l iteral; | |
586 | frmMain. RPCBroker1 .Call; | |
587 | fmdateno w := frmMa in.RPCBrok er1.Result s[0]; | |
588 | fmdateno w := copy( fmdatenow, 1, pos('. ', fmdaten ow) - 1); | |
589 | // Conne ct to Serv er | |
590 | frmMain. RPCBroker1 .ANUUserSp ecs := | |
591 | Author SSN + '^' + | |
592 | Author Name + '^' + | |
593 | UserDi vision + ' ^' + // Si te | |
594 | UserDivi sionNumber + '^' + / / Site num | |
595 | AuthorIE N; | |
596 | try | |
597 | RPCBroke rDevAccoun t.Connecte d := True except beg in | |
598 | frmM ain.Animat eLogo(Fals e); | |
599 | RPCB rokerDevAc count.Conn ected := F alse; | |
600 | Show MessageCAP RI('Develo pment acco unt server cannot be accessed! '); | |
601 | appl ication.te rminate; | |
602 | exit ; | |
603 | end | |
604 | end; | |
605 | if not R PCBrokerDe vAccount.C reateConte xt('DVBA C APRI GUI') then begi n | |
606 | ShowMe ssageCAPRI ('Could no t use opti on "DVBA C APRI GUI!" '); | |
607 | applic ation.term inate; | |
608 | end; | |
609 | ||
610 | // Now g et forms | |
611 | fmGetsTe mplateInfo .RPCBroker := RPCBro kerDevAcco unt; | |
612 | for x := 0 to ORLi stBoxTestV ersions.It ems.Count - 1 do | |
613 | if ORL istBoxTest Versions.S elected[x] = True th en begin | |
614 | fmGe tsTemplate Info.RPCBr oker := RP CBrokerDev Account; | |
615 | fmGe tsTemplate Info.IENS := piece(O RListBoxTe stVersions .Items[x], '^', 1); | |
616 | fmGe tsTemplate Info.GetAn dFill; | |
617 | // N ow get for m definiti on | |
618 | RPCB rokerDevAc count.Remo teProcedur e := 'DVBA B TEMPLATE DEFINITIO N'; | |
619 | RPCB rokerDevAc count.Para m[0].Value := Piece( fmGetsTemp lateInfo.I ENS, ',', 1); | |
620 | RPCB rokerDevAc count.Para m[0].PType := litera l; | |
621 | RPCB rokerDevAc count.Para m[1].Value := '1'; | |
622 | RPCB rokerDevAc count.Para m[1].PType := litera l; | |
623 | //fr mMain.RPCB rokerCall; RPCBroker DevAccount .Call; | |
624 | try | |
625 | RP CBrokerDev Account.Ca ll; | |
626 | exce pt | |
627 | on EBrokerEr ror do beg in | |
628 | ANURemoteP rocedureCa llInProgre ss := Fals e; | |
629 | ShowMessag eCAPRI('DV BAB TEMPLA TE DEFINIT ION could not be acc essed!'); | |
630 | en d; | |
631 | end; | |
632 | Quic kCopy(RPCB rokerDevAc count.Resu lts, RichE ditFormDef ); | |
633 | // G ot everyth ing. Thes e are new forms, not updates, so need so save them into a ne w record. | |
634 | ||
635 | FMEd it1.IENS : = '+1,'; | |
636 | FMEd it2.IENS : = '+1,'; | |
637 | FMEd it3.IENS : = '+1,'; | |
638 | FMEd it4.IENS : = '+1,'; | |
639 | FMEd it5.IENS : = '+1,'; | |
640 | FMEd it6.IENS : = '+1,'; | |
641 | FMCo mmentsMemo .IENS := ' +1,'; | |
642 | Butt on1Click(A pplication ); | |
643 | xx : = 0; | |
644 | MaxL ines := 20 0; | |
645 | temp IEN := frm Main.FMFil er1.FindIe n('+1,'); | |
646 | if P os('^396.1 84', RichE ditFormDef .Lines[0]) = 0 then | |
647 | Ri chEditForm Def.Lines. Insert(0, '^396.184^ ' + inttos tr(RichEdi tFormDef.L ines.Count ) + '^' + inttostr(R ichEditFor mDef.Lines .Count) + '^' + fmda tenow + '^ ^^^'); | |
648 | repe at begin | |
649 | frmMain.RP CBroker1.R emoteProce dure := 'D VBAB TEMPL ATE DEFINI TION UPDT' ; | |
650 | frmMain.RP CBroker1.P aram[0].Va lue := tem pIEN; | |
651 | frmMain.RP CBroker1.P aram[0].PT ype := lit eral; | |
652 | frmMain.RP CBroker1.P aram[1].Va lue := '1' ; | |
653 | frmMain.RP CBroker1.P aram[1].PT ype := lit eral; | |
654 | y := 0; | |
655 | repeat beg in | |
656 | frmMai n.RPCBroke r1.Param[2 ].Mult[int tostr(y + 1)] := ric hEditFormD ef.lines[x x + y]; | |
657 | frmMai n.RPCBroke r1.Param[2 ].PType := list; | |
658 | inc(y) ; | |
659 | end until ((y + xx > RichEditF ormDef.Lin es.Count - 1) or (y = maxlines )); | |
660 | frmMain.RP CBroker1.P aram[3].Va lue := int tostr(y); | |
661 | frmMain.RP CBroker1.P aram[3].PT ype := lit eral; | |
662 | frmMain.RP CBroker1.P aram[4].Va lue := int tostr(xx); | |
663 | frmMain.RP CBroker1.P aram[4].PT ype := lit eral; | |
664 | frmMain.RP CBroker1.C all; | |
665 | xx := xx + y; | |
666 | end until (xx > richEdit FormDef.Li nes.Count - 1); | |
667 | end; | |
668 | RPCBroke rDevAccoun t.Connecte d := False ; | |
669 | buttonRe loadListCl ick(Applic ation); | |
670 | xUpdatin g := False ; | |
671 | end; | |
672 | ||
673 | end. |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.