/
Bestellungsformullar.cs
811 lines (653 loc) · 36 KB
/
Bestellungsformullar.cs
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
using System;
using AppKit;
using System.IO;
using System.Text;
using System.Reflection;
using iTextSharp.text;
using iTextSharp.text.pdf;
namespace Oferta__
{
public class Bestellungsformullar
{
public Bestellungsformullar()
{
}
public static void CreatePDF()
{
FileStream fs = new FileStream("dokument.pdf", FileMode.Create, FileAccess.Write, FileShare.None);
Document doc = new Document(PageSize.A4);
doc.SetMargins(24.65f, 23.8f, doc.TopMargin, doc.BottomMargin);
string path = Environment.CurrentDirectory;
string nazwa1 = "Bestellungsformular" + MainClass.Oferta[1].Replace("/", "") + "_" + MainClass.Halledaten[1] + "x" + MainClass.Halledaten[2] + "m_" + MainClass.Halledaten[0] + "_" + MainClass.Personaldaten[7] + " " + MainClass.Personaldaten[0] + " " + MainClass.Personaldaten[1];
PdfWriter writer = PdfWriter.GetInstance(doc, new FileStream(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", nazwa1 + ".pdf")), FileMode.Create));
doc.Open();
PdfPTable table;
PdfPCell cell;
Paragraph par;
Phrase phrase;
BaseFont impact = BaseFont.CreateFont(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", "Fonts/impact.ttf")), BaseFont.CP1252, BaseFont.EMBEDDED);
BaseFont arial = BaseFont.CreateFont(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", "Fonts/Arial.ttf")), BaseFont.CP1252, BaseFont.EMBEDDED);
BaseFont arialbd = BaseFont.CreateFont(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", "Fonts/ARIALBD.TTF")), BaseFont.CP1252, BaseFont.EMBEDDED);
BaseFont verdana = BaseFont.CreateFont(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", "Fonts/verdana.TTF")), BaseFont.CP1252, BaseFont.EMBEDDED);
BaseFont simsun = BaseFont.CreateFont(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location.Replace("Oferta+.app/Contents/MonoBundle", "Fonts/SIMSUN.ttf")), BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
Font logo1 = new Font(impact, 27f, Font.NORMAL, new BaseColor(102, 102, 102));
Font logo2 = new Font(impact, 27f, Font.NORMAL, new BaseColor(0, 204, 204));
Font logo1_small = new Font(impact, 10f, Font.NORMAL, new BaseColor(102, 102, 102));
Font logo2_small = new Font(impact, 10f, Font.NORMAL, new BaseColor(0, 204, 204));
Font standard = new Font(arial, 9f, Font.NORMAL, BaseColor.BLACK);
Font standard_bold = new Font(arialbd, 9f, Font.NORMAL, BaseColor.BLACK);
Font standard_blue = new Font(arialbd, 9f, Font.NORMAL, new BaseColor(0, 69, 134));
Font standard_lightblue = new Font(arial, 9f, Font.NORMAL, new BaseColor(0, 69, 134));
Font chinese = new Font(simsun, 9f, Font.NORMAL, BaseColor.BLACK);
Font small = new Font(verdana, 7f, Font.NORMAL, BaseColor.BLACK);
Font medium = new Font(arial, 8f, Font.NORMAL, BaseColor.BLACK);
Font medium_bold = new Font(arialbd, 8f, Font.NORMAL, BaseColor.BLACK);
Font small_blue = new Font(arial, 7f, Font.NORMAL, new BaseColor(0, 69, 134));
//itcmetalcon.
phrase = new Phrase();
phrase.Add(new Chunk("itc", logo2));
phrase.Add(new Chunk("metalcon", logo1));
phrase.Add(new Chunk(".", logo2));
par = new Paragraph();
par.Add(phrase);
par.Alignment = 2;
doc.Add(par);
//1tabela dane klienta
table = new PdfPTable(3);
cell = new PdfPCell(new Phrase(MainClass.Personaldaten[7] + " " + MainClass.Personaldaten[0] + " " + MainClass.Personaldaten[1], standard_bold));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
cell = new PdfPCell(new Phrase(" "));
cell.Border = Rectangle.NO_BORDER;
cell.Rowspan = 6;
table.AddCell(cell);
//cell = new PdfPCell(new Phrase("Hallensysteme\n Herstellung", small_blue));
//cell.AddElement(new Phrase("Ferligung nach maB", small_blue));
//cell.AddElement(new Phrase("Verkauf und Vermietung", small_blue));
cell = new PdfPCell();
cell.Border = Rectangle.NO_BORDER;
cell.UseAscender = true;
cell.VerticalAlignment = Element.ALIGN_TOP;
par = new Paragraph(new Phrase(" \n", small_blue));
par.SpacingAfter = -4f;
par.Alignment = 2;
cell.AddElement(par);
par = new Paragraph(new Phrase("Hallensysteme\n", small_blue));
par.SpacingAfter = -4f;
par.Alignment = 2;
cell.AddElement(par);
par = new Paragraph(new Phrase("Herstellung\n", small_blue));
par.SpacingAfter = -4f;
par.Alignment = 2;
cell.AddElement(par);
par = new Paragraph(new Phrase("Ferligung nach maß\n", small_blue));
par.SpacingAfter = -4f;
par.Alignment = 2;
cell.AddElement(par);
par = new Paragraph(new Phrase("Verkauf und Vermietung\n ", small_blue));
par.Alignment = 2;
cell.AddElement(par);
cell.Rowspan = 4;
table.AddCell(cell);
if (MainClass.Personaldaten[6].Length > 0)
{
cell = new PdfPCell(new Phrase(MainClass.Personaldaten[6], standard_bold));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
}
if (MainClass.Personaldaten[2].Length > 0)
{
cell = new PdfPCell(new Phrase(MainClass.Personaldaten[2], standard));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
}
if (MainClass.Personaldaten[4].Length > 0)
{
cell = new PdfPCell(new Phrase(MainClass.Personaldaten[4] + " " + MainClass.Personaldaten[3], standard));
}
else
{
cell = new PdfPCell(new Phrase(MainClass.Personaldaten[3], standard));
}
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
phrase = new Phrase();
//Console.WriteLine(Personaldaten[6].Length);
if (MainClass.Personaldaten[5].Length > 6)
{
phrase = new Phrase(MainClass.Personaldaten[5], standard);
}
else
{
phrase = new Phrase(" ");
}
cell = new PdfPCell(phrase);
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
if (MainClass.Personaldaten[6].Length == 0)
{
cell = new PdfPCell(new Phrase(" "));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
}
if (MainClass.Personaldaten[2].Length == 0)
{
cell = new PdfPCell(new Phrase(" "));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
}
phrase = new Phrase(new Chunk("Angebot Nr: ", medium_bold));
phrase.Add(new Chunk(MainClass.Oferta[1] + " von " + MainClass.dataoferty.ToString("dd.MM.yyyy"), medium));
par = new Paragraph(phrase);
par.Alignment = 2;
cell = new PdfPCell(par);
cell.UseAscender = true;
cell.HorizontalAlignment = 2;
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
cell = new PdfPCell(new Phrase(" "));
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
table.AddCell(cell);
table.TotalWidth = doc.Right - doc.Left;
//Console.WriteLine(doc.Right - doc.Left); //default 534
//Console.WriteLine(doc.LeftMargin + " " + doc.RightMargin); //default 36/36
table.LockedWidth = true;
table.SetWidths(new float[] { 1.572f, 0.908f, 1.240f });
doc.Add(table);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Lieferadresse / Aufbauort: ", standard_bold));
phrase.Add(new Chunk("..............................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Hallengröße (B x L x H): ", standard_bold));
phrase.Add(new Chunk(
String.Format("{0:0.00}", Convert.ToDouble(MainClass.Halledaten[1].Replace(",","."))).Replace(".", ",") + " x " +
String.Format("{0:0.00}", Convert.ToDouble(MainClass.Halledaten[2].Replace(",", "."))).Replace(".", ",") + " x " +
String.Format("{0:0.00}", Convert.ToDouble(MainClass.Halledaten[3].Replace(",", "."))).Replace(".", ",") + " m", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Schneelast: ", standard_bold));
string windzone = MainClass.Halledaten[10];
if(MainClass.Halledaten2[8].Length > 0)
{
windzone = MainClass.Halledaten2[8] + "- " + windzone;
}
string schneelast = MainClass.Halledaten[9];
if(MainClass.Halledaten2[7].Length > 0)
{
schneelast = MainClass.Halledaten2[7] + "- " + schneelast;
}
phrase.Add(new Chunk(schneelast + " kN/m², Windzone " + windzone + " kN/m²", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Boden: ", standard_bold));
phrase.Add(new Chunk("..............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
string[] typ_pom = MainClass.Halledaten[0].Split(" ");
string[] typ = new string[2];
if (typ_pom[1].Substring(0, 2) == "TT" || typ_pom[1].Substring(0, 2) == "PT" || typ_pom[1].Substring(0, 2) == "PP")
{
typ[1] = typ_pom[1];
}
else if (typ_pom[1].Substring(0, 3) == "ISO" || typ_pom[1].Substring(0, 3) == "DPS")
{
typ[1] = typ_pom[1];
}
else if (typ_pom.Length > 2)
{
if (typ_pom[2].Substring(0, 2) == "TT" || typ_pom[2].Substring(0, 2) == "PT" || typ_pom[2].Substring(0, 2) == "PP")
{
typ[1] = typ_pom[2];
}
else if (typ_pom[2].Substring(0, 3) == "ISO" || typ_pom[2].Substring(0, 3) == "DPS")
{
typ[1] = typ_pom[2];
}
}
string opis1 = "";
string opis2 = "";
string opis3 = "";
if (typ[1].Substring(0, 2) == "TT")
{
//opis1 = "Konstruktion aus Aluminiumkastenprofil mit Zugbändern, mit First- und Eckverbindungen aus feuerverzinktem Stahl. Die feuerverzinkten Fußplatten sind entsprechend den statischen Erfordernissen mittels Erdnägeln (1,00 m lang) auf nicht bindigen, dicht gelagerten Boden evtl. Schwerlastdübeln auf Fundamenten verankert.";
opis1 = MainClass.TechnischeDaten;
opis2 = "Dacheindeckung und Giebeldreieck: PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m², schwerentflammbar gemäß DIN4102/B1. Es ist in den 4-Kedernut Alu-Profil eingezogen. Das PVC- Material in Standardfarbe Weiß - es kann nach Absprache und evtl. gegen Aufpreis in anderen Farben geliefert werden.";
opis3 = "Zur Isolierung und Kondenswasservermeidung kann im Dachbereich (von Traufe bis Traufe) gegen Aufpreis eine lichtdurchlässige Innenplane montiert werden.";
}
else if (typ[1].Substring(0, 2) == "PT")
{
//opis1 = "Konstruktion aus Aluminiumkastenprofil mit Zugbändern, mit First- und Eckverbindungen aus feuerverzinktem Stahl. Die feuerverzinkten Fußplatten sind entsprechend den statischen Erfordernissen mittels Erdnägeln (1,00 m lang) auf nicht bindigen, dicht gelagerten Boden (DIN-EN 13782) evtl. Schwerlastdübeln auf Fundamenten (DIN-EN 1991) verankert.";
opis1 = MainClass.TechnischeDaten;
opis2 = "Dacheindeckung und Giebeldreieck: PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m², schwerentflammbar gemäß DIN4102/B1. Es ist in den 4-Kedernut Alu-Profil eingezogen. Das PVC- Material in Standardfarbe Weiß - es kann nach Absprache und evtl. gegen Aufpreis in anderen Farben geliefert werden.";
opis3 = "Zur Isolierung und Kondenswasservermeidung kann im Dachbereich (von Traufe bis Traufe) gegen Aufpreis eine lichtdurchlässige Innenplane montiert werden.";
}
else if (typ[1].Substring(0, 2) == "PP")
{
opis1 = MainClass.TechnischeDaten;
opis2 = "Dacheindeckung und Giebeldreieck: PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m², schwerentflammbar gemäß DIN4102/B1. Es ist in den 4-Kedernut Alu-Profil eingezogen. Das PVC- Material in Standardfarbe Weiß - es kann nach Absprache und evtl. gegen Aufpreis in anderen Farben geliefert werden.";
opis3 = "Zur Isolierung und Kondenswasservermeidung kann im Dachbereich (von Traufe bis Traufe) gegen Aufpreis eine lichtdurchlässige Innenplane montiert werden.";
}
else if (typ[1].Substring(0, 3) == "ISO")
{
//opis1 = "Konstruktion aus Doppel-T-Träger IPE240 (Riegel) und HEA 180 (Ständer), ohne Zugbändern (Flacheisen). Baustahl 235, feuerverzinkt nach DIN-EN ISO 1461. Die Fußplattern sind entsprechend den statischen Erfordernissen mittles Schwerlastdübeln auf Fundementen verankert.";
opis1 = MainClass.TechnischeDaten;
opis2 = "Sandwichpaneelen, Stärke 40mm, chwerentflammbar nach DIN 4102 Baustoffklasse 1, U-Wert";
opis3 = "";
}
else if (typ[1].Substring(0, 3) == "DPS")
{
//opis1 = "Konstruktion aus Aluminiumkastenprofil mit Zugbändern, mit First- und Eckverbindungen aus feuerverzinktem Stahl. Die feuerverzinkten Fußplatten sind entsprechend den statischen Erfordernissen mittels Erdnägeln (1,00 m lang) auf nicht bindigen, dicht gelagerten Boden (DIN-EN 13782) evtl. Schwerlastdübeln auf Fundamenten (DIN-EN 1991) verankert.";
opis1 = MainClass.TechnischeDaten;
}
phrase = new Phrase(new Chunk("Konstruktion: ", standard_bold));
phrase.Add(new Chunk(MainClass.TechnischeDaten, standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
if (typ[1].Substring(0, 2) == "PT")
{
phrase = new Phrase(new Chunk("Dacheindeckung und Giebeldreieck: ", standard_bold));
phrase.Add(new Chunk("PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m², schwerentflammbar gemäß DIN4102/B1. Es ist in den " + MainClass.Kedernut + "-Kedernut Alu-Profil eingezogen. Das PVC- Material in Standardfarbe Weiß - es kann nach Absprache und evtl. gegen Aufpreis in anderen Farben geliefert werden.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 2) == "TT")
{
phrase = new Phrase(new Chunk("Dacheindeckung: ", standard_bold));
phrase.Add(new Chunk("bestehend aus verzinkten und kunststoffbeschichteten Stahl-Trapezblechen T35 / T18, Stärke " + MainClass.Technische[0] + " mm.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 2) == "PP")
{
phrase = new Phrase(new Chunk("Dacheindeckung und Wandverkleidung: ", standard_bold));
phrase.Add(new Chunk("PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m2, schwerentflammbar gemäß DIN4102/B1. Es ist in den 4-Kedernut Alu-Profil eingezogen. Das PVC- Material in Standardfarbe Weiß oder Grün - es kann nach Absprache in anderen Farben geliefert werden.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 3) == "DPS")
{
phrase = new Phrase(new Chunk("Dacheindeckung und Giebeldreieck: ", standard_bold));
phrase.Add(new Chunk("doppelschalige PVC- beschichtete Gewebe hoch-glanz-lackiert, Gewicht " + MainClass.Technische[4] + " g/m², schwerentflammbar gemäß DIN4102/B1, K-Wert " + MainClass.Technische[5] + " W/m²K, Druckregler mit Kompressor (1 Stk.).", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (MainClass.Select3 == 1)
{
phrase = new Phrase(new Chunk("Dacheindeckung: ", standard_bold));
phrase.Add(new Chunk("Sandwichpaneelen (profiliert), ", standard));
phrase.Add(new Chunk("Stärke " + MainClass.Technische[0] + " mm, ", standard_bold));
phrase.Add(new Chunk("schwerentflammbar nach DIN 4102 Baustoffklasse 1, ", standard));
phrase.Add(new Chunk("U-Wert (W/m²K) = " + MainClass.Technische[1] + ". ", standard_bold));
phrase.Add(new Chunk("Die Panellen bestehen aus einem Kern aus Hartschaum zwischen verzinkten und kunststoffbeschichtetem Stahlblech- Deckschalen.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
if (typ[1].Substring(0, 2) == "PT")
{
phrase = new Phrase(new Chunk("Wandverkleidung ", standard_bold));
phrase.Add(new Chunk("bestehend aus waagerecht (evtl. senkrecht) verlegten, verzinkten und kunststoffbeschichteten Stahl-Trapezblechen T35 / T18, Stärke " + MainClass.Technische[2] + " mm.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 2) == "PP")
{
phrase = new Phrase(new Chunk("Wandverkleidung ", standard_bold));
phrase.Add(new Chunk("bestehend aus waagerecht (evtl. senkrecht) verlegten, verzinkten und kunststoffbeschichteten Stahl-Trapezblechen T35 / T18, Stärke " + MainClass.Technische[2] + " mm.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 2) == "TT")
{
phrase = new Phrase(new Chunk("Wandverkleidung ", standard_bold));
phrase.Add(new Chunk("bestehend aus waagerecht verlegten, verzinkten und kunststoffbeschichteten Stahl-Trapezblechen T35 / T18, Stärke " + MainClass.Technische[2] + " mm.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (typ[1].Substring(0, 3) == "DPS")
{
phrase = new Phrase(new Chunk("Wandverkleidung: ", standard_bold));
phrase.Add(new Chunk("Sandwichpaneelen (profiliert), ", standard));
phrase.Add(new Chunk("Stärke " + MainClass.Technische[2] + " mm, ", standard_bold));
phrase.Add(new Chunk("schwerentflammbar nach DIN 4102 Baustoffklasse 1, ", standard));
phrase.Add(new Chunk("U-Wert (W/m²K) = " + MainClass.Technische[3] + ". ", standard_bold));
phrase.Add(new Chunk("Die Panellen bestehen aus einem Kern aus Hartschaum zwischen verzinkten und kunststoffbeschichtetem Stahlblech- Deckschalen. Die Verkleidung schließt mit einem Abschluss aus Kantblechen + Dichtband am Boden ab.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
else if (MainClass.Select3 == 1)
{
phrase = new Phrase(new Chunk("Wandverkleidung: ", standard_bold));
phrase.Add(new Chunk("Sandwichpaneelen (profiliert), ", standard));
phrase.Add(new Chunk("Stärke " + MainClass.Technische[2] + " mm, ", standard_bold));
phrase.Add(new Chunk("schwerentflammbar nach DIN 4102 Baustoffklasse 1, ", standard));
phrase.Add(new Chunk("U-Wert (W/m²K) = " + MainClass.Technische[3] + ". ", standard_bold));
phrase.Add(new Chunk("Die Panellen bestehen aus einem Kern aus Hartschaum zwischen verzinkten und kunststoffbeschichtetem Stahlblech- Deckschalen. Die Verkleidung schließt mit einem Abschluss aus Kantblechen + Dichtband am Boden ab.", standard));
phrase.Add(new Chunk("\nFarbton: ............................................................................................", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
}
phrase = new Phrase(new Chunk("Tore und Türen:\n", standard_bold));
phrase.Add(new Chunk(MainClass.ToreUndTuren, standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Zusätliche Ausstattung:", standard_bold));
string ausstattung = "";
string[] elm = AllManager.CreateReadyElement(MainClass.bazaTabela1, MainClass.bazaTabela1_x, MainClass.bazaTabela1_y);
for (int i = (MainClass.AusstattungOd - 1); i <= (MainClass.AusstattungDo - 1); i++)
{
ausstattung = ausstattung + "\n-" + Convert.ToString(MainClass.bazaTabela1_ilosc[i]) + " " + MainClass.bazaTabela1_jedn[i] + " " + elm[i];
if (i < MainClass.AusstattungDo - 1)
{
ausstattung = ausstattung + ",";
}
}
phrase.Add(new Chunk(ausstattung, standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
string leichtbauhalle = "";
if(MainClass.Halledaten[0].Split(" ")[MainClass.Halledaten[0].Split(" ").Length - 1].Length > 2) {
leichtbauhalle = MainClass.Halledaten[0].Substring(0, MainClass.Halledaten[0].Length - 4);
}
else
{
leichtbauhalle = MainClass.Halledaten[0].Substring(0, MainClass.Halledaten[0].Length - 3);
}
phrase = new Phrase(new Chunk("Ich bestelle die " + leichtbauhalle + " mit Lieferung und mit / ohne Montage.", standard_bold));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Gesamtpreis: ", standard_bold));
string gesamtpreis = String.Format("{0:0.00}", Convert.ToDouble(MainClass.Gesamtpreis)).Replace(".", ",");
phrase.Add(new Chunk(gesamtpreis + " € inkl. Liefer- und Montagekosten, zzgl. 19% MwSt.", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Zahlung bei Kauf:\n", standard_bold));
phrase.Add(new Chunk("Mit Montage: 30% vom Auftragswert bei Bestellung, 60% bei Anlieferung, vor Abladung. Restzahlung - 10% bei Abnahme / Fertigstellung (siehe AGB).\nOhne Montage: 40% vom Auftragswert bei Bestellung, Restzahlung 60% bei Anlieferung, vor Abladung.", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Ich habe die AGB von itcmetalcon. gelesen und akzeptiere diese.", standard_bold));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
par = new Paragraph(new Phrase(" ", standard));
par.SpacingAfter = 0f;
par.Alignment = 0;
doc.Add(par);
phrase = new Phrase(new Chunk("Datum, Unterschrift", standard));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.SetLeading(10f, 0f);
par.Alignment = 0;
doc.Add(par);
//stopka
table = new PdfPTable(3);
cell = new PdfPCell();
cell.Rowspan = 4;
cell.UseAscender = true;
cell.VerticalAlignment = Element.ALIGN_MIDDLE;
phrase = new Phrase();
phrase.Add(new Chunk("itc", logo2_small));
phrase.Add(new Chunk("metalcon", logo1_small));
phrase.Add(new Chunk(".\n", logo2_small));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Normannenstrasse 2", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("71263 Weil der Stadt", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Tel.: (+49) 162 4230214", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Fax.: (+49) 7033 467017 \n ", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase(" ", small));
par.SpacingAfter = -0.5f;
par.Alignment = 0;
cell.AddElement(par);
cell.BackgroundColor = new BaseColor(238, 238, 238);
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
cell = new PdfPCell();
cell.Rowspan = 4;
cell.UseAscender = true;
cell.VerticalAlignment = Element.ALIGN_TOP;
phrase = new Phrase();
phrase.Add(new Chunk(" \n", logo2_small));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Konto: 4530164301", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("BLZ: 85591000", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("IBAN: DE55855910004530164301", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("BIC: GENODEF1GR1", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
cell.BackgroundColor = new BaseColor(238, 238, 238);
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
cell = new PdfPCell();
cell.Rowspan = 5;
cell.UseAscender = true;
cell.VerticalAlignment = Element.ALIGN_TOP;
phrase = new Phrase();
phrase.Add(new Chunk(" \n", logo2_small));
par = new Paragraph(phrase);
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("info@itcmetalcon.de", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("www.itcmetalcon.de", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Geshäftsführer / Inhaber: Pawel Swiderski", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase(" ", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("USt. ID - Nummer: DE 275947975", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
par = new Paragraph(new Phrase("Steuernummer: 70418/72302", small));
par.SpacingAfter = -4f;
par.Alignment = 0;
cell.AddElement(par);
cell.BackgroundColor = new BaseColor(238, 238, 238);
cell.Border = Rectangle.NO_BORDER;
table.AddCell(cell);
table.TotalWidth = doc.Right - doc.Left;
table.LockedWidth = true;
PdfContentByte pcb = writer.DirectContent;
table.WriteSelectedRows(0, -1, doc.Left, doc.Bottom + 50, pcb);
doc.Close();
writer.Close();
fs.Close();
}
}
}