Kamis, 05 Juli 2018

Web Application Go Smart

Selamat berjumpa kembali dengan saya ,di Project Kali ini saya membuat Program Les Bimbel yang saya beri nama "GoSmart Bimbel". Project ini merupakan program aplikasi berbasis web. Di aplikasi ini pebimbel di sarankan mendaftarkan diri dahulu sebelum mengikuti bimbel dan pebimbel pun dapat melihat materi ,hari dan jam yang tersedia.

Langsung saja ,ini flowchart dari program saya 

 

Dan ini Database yang saya gunakan. Karena dalam tugas uas kali ini web application nya terhubung dengan database.



Ini tampilan program saya beserta code : 



Public Class WebUtama_161011400067_Steffi_Antoni
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Daftar_Click(sender As Object, e As EventArgs) Handles Daftar.Click
        Response.Redirect("WebDaftar_161011400067_Steffi_Antoni.aspx")
    End Sub

    Protected Sub Materi_Click(sender As Object, e As EventArgs) Handles Materi.Click
        Response.Redirect("ListMateri_161011400067_Steffi_Antoni.aspx")
    End Sub

    Protected Sub CekData_Click(sender As Object, e As EventArgs) Handles CekData.Click
        Response.Redirect("ListData_161011400067_Steffi_Antoni.aspx")
    End Sub
End Class

 

Imports System.Data
Imports System.Data.OleDb
Public Class WebDaftar_161011400067_Steffi_Antoni
    Inherits System.Web.UI.Page
    Private constring As String = ConfigurationManager.ConnectionStrings("Steffi_BimbelConnectionString").ConnectionString
    Private oConn As New OleDbConnection(constring)
    Private oTbl As New DataTable
    Private xReader As OleDbDataReader
    Dim oCmd As New OleDbCommand
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub DropDownList4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropMateri.SelectedIndexChanged
       
    End Sub

    Protected Sub Simpan_Click(sender As Object, e As EventArgs) Handles Simpan.Click
        Dim sql As String = "INSERT INTO tb_Data VALUES ('" & DropID.Text & "','" & TextNama.Text & "','" & DropUmur.Text & "','" & DropPendidikan.Text & "','" & DropMateri.Text & "')"

        oConn.Open()
        oCmd.Connection = oConn
        oCmd.CommandText = sql
        oCmd.ExecuteNonQuery()

    End Sub

    Protected Sub Kembali_Click(sender As Object, e As EventArgs) Handles Kembali.Click
        Response.Redirect("WebUtama_161011400067_Steffi Antoni.aspx")
    End Sub
End Class



Imports System.Data
Imports System.Data.OleDb

Public Class ListData_161011400067_Steffi_Antoni
    Inherits System.Web.UI.Page
    Private cinn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Nafriyu\Documents\Steffi_Bimbel"
    Private constring As String = ConfigurationManager.ConnectionStrings("Steffi_BimbelConnectionString").ConnectionString
    Private oConn As New OleDbConnection(constring)
    Private oTbl As New DataTable
    Private xReader As OleDbDataReader
    Private tabel1 As OleDbDataAdapter

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       
    End Sub

    Protected Sub Cari_Click(sender As Object, e As EventArgs) Handles Cari.Click
        oConn.Open()
        Dim tabel1 As New OleDbDataAdapter("SELECT * FROM tb_Data where ID_Bimbel LIKE '%" + IdBimbel.Text + "%';", oConn)
        Dim tabel2 As New DataSet()
        tabel2.Clear()
        tabel1.Fill(tabel2, "tb_Data")
        GridView1.DataSource = (tabel2.Tables("tb_Data"))
        GridView1.DataBind()
        oConn.Close()
        IdBimbel.Text = ""
    End Sub

    Protected Sub Kembali_Click(sender As Object, e As EventArgs) Handles Kembali.Click
        Response.Redirect("WebUtama_161011400067_Steffi Antoni.aspx")
    End Sub
End Class

 

Public Class ListMateri_161011400067_Steffi_Antoni
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub ButtonBack_Click(sender As Object, e As EventArgs) Handles ButtonBack.Click
        Response.Redirect("WebUtama_161011400067_Steffi Antoni.aspx")
    End Sub
End Class

Lalu ini hasil run nya 

  



 



Sekian dari saya , sampai bertemu di pertemuan selanjutnya ..