MEMBUAT PROGRAM APLIKASI SEDERHANA
MENGGUNAKAN VISUAL STUDIO 2012.
Hallo Semuanya.
Disini saya akan menjelaskan
sedikit penjelasan tentang Visual Studio.
Visual Basic merupakan sebuah bahasa pemrograman
yang menawarkan Integrated Development Environment (IDE) visual untuk
membuat program perangkat lunak / aplikasi berbasis sistem operasi Microsoft
Windows yang berbasis GUI (Grapical User Interface).
Dan selanjutnya cara membuat program aplikasi sederhana menggunakan
Visual Studio 2012.
Untuk pengoperasiannya:
1.
Input
Data.
2.
Proses.
3.
Simpan.
4.
Tampilkan
/ Output (Data yang sudah tersimpan dan sudah terkoneksi oleh database Ms.
Acces).
Yang harus ada untuk menjalankan program di Visual Studio
2012:
1.
Contoh
Design (via Gambar).
2.
Database
(via Gambar).
3.
Grid
View (via Gambar).
4.
Source
Code Button BELI (via Source Code).
5.
Source
Code Button CARI (via Source Code).
6.
Source
Code Button SIMPAN (via Source Code).
7.
Source
Code Button TAMPIL (via Source Code).
8.
Hasil
RUN Program yang telah kita buat (via Gambar).
9.
Source
Code Database Beli (via Source Code).
10. Source Code Database Sepatu (via Source
Code).
11. Source Code Database Ms. Access (via
Source Code).
Contoh
Design:
Gambar 1.1
Data
Base:
A.
Tabel
Sepatu.
Gambar
1.2.1
B.
Tabel
Beli.
Gambar 1.2.2
Grid
View:
Gambar
1.3
Source
Code Button Beli:
<asp:Button ID="BtnBeli" runat="server" Text="BELI" />
Source Code
Button Cari:
<asp:Button ID="BtnCari" runat="server" Text="CARI" />
Source Code
Button Simpan:
<asp:Button ID="BtnSimpan" runat="server" Text="SIMPAN" />
Source Code
Button Tampil:
<asp:Button ID="BtnTampil" runat="server" Text="TAMPIL" />
</p>
Hasil Run
yang telah dibuat:
Gambar 1.3.2
Source Code WebFromSepatu:
Dim ocmd As New OleDb.OleDbCommand("SELECT *
FROM tablesepatu where KodeBarang =" & DropDownList1.SelectedValue() & "", oConn)
xReader =
ocmd.ExecuteReader
If xReader.HasRows Then
xReader.Read()
TxtBarang.Text = xReader("NamaBarang")
TxtMerk.Text = xReader("MerkBarang")
TxtHARGA.Text = xReader("HargaBarang")
Else
TxtBarang.Text = "Barang Tidak ada”
End If
xReader.Close()
Source Code WebFromBeli:
TOKO SEPATU UTI GANTENG</div>
<p>
NAMA :
<asp:TextBox ID="TxtNama" runat="server"></asp:TextBox>
</p>
<p>
KODE BARANG :
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" DataTextField="KodeBarang" DataValueField="KodeBarang" Height="38px" Width="191px">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString7 %>" ProviderName="<%$ ConnectionStrings:ConnectionString7.ProviderName %>" SelectCommand="SELECT [KodeBarang] FROM
[tablesepatu]"></asp:SqlDataSource>
</p>
<p>
NAMA
BARANG :
<asp:TextBox ID="TxtBarang" runat="server"></asp:TextBox>
</p>
<p>
MERK
BARANG : <asp:TextBox ID="TxtMerk" runat="server"></asp:TextBox>
</p>
<p>
HARGA
BARANG :
<asp:TextBox ID="TxtHARGA" runat="server"></asp:TextBox>
</p>
<p>
JUMLAH : <asp:TextBox ID="TxtJumlah" runat="server"></asp:TextBox>
</p>
<p>
TOTAL BAYAR :
<asp:TextBox ID="TxtTotal" runat="server"></asp:TextBox>
</p>
Source Code WebFromDatabase:
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
<section class="featured">
<div class="content-wrapper">
<hgroup class="title">
<h1><%: Title %>.</h1>
<h2>Modify this template to jump-start your
ASP.NET application.</h2>
</hgroup>
<p>
To
learn more about ASP.NET, visit <a href="http://asp.net" title="ASP.NET
Website">http://asp.net</a>.
The
page features <mark>videos,
tutorials, and samples</mark> to help you get
the most from ASP.NET.
If you
have any questions about ASP.NET visit <a href="http://forums.asp.net/18.aspx" title="ASP.NET
Forum">our forums</a>.
</p>
</div>
</section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
<h3>We suggest the following:</h3>
<ol class="round">
<li class="one">
<h5>Getting Started</h5>
ASP.NET
Web Forms lets you build dynamic websites using a familiar drag-and-drop,
event-driven model.
A design
surface and hundreds of controls and components let you rapidly build
sophisticated, powerful UI-driven sites with data access.
<a href="http://go.microsoft.com/fwlink/?LinkId=245146">Learn more…</a>
</li>
<li class="two">
<h5>Add NuGet packages and jump-start your
coding</h5>
NuGet
makes it easy to install and update free libraries and tools.
<a href="http://go.microsoft.com/fwlink/?LinkId=245147">Learn more…</a>
</li>
<li class="three">
<h5>Find Web Hosting</h5>
You can
easily find a web hosting company that offers the right mix of features and
price for your applications.
<a href="http://go.microsoft.com/fwlink/?LinkId=245143">Learn more…</a>
</li>
</ol>
</asp:Content>
Terima Kasih. Semoga Bermanfaat.
Tidak ada komentar:
Posting Komentar