Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. //---------------------------Proforma Lista towarów-----------//
  2. //tworzenie tabeli
  3. //border
  4. TableBorderModel tbm = new TableBorderModel
  5. {
  6. StyleName = "Test",
  7. BorderColor = MigraDoc.DocumentObjectModel.Colors.Black,
  8. BorderWidth = 0.2
  9. };
  10.  
  11. //definicja kolumn
  12. TableColumnsModel tcm = new TableColumnsModel();
  13. var columns = new ListWithDuplicates();
  14. columns.Add("50", "center");
  15. columns.Add("200", "center");
  16. columns.Add("65", "center");
  17. columns.Add("55", "center");
  18. columns.Add("100", "center");
  19. columns.Add("65", "center");
  20.  
  21. tcm.addColumns(columns);
  22.  
  23. var table = new GenericTable(tcm, tbm);
  24. table.addHeader(
  25. new string[] { "Lp.", "Nazwa towaru/usługi", "Netto", "VAT", "Wartość VAT", "Brutto" },
  26. new string[] { "center", "center", "center", "center", "center", "center" }
  27. , Colors.LightSkyBlue);
  28. table.addContent(
  29. new string[,] {
  30. { "1", "Zasilenie stanu konta w serwisie", "30.00 PLN", "23 %", "6.90 PLN", "36.90 PLN" }
  31. },
  32. new string[,]
  33. {
  34. { "Verdana", "Verdana", "Verdana", "Verdana", "Verdana", "Verdana",}
  35. },
  36. new Color [] { Colors.AliceBlue }
  37. );
  38. ph.Add(table);
  39. //---------------koniec listy produktów--------------/
  40.  
  41. //----------------Proforma Podsumowanie----------------//
  42. tcm = new TableColumnsModel();
  43. columns = new ListWithDuplicates();
  44. columns.Add("90", "center");
  45. columns.Add("65", "center");
  46. columns.Add("65", "center");
  47. columns.Add("70", "center");
  48. tcm.addColumns(columns);
  49.  
  50. table = new GenericTable(tcm, tbm, 0, 0, 260, "right");
  51. table.addHeader(
  52. new string[] { "Według stawki VAT", "Netto", "Wartość", "Podsumowanie" },
  53. new string[] { "center", "center", "center", "center"}
  54. , Colors.LightSkyBlue);
  55.  
  56. table.addContent(
  57. new string[,] {
  58. { "23 %", "30.00 PLN", "6.90 PLN", "36.90 PLN" },
  59. { "Do zapłaty", "30.00 PLN", "6.90 PLN", "36.90 PLN" }
  60. },
  61. new string[,]
  62. {
  63. { "Verdana", "Verdana", "Verdana", "Verdana"},
  64. { "Verdana", "Verdana", "Verdana", "Verdana"}
  65. },
  66. new Color[] { Colors.AliceBlue, Colors.AliceBlue }
  67. );
  68. ph.Add(table);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement