0% found this document useful (0 votes)
142 views5 pages

UAS Praktikum Pemrograman Visual PDF

The document describes creating a database and form application in Microsoft SQL Server and Visual Studio. It includes: 1. Creating a database called "program sembako" and table "Toko Sembako" in SQL Server. 2. Creating a new Windows Forms project in Visual Studio and designing a form. 3. Adding controls like labels, textboxes, buttons, and a datagridview to the form. 4. Writing code to connect to the SQL Server database, insert, and display data in the datagridview. 5. Screenshots of the running application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
142 views5 pages

UAS Praktikum Pemrograman Visual PDF

The document describes creating a database and form application in Microsoft SQL Server and Visual Studio. It includes: 1. Creating a database called "program sembako" and table "Toko Sembako" in SQL Server. 2. Creating a new Windows Forms project in Visual Studio and designing a form. 3. Adding controls like labels, textboxes, buttons, and a datagridview to the form. 4. Writing code to connect to the SQL Server database, insert, and display data in the datagridview. 5. Screenshots of the running application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

19306054

Rizal Misbach Asya


KMA-R31/19

UAS Praktikum Pemrograman


Visual

(Rizal Misbach Asya-19306054 KMA R-31/19) UAS Praktikum Pemrograman Visual 1


1. Buka Sopftware SQL Server lalu buat database program sembako & tabel
Toko Sembako

Gambar Tabel:02

Gambar Database:01

(Rizal Misbach Asya-19306054 KMA R-31/19) UAS Praktikum Pemrograman Visual 2


2. Buatlah Project baru dengan software Microsoft Visual Studio lalu buat di
windows From Application lalu buat dengan from seperti berikut

Gambar Microsoft Visual Studio:03

3. Kontrol & Komponen

no Kontrol & Komopnen Propeti Nilai


1 Form 1 Text Program toko
sembako
StarPosition Center Screen
2 Lebel 1 (Text) Nama Toko
Lebel 2 (Text) Nama Barang
Lebel 3 (Text) Satuan
Lebel 4 (Text) Harga Barang
Lebel 5 (Text) Stock
3 TextBox 1 (Name) txtToko
TextBox 2 (Name) txtBarang
ComboBox 1 (Name) cbSatuan

(Rizal Misbach Asya-19306054 KMA R-31/19) UAS Praktikum Pemrograman Visual 3


TextBox 3 (Text) Harga Barang
TextBox 4 (Text) Stock
4 Button 1 (Text) Input
Button 2 (Name) btinput
Button 3 (Text) Edit
Button 4 (Name) btedit
(Text) Delete
(Name) btdelete
(Text) close
(Name) btclose
5 DataGriveView1 (Name) dgvdata

4. Buat Coding Data seperti di bawah ini dan imports data Sql Server ke Vb.Net
Imports System.Data.SqlClient

Public Class frmSembako

Sub simpan_data()
cmd.Connection = cn
cmd.CommandText = "INSERT INTO Toko_smbako VALUSE ('" & txtToko.Text & "','" &
txtBarang.Text & "','" & cbSatuan.Text & "','" & txtHarga.Text & "','" & txtStock.Text &
"')"
MessageBox.Show("Data Tersimpan")
End Sub

Sub tampil_data()
cmd.Connection = cn
cmd.CommandText = "SELECT * FROM Toko_sembako"

Dim barang As SqlDataReader = cmd.ExecuteReader


Dim data_barang As New DataTable

data_barang.Load(barang)
dgvSembako.DataSource = data_barang

End Sub

Private Sub frmSembako_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
buka_database()
End Sub

Private Sub btinput_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles btinput.Click
simpan_data()
tampil_data()
End Sub

Private Sub btClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles btClose.Click

(Rizal Misbach Asya-19306054 KMA R-31/19) UAS Praktikum Pemrograman Visual 4


Close()

End Sub
End Class

5. Dan ini Hasil yang sudah di Runing

Gambar Run:04 Gambar Run:05

Gambar Run:06 Gambar Run:07

(Rizal Misbach Asya-19306054 KMA R-31/19) UAS Praktikum Pemrograman Visual 5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy