APLIKASI PENJUALAN VB.NET 2010



Membuat program untuk koperasi di kantor



1.Instal Terlebih dahulu vb.2010
2.Data base Acces 2007
3.SAP crystal reort vb 2010
4.crystal report 8.5
5.Pastikan Menggunakan NetFramwork 4.0 ke Atas ya.........
6. Pastikan Sudah Membuat data base Acces 2007
unduh database
 
Langkah- Langkah

Membuat Modul 
 Coding nya

Imports System.Data.OleDb
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Module modkoneksi
    Public CONN As OleDbConnection
    Public DA As OleDbDataAdapter
    Public DS As DataSet
    Public CMD As OleDbCommand
    Public DR As OleDbDataReader
    Public cryRpt As New ReportDocument
    Public crtableLogoninfos As New TableLogOnInfos
    Public crtableLogoninfo As New TableLogOnInfo
    Public crConectionInfo As New ConnectionInfo
    Public CrTables As Tables
    Public Sub seting_Laporan()
        With crConectionInfo
            .ServerName = (Application.StartupPath.ToString & "\dbkoperasi.accdb")
            .DatabaseName = (Application.StartupPath.ToString & "\dbkoperasi.accdb")
            .UserID = ""
            .Password = ""
        End With
        CrTables = cryRpt.Database.Tables
        For Each CrTable In CrTables
            crtableLogoninfo = CrTable.LogOnInfo
            crtableLogoninfo.ConnectionInfo = crConectionInfo
            CrTable.ApplyLogOnInfo(crtableLogoninfo)

        Next
    End Sub
    Public Sub koneksi()
        Try
            CONN = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=dbkoperasi.accdb")
            CONN.Open()
        Catch ex As Exception
            MsgBox(ex.Message)
            End
        End Try
    End Sub
End Module

 .
Buat Desain Menu Login Seperti  dibawah ini
   






Coding nya:
Imports System.Data.OleDb
Imports System.Text
Public Class Login

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
        If e.KeyChar = Chr(13) Then
            TextBox2.Focus()
        End If
    End Sub

    Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
        If e.KeyChar = Chr(13) Then
            Button1.Focus()
        End If

    End Sub

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call koneksi()
        CMD = New OleDbCommand(" select *from TBLUSER where NAMA_USER='" & TextBox1.Text & "' AND PWD_USER='" & TextBox2.Text & "'", CONN)
        DR = CMD.ExecuteReader
        DR.Read()
        If Not DR.HasRows Then
            MsgBox("Login Gagal")
            TextBox1.Clear()
            TextBox2.Clear()
            TextBox1.Focus()
            Exit Sub
        Else
            Me.Visible = False
            MenuUtama.Show()
            MenuUtama.Panel1.Text = DR.Item("KODE_USER")
            MenuUtama.Panel2.Text = DR.Item("NAMA_USER")
            MenuUtama.Panel3.Text = DR.Item("STATUS_USER")
            If MenuUtama.Panel3.Text = "USER" Then
                MenuUtama.UserToolStripMenuItem.Visible = False
                MenuUtama.Button1.Visible = False
            ElseIf MenuUtama.Panel2.Text = "ADMIN" Then
                MenuUtama.CustumerToolStripMenuItem.Visible = False
                MenuUtama.BarangToolStripMenuItem.Visible = False
                MenuUtama.SuplierToolStripMenuItem.Visible = False
                MenuUtama.Button2.Visible = False
                MenuUtama.Button3.Visible = False
                MenuUtama.Button4.Visible = False
            End If
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Close()
    End Sub

  
    Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class



2. Membuat Menu Utama

  
    Coding nya
Public Class MenuUtama

   
    Private Sub BarangToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BarangToolStripMenuItem.Click
        Formbarang.Show()
    End Sub

    Private Sub CustumerToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustumerToolStripMenuItem.Click
        FormCustumer.Show()
    End Sub

    Private Sub UserToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UserToolStripMenuItem.Click
        FormUser.Show()
    End Sub

    Private Sub MenuUtama_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        PictureBox1.Load("wd7.jpg")
        PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        FormUser.Show()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Formbarang.Show()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        FormCustumer.Show()
    End Sub

    Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked

    End Sub

    Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click
        Panel1.Text = ""
        Panel2.Text = ""
        Panel3.Text = ""
        Me.Close()
        Login.Show()
        Login.Visible = True
        Login.TextBox1.Text = ""
        Login.TextBox2.Text = ""
        Login.TextBox1.Focus()


    End Sub

    Private Sub KeluarToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KeluarToolStripMenuItem1.Click
        If MessageBox.Show("Yakin akan keluar", "", MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
            End
        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Formpenjualan.Show()
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        Formpenjualan.Show()

    End Sub

    Private Sub PenjualanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PenjualanToolStripMenuItem.Click
        Formpenjualan.Show()
    End Sub

    Private Sub LaporanPenjualanToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LaporanPenjualanToolStripMenuItem.Click
        Laporandetail.Show()
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        Faktur.Show()
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        periodik.Show()
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        Barcode.Show()

    End Sub
End Class

 Lanjut besookk ya....kalo ada yg masih bingung coment ya

Komentar

  1. PokerStars Casino Lets You Play Online - JTM Hub
    PokerStars casino lets you play on any 포천 출장마사지 device, with 전라남도 출장마사지 no need to 화성 출장안마 download 시흥 출장안마 any 양주 출장샵 software or software. To make the experience even better, the software developer provides

    BalasHapus
  2. The Best Slots | Casino Roll
    The best slots at Casino Roll. If you love 바카라 사이트 table games, to worrione.com play blackjack, you have to bet twice for 메이피로출장마사지 the dealer to poormansguidetocasinogambling.com win. The dealer must

    BalasHapus
  3. This Beijing-based firm CNC machining has taken to calling its products "micro factories." Delta Micro offers a couple of devices, including the $900 Up! Plus , which, minimal of|no much less than} from an aesthetic standpoint, is the image of minimalist simplicity. It has a build volume of 5.5 x 5.5 x 5.3 inches and might print in each PLA and ABS plastic. The latter is out there within the US beneath the Delta Micro name or, with the Afinia branding, carrying the H-Series name (under which it took house a "Best Overall Experience" award from Make Magazine).

    BalasHapus

Posting Komentar

Postingan populer dari blog ini

Membuat Aplikasi dengan Vb.Net 2010