Welcome To ViniCeca's World

Delete this widget from your Dashboard and add your own words. This is just an example!

FORM CETAK SURAT PESANAN

Jumat, 13 Mei 2011



Coding Cetak Surat Pesanan

Imports System.Data.OleDb
Imports System.Data
Public Class frmCetakSp
Dim cnn As OleDbConnection
Dim cmmd As OleDbCommand
Dim dreader As OleDbDataReader

Private Sub frmCetakSp_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
txtNmSup.Focus()
End Sub

Private Sub cmdKeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdKeluar.Click
Me.Dispose()
End Sub

Private Sub BtnCarisp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCarisp.Click
Dim popupSP As New PopSup
popupSP.ShowDialog()
If popupSP.retNmSup <> "" Then
txtNmSup.Text = popupSP.retNmSup
txtTglSP.Text = Format(CDate(popupSP.retTglSP), "dd - MMMM - yyyy")
txtKdSup.Text = popupSP.retKdSup
cmdCetak.Focus()
End If

'''' UNTUK MENAMPILKAN NAMA SUPPLIER
Dim sqlx As String
sqlx = "select NMSUP from SUPPLIER where KDSUP like '%" &
Trim(txtKdSup.Text) & "&' order by KDSUP asc"

cnn = New OleDbConnection(strConn)
cnn.Open()
cmmd = New OleDbCommand(sqlx, cnn)
dreader = cmmd.ExecuteReader
If dreader.Read Then
txtNmSup.Text = dreader(0)
End If
End Sub

Private Sub cmdBatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBatal.Click
txtNoSP.Text = ""
txtTglSP.Text = ""
txtKdSup.Text = ""
txtNmSup.Text = ""
End Sub

Private Sub cmdCetak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCetak.Click
'frmCetakSp.Show()
End Sub
End Class

Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

0 komentar:

Posting Komentar