💕 assalamualaikum gaesssss.......................
balik lagi nih di blog sukma udah lama banget nggak upload materi kuliah, maklum anak kuliah sibuk. hahahahah......, karena sekarang saya lagi uas dan ini salah satu tugas juga untuk memenuhi nilai uas, maka dari itu saya upload dehh buat kalian yang kangen dengan postingan saya #geer😂
langsung mulai saja ya tugasnya klo gak di mulai keburu dosennya liburan dan nggak bisa input nilai sukma . Hamsyong saya 😅, program ini sangat menarik karena semua orang butuh yang namanya pulsa untuk internetan atau sms , tapi sms sudah tidak banyak yg menggunakan mereka beralih menggunakan medsos yang sangat menarik lainnya.ini dia program penjualan pulsa saya
program penjualan pulsa
deskripsinya
1. buatlah database seperti ini ..... namanya seorang program pasti tau dong membuat database
usahakan gaes kalau bikin database hati hati dalam penamaan
tabel dan sebagainya karena akan berpengaruh untuk kesemuanya
2. buka visual studionya gaees
> pilih yang itu gaes yg biru sama yang saya ceklis
> bikin input kaya gini ya gaesss
> ini tampilan formnya
3. ini hasil run gaesss...
aplikasi
ini bisa menyimpan data , mencari data menggunakan kode tanggal , dan
menghapus data di hasil run ketika salah memasukan harga ,
4. ini dia soure codeImports System.Data
Imports System.Data.SqlClient
Imports System.Data.OleDb
Public Class inputfrom_sukma161011401315
Inherits System.Web.UI.Page
Dim constring As String = ConfigurationManager.ConnectionStrings("jual_pulsaConnectionString").ConnectionString
Dim oConn As New OleDbConnection(constring)
Dim oTbl As New DataTable
Dim xReader As OleDbDataReader
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox1.Focus()
End Sub
Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Response.Redirect("WebForm_sukma161011401316.aspx")
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim sql As String = "INSERT INTO Pulsa_sukma VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "');"
Dim oCmd As New OleDbCommand
oConn.Open()
oCmd.Connection = oConn
oCmd.CommandText = sql
oCmd.ExecuteNonQuery()
End Sub
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If Not Len(TextBox1.Text) = 0 Then
oConn.Close()
oConn.Open()
Dim ocmd As New OleDbCommand("SELECT * FROM Pulsa_Sukma where tanggal='" + TextBox1.Text + "'", oConn)
xReader = ocmd.ExecuteReader
If xReader.HasRows Then
xReader.Read()
TextBox2.Text = xReader("no_handphone")
TextBox3.Text = xReader("oprator")
TextBox4.Text = xReader("jumlah_pulsa")
TextBox5.Text = xReader("harga")
TextBox6.Text = xReader("bayar")
TextBox7.Text = xReader("kembalian")
Else
TextBox1.Text = MsgBox("no Tidak ada")
Exit Sub
End If
xReader.Close()
End If
End Sub
End Class
Imports System.Data.SqlClient
Imports System.Data.OleDb
Public Class inputfrom_sukma161011401315
Inherits System.Web.UI.Page
Dim constring As String = ConfigurationManager.ConnectionStrings("jual_pulsaConnectionString").ConnectionString
Dim oConn As New OleDbConnection(constring)
Dim oTbl As New DataTable
Dim xReader As OleDbDataReader
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox1.Focus()
End Sub
Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Response.Redirect("WebForm_sukma161011401316.aspx")
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim sql As String = "INSERT INTO Pulsa_sukma VALUES ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "');"
Dim oCmd As New OleDbCommand
oConn.Open()
oCmd.Connection = oConn
oCmd.CommandText = sql
oCmd.ExecuteNonQuery()
End Sub
Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If Not Len(TextBox1.Text) = 0 Then
oConn.Close()
oConn.Open()
Dim ocmd As New OleDbCommand("SELECT * FROM Pulsa_Sukma where tanggal='" + TextBox1.Text + "'", oConn)
xReader = ocmd.ExecuteReader
If xReader.HasRows Then
xReader.Read()
TextBox2.Text = xReader("no_handphone")
TextBox3.Text = xReader("oprator")
TextBox4.Text = xReader("jumlah_pulsa")
TextBox5.Text = xReader("harga")
TextBox6.Text = xReader("bayar")
TextBox7.Text = xReader("kembalian")
Else
TextBox1.Text = MsgBox("no Tidak ada")
Exit Sub
End If
xReader.Close()
End If
End Sub
End Class
5. flow chart
Tidak ada komentar:
Posting Komentar