-
Üyelik
07.08.2013
-
Yaş/Cinsiyet
30 / E
-
Meslek
Web Designer
-
Konum
İzmir
-
Ad Soyad
** **
-
Mesajlar
6
-
Beğeniler
0 / 0
-
Ticaret
0, (%0)
Kod bloğum aşağıda. Yapmak istediğim yazıcıdan üye sayısı kadar (örneğin 5 ) tane çıktı almak. aşağıdaki kod hepsini tek sayfaya yazdırıyo yani 2 üyenin ismini üstüste tek kağıtta yazıyo.
Private Sub PrintDocument1_PrintPage(sender As System.Object, e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim ReportFont As Font = New Drawing.Font("Arial", 12)
Dim Baslik As Font = New Drawing.Font("Arial", 15)
SetMyCustomFormat()
Dim sayi As Integer
sayi = CInt(TextBox2.Text)
TextBox2.Text = sayi.ToString("C")
e.Graphics.DrawString(DateTimePicker1.Text, ReportFont, Brushes.Black, 650, 75) 'tarih
e.Graphics.DrawString("GELİR MAKBUZU", Baslik, Brushes.Black, 350, 75)
e.Graphics.DrawString("LİRA", Baslik, Brushes.Black, 400, 100)
e.Graphics.DrawRectangle(Pens.Black, 300, 125, 275, 30)
e.Graphics.DrawString(TextBox2.Text, ReportFont, Brushes.Black, 400, 130) 'miktar
e.Graphics.DrawString(TextBox3.Text, ReportFont, Brushes.Black, 100, 125) 'Dönem
e.Graphics.DrawString("No :", ReportFont, Brushes.Black, 650, 100) ' No
e.Graphics.DrawString(TextBox1.Text, ReportFont, Brushes.Black, 675, 100) ' No
e.Graphics.DrawString("Aylık Aidat :", ReportFont, Brushes.Black, 150, 250) ' aidat
e.Graphics.DrawString("Bağış :", ReportFont, Brushes.Black, 185, 280) ' bağğış
e.Graphics.DrawString("Yukarıda yazılı ", ReportFont, Brushes.Black, 185, 350) ' yukarıda yazılı
'nokta nokta
Dim dashValues As Single() = {5, 5, 5, 5}
Dim blackPen As New Pen(Color.Black, 1)
blackPen.DashPattern = dashValues
e.Graphics.DrawLine(blackPen, New Point(245, 265), New Point(600, 265)) ' nokta bitiş
e.Graphics.DrawLine(blackPen, New Point(245, 300), New Point(600, 300)) ' nokta bitiş
'kayiiit
Try
If (TextBox1.Text.Trim() <> "") Then
kmt.Connection = bag
bag.Open()
SetMyCustomFormat()
kmt.CommandText = "INSERT INTO aidat(plaka, MakbuzNo, Tarih, Miktar,Donem) VALUES ('" & TextBox4.Text & "','" & TextBox1.Text & "','" & DateTimePicker1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "') "
kmt.ExecuteNonQuery()
bag.Close()
MessageBox.Show("Kayıt işlemi tamamlandı ! ")
For i As Integer = 0 To Me.Controls.Count - 1
If TypeOf Me.Controls(i) Is TextBox Then
Me.Controls(i).Text = ""
End If
If TypeOf Me.Controls(i) Is ComboBox Then
Me.Controls(i).Text = ""
End If
Next
Else
MessageBox.Show("Alanını boş bırakmayınız !")
End If
Catch ex As Exception
MessageBox.Show("Kayıtlı Giriş !")
End Try
uret()
End Sub