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
| Private Sub Pdoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles Pdoc.PrintPage
Dim x As String
Dim i As Integer
For i = 0 To DataGridView1.RowCount - 1
NumAvance = DataGridView1.Item(0, i).Value.ToString
Matricule = DataGridView1.Item(1, i).Value.ToString
Nom = DataGridView1.Item(2, i).Value.ToString
Prenom = DataGridView1.Item(3, i).Value.ToString
Montant = DataGridView1.Item(5, i).Value.ToString
DateSaisie = DataGridView1.Item(6, i).Value.ToString
x = Montant.ToString.Substring(0, 3)
e.Graphics.DrawImage(BDP.Image, 2, 2)
e.Graphics.DrawString("Emis le: " & DateSaisie.Substring(0, 10), New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 483, 153)
e.Graphics.DrawString("Valable au: ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 483, 195)
e.Graphics.DrawString("N°: " & NumAvance, New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 557, 297)
e.Graphics.DrawString("TUD: " & Format(Montant, "000 000"), New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 557, 335)
e.Graphics.DrawString("Arrêté à la somme de: " & Fc.traduire(x) & " dinars", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 335)
e.Graphics.DrawString("Bénéficiare: " & Nom & " " & Prenom & " Matricule: " & Matricule, New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 420)
e.Graphics.DrawString("Objet de la Dépense: Avance sur salaire ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 446)
e.Graphics.DrawString("Octroyée le: " & DateSaisie.Substring(0, 10), New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 557, 446)
e.Graphics.DrawString("Nbre de Mensualité: 1 ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 491)
e.Graphics.DrawString("Visa et cachet ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 595)
e.Graphics.DrawString("D.C.R.H ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 610)
e.Graphics.DrawString("Mle et Visa ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 260, 595)
e.Graphics.DrawString("du caissier ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 260, 610)
e.Graphics.DrawString("Signature du Bénéficiaire ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 470, 595)
e.Graphics.DrawString("Imputation Comptable ", New Font("Times New Roman", 12, FontStyle.Bold), Brushes.Black, 55, 743)
Next
End Sub |
Partager