DAFTAR PUSTAKA. Munawar, Pemodelan Visual dengan UML edl. Graha Ilmu : Jakarta.
|
|
- Penelope Fowler
- 6 years ago
- Views:
Transcription
1 DAFTAR PUSTAKA Munawar, Pemodelan Visual dengan UML edl. Graha Ilmu : Jakarta. Docherty, Mike O. Object Oriented Analysis & Desain Understanding System ed. Development With UML 2 0 Ambler, Scott W. "Introduction to UML 2 Class Diagrams." Agile Modeling (AM) Home Page: Effective Practices for Modeling and Documentation. Ambysoft Inc. Web. 14 April < Unified Modeling Language Superstructure version 2.3: Object Management Group, 2010 Julius Hermawan, 2005, Analisa Desain & Pemrograman Berorientasi Obyek dengan UML dan Visual Basic.NET. Andi Publisher : Jakarta 76
2 DAFTAR PUSTAKA Munawar, Pemodelan Visual dengan UML edl. Graha Ilmu : Jakarta. Docherty, Mike O. Object Oriented Analysis & Desain Understanding System ed. Development With UML 2 0 Ambler, Scott W. "Introduction to UML 2 Class Diagrams." Agile Modeling (AM) Home Page: Effective Practices for Modeling and Documentation. Ambysoft Inc. Web. 14 April < Unified Modeling Language Superstructure version 2.3: Object Management Group, 2010 Julius Hermawan, 2005, Analisa Desain & Pemrograman Berorientasi Obyek dengan UML dan Visual Basic.NET. Andi Publisher : Jakarta 76
3 +Form Login Public Class f_login Inherits System.Windows.Forms.Form Public Sub Form1_Load(ByVal Me.Load ToolTip1.SetToolTip(txtuser, "Username harus diisi!") clear() btnlogin_click(byval btnlogin.click If Trim(txtuser.Text) = "" ErrorProvider1.SetError(txtuser, "Username Harus Diisi! ") If Trim(txtpwd.Text) = "" ErrorProvider1.SetError(txtpwd, "Password HArus Diisi!") Login() txtpwd_keydown(byval System.Windows.Forms.KeyEventArgs) Handles txtpwd.keydown If e.keycode = Keys.Enter If Trim(txtuser.Text) = "" ErrorProvider1.SetError(txtuser, "Username Harus Diisi! ") If Trim(txtpwd.Text) = "" ErrorProvider1.SetError(txtpwd, "Password HArus Diisi!") Login() Login() "Select count(*) from users where username=" & txtuser.text & " and password=" & txtpwd.text & "" Dim flag As Int32 = sqlcmd.executescalar() If flag = 1 Me.Hide() MDIParent1.Show() MsgBox("Username or password is invalid!") clear() Dim flag As String = GetLogin(txtuser.Text, txtpass.text) Class1.DataModule.GetLogin(Me.txtuser.Text, Me.txtpass.Text) sqlconn.dispose() button1_click(byval Button1.Click Global.System.Windows.Forms.Applicati on.exit() clear() txtuser.text = "" txtpwd.text = "" txtuser.focus() +Form Menu Utama Imports System.Windows.Forms Public Class MDIParent1 ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles DataPenyewa.Click Dim Penyewa As New DataPenyewa Penyewa.MdiParent = Me Penyewa.WindowState = FormWindowState.Normal Penyewa.StartPosition = Penyewa.Show() Create a new instance of the cshild form. Dim ChildForm As New System.Windows.Forms.Form Make it a child of this MDI form before showing it. ChildForm.MdiParent = Me m_childformnumber += 1 ChildForm.Text = "Window " & m_childformnumber ChildForm.Show() OpenFile(ByVal sender As Object, ByVal e As EventArgs) Handles OpenToolStripMenuItem.Click Dim OpenFileDialog As New OpenFileDialog OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirecto ries.mydocuments L1
4 OpenFileDialog.Filter = "Text Files (*.txt) *.txt All Files (*.*) *.*" If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Dim FileName As String = OpenFileDialog.FileName TODO: Add code here to open the file. SaveAsToolStripMenuItem_Click(ByVal EventArgs) Handles SaveAsToolStripMenuItem.Click Dim SaveFileDialog As New SaveFileDialog SaveFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirecto ries.mydocuments SaveFileDialog.Filter = "Text Files (*.txt) *.txt All Files (*.*) *.*" If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Dim FileName As String = SaveFileDialog.FileName TODO: Add code here to save the current contents of the form to a file. ExitToolsStripMenuItem_Click(ByVal EventArgs) Handles ExitToolStripMenuItem.Click Global.System.Windows.Forms.Applicati on.exit() CutToolStripMenuItem_Click(ByVal EventArgs) Use My.Computer.Clipboard to insert the selected text or images into the clipboard CopyToolStripMenuItem_Click(ByVal EventArgs) Use My.Computer.Clipboard to insert the selected text or images into the clipboard PasteToolStripMenuItem_Click(ByVal EventArgs) Use My.Computer.Clipboard.GetText() or My.Computer.Clipboard.GetData to retrieve information from the clipboard. ToolBarToolStripMenuItem_Click(ByVal EventArgs) Me.ToolStrip.Visible = Me.ToolBarToolStripMenuItem.Checked StatusBarToolStripMenuItem_Click(ByVa l EventArgs) Me.StatusStrip.Visible = Me.StatusBarToolStripMenuItem.Checked CascadeToolStripMenuItem_Click(ByVal EventArgs) Me.LayoutMdi(MdiLayout.Cascade) TileVerticleToolStripMenuItem_Click(B yval EventArgs) Me.LayoutMdi(MdiLayout.TileVertical) TileHorizontalToolStripMenuItem_Click (ByVal EventArgs) Me.LayoutMdi(MdiLayout.TileHorizontal ) ArrangeIconsToolStripMenuItem_Click(B yval EventArgs) Me.LayoutMdi(MdiLayout.ArrangeIcons) CloseAllToolStripMenuItem_Click(ByVal EventArgs) Close all child forms of the parent. For Each ChildForm As Form In Me.MdiChildren ChildForm.Close() Next Private m_childformnumber As Integer = 0 L2
5 DataRuangan_Click(ByVal sender As DataRuangan.Click Dim Ruangan As New dataruangan Ruangan.MdiParent = Me Ruangan.StartPosition = Ruangan.Show() DataItemMakanan_Click(ByVal sender As DataItemMakanan.Click Dim Item As New DataItemMakanan Item.MdiParent = Me Item.StartPosition = Item.Show() DataPaketMakanan_Click(ByVal sender As DataPaketMakanan.Click Dim Paket As New DataPaketMakanan Paket.MdiParent = Me Paket.StartPosition = Paket.Show() DataPetugas_Click(ByVal sender As DataPetugas.Click Dim petugas As New DataUsers petugas.mdiparent = Me petugas.startposition = petugas.show() WindowsMenu_Click(ByVal sender As WindowsMenu.Click Global.System.Windows.Forms.Applicati on.exit() Me.Hide() e) f_login.show() f_login.form1_load(nothing, PendataanToolStripMenuItem_Click(ByVa l System.EventArgs) Dim PM As New Form_Paket_Pemesanan PM.MdiParent = Me PM.Show() PendatToolStripMenuItem_Click(ByVal PendatToolStripMenuItem.Click Dim sewa As New FormSewa sewa.mdiparent = Me sewa.startposition = sewa.show() PendataanPembayaranToolStripMenuItem_ Click(ByVal sender As System.Object, ByVal e As PendataanPembayaranToolStripMenuItem. Click Dim pelunasan As New FormPelunasan pelunasan.mdiparent = Me pelunasan.startposition = pelunasan.show() Timer_Tick(ByVal Timer.Tick lbltime.text = Now.DayOfWeek.ToString + " " + Now MDIParent1_Load(ByVal Me.Load lbltime.location = New System.Drawing.Point(990, 5) TestToolStripMenuItem_Click(ByVal System.EventArgs) LaporanPenyewaToolStripMenuItem_Click (ByVal sender As System.Object, ByVal e As LaporanPenyewaToolStripMenuItem.Click Dim penyewar As New PenyewaForm penyewar.mdiparent = Me penyewar.state = "penyewa" penyewar.lbljudul.text = "LAPORAN PENYEWA" penyewar.startposition = penyewar.show() L3
6 LaporanDataPemesananToolStripMenuItem _Click(ByVal sender As System.Object, ByVal e As LaporanDataPemesananToolStripMenuItem.Click Dim filterreport As New PenyewaForm filterreport.mdiparent = Me filterreport.state = "datapemesanan" filterreport.lbljudul.text = "LAPORAN DATA PEMESANAN" filterreport.startposition = filterreport.show() LaporanPiutangToolStripMenuItem_Click (ByVal sender As System.Object, ByVal e As LaporanPiutangToolStripMenuItem.Click Dim filterreport As New PenyewaForm filterreport.mdiparent = Me filterreport.state = "piutang" filterreport.lbljudul.text = "LAPORAN DATA PIUTANG" filterreport.startposition = filterreport.show() LaporanPembatalanPesanToolStripMenuIt em_click(byval sender As LaporanPembatalanPesanToolStripMenuIt em.click Dim filterreport As New PenyewaForm filterreport.mdiparent = Me filterreport.state = "pembatalan" filterreport.lbljudul.text = "LAPORAN DATA PEMBATALAN" filterreport.startposition = filterreport.show() LaporanToolStripMenuItem_Click(ByVal LaporanToolStripMenuItem.Click Dim filterreport As New PenyewaForm filterreport.mdiparent = Me filterreport.state = "paketmakanan" filterreport.lbljudul.text = "LAPORAN PAKET MAKANAN" filterreport.startposition = filterreport.show() +Form Add Data Paket Public Class DataAddPaket Dim n, h As Integer Friend MainForm As DataPaketMakanan DataAddPaket_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet1.item table. You can move, or remove it, as needed. Me.ItemTableAdapter.Fill(Me.DataSet1. item) TODO: This line of code loads data into the DataSet1.paket_makan table. You can move, or remove it, as needed. "select isnull(max(substring(kd_paket,5,3)), 0) from paket_makan" n = sqlcmd.executescalar() n = n + 1 txtkode.text = "PKT-" + n.tostring btncancel_click(byval btncancel.click btnok_click(byval btnok.click For h = 0 To dgitem.rows.count - 1 If dgitem.item(5, h).value "INSERT INTO PAKET_MAKAN VALUES(" + txtkode.text + "," + txtnama.text + "," + dgitem.item(0, h).value + ")" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End L4
7 Next sqlconn.dispose() MainForm.LoadDataPaket() Me.BringToFront() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") +Form Data Item Makanan Public Class DataItemMakanan Dim i As Integer btncancel_click(byval btncancel.click btnadd_click(byval btnadd.click txtnama.focus() Dim n As Integer "select max(convert(int,substring(kd_item,3,5 ))) from item" n = sqlcmd.executescalar() n = n + 1 txtkode.text = "I-" + n.tostring btnadd.visible = False btnedit.text = "SAVE" Me.field(True) Me.Clear() btncancel.location = New System.Drawing.Point(340, 14) btndel.visible = False field(byval enable As Boolean) txtnama.enabled = enable ddljenis.enabled = enable txtharga.enabled = enable txtket.enabled = enable Clear() txtkode.text = "" txtnama.text = "" ddljenis.text = "" txtharga.text = "" txtket.text = "" eksekusi(byval State As String) If State = "ADD" "INSERT INTO ITEM VALUES(" + txtkode.text + "," + txtnama.text + "," + _ ddljenis.text + "," + txtharga.text + "," + txtket.text + ")" If State = "EDIT" "UPDATE ITEM SET NAMA_ITEM=" + txtnama.text + ",JENIS_ITEM=" + ddljenis.text + _ ",HARGA_ITEM=" + txtharga.text + ", KETERANGAN=" + txtket.text + " WHERE KD_ITEM=" + txtkode.text + "" "DELETE FROM ITEM WHERE KD_ITEM=" + txtkode.text + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End conn. Me.LoadData() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") Me.field(False) Me.filltextbox() btnadd.visible = True btnedit.text = "EDIT" btndel.visible = True btncancel.location = New System.Drawing.Point(478, 14) filltextbox() i = dgitem.currentrow.index txtkode.text = dgitem.item(0, i).value txtnama.text = dgitem.item(1, i).value ddljenis.text = dgitem.item(2, i).value txtharga.text = dgitem.item(3, i).value txtket.text = dgitem.item(4, i).value DataItemMakanan_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet1.item table. You can move, or remove it, as needed. Me.ItemTableAdapter.Fill(Me.DataSet1.item) Me.LoadData() dgitem.rowsdefaultcellstyle.backcolor = Color.Azure filltextbox() txtcari.focus() LoadData() Dim ds As New DataSet L5
8 Dim sql As String = "select * from item order by convert(int,substring(kd_item,3,10))" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgitem.datasource = ds.tables(0) btnedit_click(byval btnedit.click If btnedit.text = "SAVE" eksekusi("add") If btnedit.text = " SAVE " eksekusi("edit") field(true) btnedit.text = " SAVE " btnadd.visible = False btndel.visible = False btncancel.location = New System.Drawing.Point(340, 14) dgitem_cellcontentclick(byval sender As Object, ByVal e As System.Windows.Forms.DataGridViewCell EventArgs) Handles dgitem.cellcontentclick filltextbox() dgitem_rowheadermouseclick(byval System.Windows.Forms.DataGridViewCell MouseEventArgs) Handles dgitem.rowheadermouseclick filltextbox() btndel_click(byval btndel.click If MsgBox("OK untuk menghapus Data ini?: ", MsgBoxStyle.OkCancel, "Hands On Delete") = MsgBoxResult.Ok eksekusi("delete") Me.LoadData() Me.filltextbox() lblcari_click(byval lblcari.click cari() txtcari_keydown(byval System.Windows.Forms.KeyEventArgs) Handles txtcari.keydown If e.keycode = Keys.Enter cari() cari() Dim ds As New DataSet Dim sql As String = "SELECT * FROM ITEM WHERE NAMA_ITEM LIKE %" + txtcari.text + "%" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgitem.datasource = ds.tables(0) Me.filltextbox() PrintDocument1_PrintPage(ByVal sender As System.Drawing.Printing.PrintPageEven targs) Handles PrintDocument1.PrintPage e.graphics.drawstring(label1.text, Label1.Font, Brushes.Black, 100, 100) e.graphics.pageunit = GraphicsUnit.Inch Button1_Click(ByVal System.EventArgs) PrintDialog1.Document = PrintDocument1 PrintDialog associate with PrintDocument. If PrintDialog1.ShowDialog() = Windows.Forms.DialogResult.OK PrintDocument1.Print() btnprintpreview_click(byval sender As System.EventArgs) PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog associate with PrintDocument. PrintPreviewDialog1.ShowDialog() open the print preview L6
9 +Form Data Item Paket Imports System.Data.SqlClient Public Class DataItemPaket Friend MainForm As DataPaketMakanan Friend namapkt As String Friend kdpaket As String Friend j As Integer Dim dspenyewadetail As New DataSet Dim reader As SqlDataReader Dim Ds As New DataSet Dim sql As String Dim i As Integer DataItemPaket_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TODO: This line of code loads data into the DataSet1.item table. You can move, or remove it, as needed. Me.ItemTableAdapter.Fill(Me.DataSet1.item) Dim sql As String = "Select * from Item where kd_item not in (select kd_item from paket_makan" + _ " where kd_paket=" + kdpaket + ") order by nama_item" Dim adapter As SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) sqlconn.dispose() dgitem.datasource = Ds.Tables(0) dgitem.rowsdefaultcellstyle.backcolor = Color.Azure lblnamapkt.text = "Tambah Item untuk Paket " + namapkt filltextbox() ddlitem.items.add("halo") filltextbox() i = dgitem.currentrow.index i = 0 End txtnama.text = dgitem.item(1, i).value txtjenis.text = dgitem.item(2, i).value txtharga.text = dgitem.item(3, i).value txtket.text = dgitem.item(4, i).value dgitem_cellcontentclick(byval sender As Object, ByVal e As System.Windows.Forms.DataGridViewCell EventArgs) Handles dgitem.cellcontentclick filltextbox() dgitem_rowheadermouseclick(byval System.Windows.Forms.DataGridViewCell MouseEventArgs) Handles dgitem.rowheadermouseclick filltextbox() btnok_click(byval btnok.click "INSERT INTO PAKET_MAKAN VALUES(" + kdpaket + "," + namapkt + "," + dgitem.item(0, i).value + ")" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End conn. conn.sqlconn.dispose() MainForm.LoadDataItem(j) Me.BringToFront() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") btncancel_click(byval btncancel.click +Form Data Paket Makanan Public Class DataPaketMakanan Dim i, j As Integer DataPaketMakanan_Load(ByVal sender As MyBase.Load i = dgpaket.currentrow.index i = 0 End Me.LoadDataPaket() Me.LoadDataItem(0) L7
10 dgitempaket.rowsdefaultcellstyle.back Color = Color.Azure dgpaket.rowsdefaultcellstyle.backcolo r = Color.Azure dgpaket_cellcontentclick(byval sender As Object, ByVal e As System.Windows.Forms.DataGridViewCell EventArgs) Handles dgpaket.cellcontentclick i = dgpaket.currentrow.index LoadDataItem(i) dgpaket_rowheadermouseclick(byval System.Windows.Forms.DataGridViewCell MouseEventArgs) Handles dgpaket.rowheadermouseclick i = dgpaket.currentrow.index LoadDataItem(i) dgitempaket_cellcontentclick(byval System.Windows.Forms.DataGridViewCell EventArgs) Handles dgitempaket.cellcontentclick j = dgitempaket.currentrow.index dgitempaket_rowheadermouseclick(byval System.Windows.Forms.DataGridViewCell MouseEventArgs) Handles dgitempaket.rowheadermouseclick j = dgitempaket.currentrow.index Friend Sub LoadDataPaket() Dim ds As New DataSet Dim sql As String = "SELECT KD_PAKET,NAMA_PAKET,SUM(HARGA_ITEM) AS HARGA, COUNT(NAMA_ITEM) AS JMLITEM FROM PAKET_MAKAN A" + _ " INNER JOIN ITEM B ON A.kd_item = B.kd_item GROUP BY KD_PAKET,NAMA_PAKET ORDER BY KD_PAKET" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) sqlconn.dispose() dgpaket.datasource = ds.tables(0) Friend Sub LoadDataItem(ByVal index As Integer) Dim ds As New DataSet Dim sql As String v.text = "Item Paket - " + dgpaket.item(1, index).value sql = "SELECT A.KD_ITEM,NAMA_ITEM,JENIS_ITEM,HARGA_ ITEM,KETERANGAN FROM PAKET_MAKAN A INNER JOIN ITEM B" + _ " ON A.KD_ITEM=B.KD_ITEM WHERE KD_PAKET=" + dgpaket.item(0, index).value + " ORDER BY B.KD_ITEM" v.text = "Item Paket - NA" sql = "SELECT A.KD_ITEM,NAMA_ITEM,JENIS_ITEM,HARGA_ ITEM,KETERANGAN FROM PAKET_MAKAN A INNER JOIN ITEM B" + _ " ON A.KD_ITEM=B.KD_ITEM" End Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) sqlconn.dispose() dgitempaket.datasource = ds.tables(0) pbadd_click(byval pbadd.click Dim item As New DataAddPaket item.mainform = Me item.show() btndel_click(byval btndel.click If MsgBox("OK untuk menghapus Data Paket ini?", MsgBoxStyle.OkCancel, "Hands On Delete") = MsgBoxResult.Ok "DELETE FROM PAKET_MAKAN WHERE KD_PAKET=" + dgpaket.item(0, i).value + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End Me.LoadDataPaket() Me.LoadDataItem(0) pbadd2_click(byval pbadd2.click L8
11 Dim Itempaket As New DataItemPaket Itempaket.MainForm = Me Itempaket.namapkt = dgpaket.item(1, i).value Itempaket.kdpaket = dgpaket.item(0, i).value Itempaket.j = i Itempaket.Show() pbdelete2_click(byval pbdelete2.click If MsgBox("OK untuk menghapus Data Item Paket ini?", MsgBoxStyle.OkCancel, "Hands On Delete") = MsgBoxResult.Ok "DELETE FROM PAKET_MAKAN WHERE KD_PAKET=" + dgpaket.item(0, i).value + " AND KD_ITEM=" + dgitempaket.item(4, j).value + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End Me.LoadDataItem(i) pbexit_click(byval pbexit.click +Form Data Penyewa Public Class DataPenyewa Dim dr As Integer Dim id As String btninput_click(byval btninput.click Dim penyewadetail As New FormPenyewa penyewadetail.mainform = Me penyewadetail.state = "ADD" penyewadetail.show() btnexit_click(byval btnexit.click btnsearch_click(byval btnsearch.click "" Dim no_identitas As String = If ddlsearch.visible = True cari() ddlsearch.visible = True txtsearch.visible = True lblwords.visible = True lbltype.visible = True cari() Dim ds As New DataSet If ddlsearch.selectedindex = 2 ddlsearch.text = "no_identitas" If ddlsearch.selectedindex = 3 ddlsearch.text = "telp" Dim sql As String If ddlsearch.selectedindex = 4 sql = "Select * from penyewa " sql = "Select * from penyewa where " + ddlsearch.text + " like %" + txtsearch.text + "%" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgpenyewa.datasource = ds.tables(0) ddlsearch_selectedindexchanged(byval ddlsearch.selectedindexchanged If ddlsearch.selectedindex = 4 txtsearch.enabled = False txtsearch.enabled = True txtsearch.focus() txtsearch.text = "" L9
12 DataPenyewa_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet1.penyewa table. You can move, or remove it, as needed. Me.PenyewaTableAdapter.Fill(Me.DataS et1.penyewa) Me.LoadData() dgpenyewa.rowsdefaultcellstyle.backco lor = Color.Azure btndelete_click(byval btndelete.click Dim respon As MsgBoxResult respon = MsgBox("Anda ingin melnjutkan?", MsgBoxStyle.YesNo, "warning!") If respon = MsgBoxResult.Yes MsgBox("NO") Dim penyewadetail As New FormPenyewa dr = dgpenyewa.selectedrows.item(0).index id = Trim(dgpenyewa.Item(0, dr).value) id = Trim(dgpenyewa.Item(0, 0).Value) End dr = dgpenyewa.selectedrows.item(0).index id = Trim(dgpenyewa.Item(0, dr).value) penyewadetail.mainform = Me penyewadetail.state = "DELETE" penyewadetail.loaddata(id) penyewadetail.show() Friend Sub LoadData() Dim ds As New DataSet Dim sql As String = "Select * from penyewa order by convert(int,substring(id_penyewa,3,10 ))" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) sqlconn.dispose() dgpenyewa.datasource = ds.tables(0) dgpenyewa.refresh() btnedit_click(byval btnedit.click Dim penyewadetail As New FormPenyewa dr = dgpenyewa.selectedrows.item(0).index id = Trim(dgpenyewa.Item(0, dr).value) id = Trim(dgpenyewa.Item(0, 0).Value) End id = Trim(dgpenyewa.Item(0, dr).value) penyewadetail.mainform = Me penyewadetail.state = "EDIT" penyewadetail.show() penyewadetail.loaddata(id) txtsearch_keydown(byval sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtsearch.keydown If e.keycode = Keys.Enter cari() +Form Data Ruangan Public Class dataruangan Dim i, j As Integer DataRuangan_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet11.ruangan table. You can move, or remove it, as needed. Me.RuanganTableAdapter.Fill(Me.DataS et11.ruangan) Me.LoadData() dgruangan.rowsdefaultcellstyle.backco lor = Color.Azure filltextbox() Private Function LoadData() As Boolean Dim ds As New DataSet L10
13 Dim sql As String = "select *, keterangan= case when (kode_hari=b) then Hari Biasa else" + _ "Hari Libur end from ruangan order by nama_ruangan,kode_hari" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgruangan.datasource = ds.tables(0) End Function btnedit_click(byval btnedit.click If btnedit.text = "Simpan" "UPDATE RUANGAN SET HARGA=" + txtharga.text + " where kd_ruangan=" + txtkode_r.text + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End conn. LoadData() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") btnedit.text = "EDIT" txtharga.enabled = False txtharga.enabled = True btnedit.text = "Simpan" txtharga.focus() dgruangan_cellcontentclick(byval System.Windows.Forms.DataGridViewCell EventArgs) Handles dgruangan.cellcontentclick filltextbox() dgruangan_rowheadermouseclick(byval System.Windows.Forms.DataGridViewCell MouseEventArgs) Handles dgruangan.rowheadermouseclick filltextbox() If txtharga.enabled = True txtharga.enabled = False btnedit.text = "EDIT" filltextbox() i = dgruangan.currentrow.index txtkode_r.text = dgruangan.item(0, i).value txtnama.text = dgruangan.item(1, i).value txtharga.text = dgruangan.item(2, i).value txtkode_h.text = dgruangan.item(3, i).value btncancel_click(byval btncancel.click +Form Data Users Public Class DataUsers Dim dr As Integer Dim id As String DataUsers_Load(ByVal MyBase.Load TODO: This line of code loads data into the DataSet1.users table. You can move, or remove it, as needed. Me.UsersTableAdapter.Fill(Me.DataSet 1.users) Me.LoadData() Friend Function LoadData() As Boolean Dim ds As New DataSet Dim sql As String = "select userid,username,password=*********, role from users" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgpetugas.datasource = ds.tables(0) End Function btnexit_click(byval btnexit.click L11
14 btnedit_click(byval btnedit.click userinput.state = "EDIT" throwdetail("edit") btnadd_click(byval btnadd.click Dim userinput As New DataUsersInput userinput.mainusers = Me userinput.state = "ADD" userinput.show() btndel_click(byval btndel.click userinput.state = "DELETE" throwdetail("delete") throwdetail(byval state As String) Dim userinput As New DataUsersInput dr = dgpetugas.selectedrows.item(0).index id = CInt(Trim(dgpetugas.Item(0, dr).value)) id = Trim(dgpetugas.Item(0, 0).Value) End userinput.userid = id userinput.mainusers = Me userinput.state = state userinput.show() userinput.loaddata() +Form User Input Imports System.Data.SqlClient Public Class DataUsersInput Friend state As String Friend MainUsers As DataUsers Dim dsusers As New DataSet Dim reader As SqlDataReader Dim adapter As New SqlDataAdapter Friend userid As String btncancel_click(byval btncancel.click btnsave_click(byval btnsave.click If state = "ADD" "INSERT INTO USERS VALUES(" + Trim(txtuser.Text) _ + "," + Trim(txtpwd.Text) + "," + ddlrole.text + ")" If state = "EDIT" "UPDATE USERS SET USERNAME=" + Trim(txtuser.Text) + ", PASSWORD=" + txtpwd.text _ + ", ROLE=" + ddlrole.text + " WHERE USERID=" + userid "DELETE FROM USERS WHERE USERID=" + userid sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End MainUsers.LoadData() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") Friend Sub LoadData() "Select * from users where userid=" + userid adapter.selectcommand = sqlcmd adapter.fill(dsusers) txtuser.text = dsusers.tables(0).rows(0).item("usern ame").tostring() txtpwd.text = dsusers.tables(0).rows(0).item("passw ord").tostring() ddlrole.text = dsusers.tables(0).rows(0).item("role" ).ToString() DataUsersInput_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If state = "DELETE" lbljudul.text = "Anda Yakin Ingin Menghapus Data ini?" lbljudul.location = New System.Drawing.Point(50, 44) lbljudul.forecolor = Color.DarkRed btnsave.text = "YES" txtuser.enabled = False txtpwd.enabled = False ddlrole.enabled = False L12
15 +Form Penyewa Imports System.Data.SqlClient Public Class FormPenyewa Friend state As String Friend MainForm As DataPenyewa Dim dspenyewadetail As New DataSet Dim reader As SqlDataReader Dim adapter As New SqlDataAdapter Button7_Click(ByVal Button7.Click Friend Sub LoadData(ByVal id As String) "Select * from penyewa where id_penyewa=" + id + "" adapter.selectcommand = sqlcmd adapter.fill(dspenyewadetail) txtkode.text = dspenyewadetail.tables(0).rows(0).ite m("id_penyewa").tostring() txtnama.text = dspenyewadetail.tables(0).rows(0).ite m("nama").tostring() txtalamat.text = dspenyewadetail.tables(0).rows(0).ite m("alamat").tostring() txtkota.text = dspenyewadetail.tables(0).rows(0).ite m("kota").tostring() ddlid.text = dspenyewadetail.tables(0).rows(0).ite m("jenis_identitas").tostring() txtid.text = dspenyewadetail.tables(0).rows(0).ite m("no_identitas").tostring() txttlp.text = dspenyewadetail.tables(0).rows(0).ite m("telp").tostring() FormPenyewa_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If state = "ADD" "Select max(substring(id_penyewa,3,10)) from penyewa" Dim n As Integer = sqlcmd.executescalar() n = n + 1 txtkode.text = "P-" + n.tostring If state = "DELETE" lbldel.visible = True btn2.text = "YA" btnsave.visible = False Button7.Visible = False btn3.visible = True field(false) field(byval nilai As Boolean) txtnama.enabled = nilai txtalamat.enabled = nilai txtkota.enabled = nilai ddlid.enabled = nilai txtid.enabled = nilai txttlp.enabled = nilai btnsave_click(byval btnsave.click sqlcmd.commandtype = CommandType.StoredProcedure "usp_simpanpenyewa" Dim sqlparam As SqlClient.SqlParameter sqlcmd.parameters.add(txtkode.text) sqlcmd.parameters.add(txtnama.text) sqlcmd.parameters.add(txtalamat.text ) sqlcmd.parameters.add(txtkota.text) sqlcmd.parameters.add(ddlid.text) sqlcmd.parameters.add(txtid.text) sqlcmd.parameters.add(txttlp.text) sqlcmd.executenonquery() MsgBox("Simpan data sukses", MsgBoxStyle.Information, "Info") MsgBox("Error: " + ex.message, MsgBoxStyle.Information, "Error Informasi") End eksekusi() btn2_click(byval btn2.click If btn2.text = "YA" eksekusi() txtkode.text = "" txtnama.text = "" txtalamat.text = "" txtkota.text = "" L13
16 ddlid.text = "" txtid.text = "" txttlp.text = "" eksekusi() If state = "ADD" "Insert into penyewa values (" + txtkode.text + "," + txtnama.text + "," + txtalamat.text + "," + ddlid.text + _ "," + txtid.text + "," + txttlp.text + "," + txtkota.text + ")" If state = "EDIT" "UPDATE PENYEWA SET NAMA=" + txtnama.text + ",ALAMAT=" + txtalamat.text + ", KOTA=" + txtkota.text _ + ",jenis_identitas = " + ddlid.text + ", NO_IDENTITAS=" + txtid.text + ", TELP=" + txttlp.text + " WHERE id_penyewa=" + txtkode.text + "" "DELETE FROM PENYEWA WHERE ID_PENYEWA=" + txtkode.text + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End conn. conn.sqlconn.dispose() MainForm.LoadData() Me.BringToFront() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") btn3_click(byval btn3.click +Form Sewa Public Class FormSewa Dim i As Integer Dim nosewa As String FormSewa_Load(ByVal MyBase.Load Me.loaddata() Friend Sub loaddata() Dim ds As New DataSet Dim sql As String = "select no_sewa,id_penyewa,kd_ruangan,uangmuk a,jns_sewa, tgl_booking, tgl_pakai, jam_awal, jam_akhir," + _ "case when(status_lunas=0) then belum lunas when (status_lunas=1) then lunas else Cancel end status from sewa" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgsewa.datasource = ds.tables(0) btnadd_click(byval btnadd.click Me.Hide() Dim Sewa As New FormSewaDetail Sewa.state = "ADD" Sewa.StartPosition = Sewa.MainForm = Me Sewa.Show() btncari_click(byval btncari.click If ddltype.visible = False ddltype.visible = True ddlwords.visible = True lblwords.visible = True lbltype.visible = True If ddltype.selectedindex = 5 Me.loaddata() cari() cari() Dim ds As New DataSet Dim filter As String Dim words As String words = ddlwords.text Dim sql As String = "select no_sewa,id_penyewa,kd_ruangan,uangmuk a,jns_sewa, tgl_booking, tgl_pakai, jam_awal, jam_akhir," + _ " case when(status_lunas=0) then belum lunas when (status_lunas=1) then lunas else Cancel end status from sewa where " If ddltype.selectedindex = 0 filter = "no_sewa" If ddltype.selectedindex = 1 L14
17 filter = "id_penyewa" If ddltype.selectedindex = 4 filter = "status_lunas" If Trim(ddlwords.Text).ToUpper = "LUNAS" ddlwords.text = 1 If Trim(ddlwords.Text).ToUpper = "BELUM LUNAS" ddlwords.text = 0 If Trim(ddlwords.Text).ToUpper = "CANCEL" ddlwords.text = 2 MsgBox("Input salah!") If ddltype.selectedindex = 2 filter = "tgl_booking" filter = "tgl_pakai" If ddltype.selectedindex = 2 Or ddltype.selectedindex = 3 sql = sql + filter + "=" + ddlwords.text + "" sql = sql + "ltrim(rtrim(" + filter + "))=" + ddlwords.text + "" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgsewa.datasource = ds.tables(0) ddlwords.text = words btndel_click(byval btndel.click i = dgsewa.selectedrows.item(0).index i = 0 End Me.Hide() Dim Sewa As New FormSewaDetail nosewa = dgsewa.item(0, i).value Sewa.state = "DELETE" Sewa.StartPosition = Sewa.MainForm = Me Sewa.Show() Sewa.LoadData(nosewa) Sewa.lblconfirm.Visible = True Sewa.enable("False") btndetail_click(byval btndetail.click i = dgsewa.selectedrows.item(0).index i = 0 End Me.Hide() Dim Sewa As New FormSewaDetail nosewa = dgsewa.item(0, i).value Sewa.state = "DETAIL" Sewa.MainForm = Me Sewa.StartPosition = Sewa.Show() Sewa.LoadData(nosewa) Sewa.enable("False") btnedit_click(byval btnedit.click i = dgsewa.selectedrows.item(0).index i = 0 End Dim Sewa As New FormSewaDetail nosewa = dgsewa.item(0, i).value Sewa.state = "EDIT" Sewa.MainForm = Me Sewa.StartPosition = Sewa.Show() Sewa.LoadData(nosewa) btnexit_click(byval btnexit.click ddltype_selectedindexchanged(byval L15
18 ddltype.selectedindexchanged If ddltype.selectedindex = 5 ddlwords.text = "" ddlwords.enabled = False ddlwords.enabled = True ddlwords.focus() ddlwords_keydown(byval sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ddlwords.keydown If e.keycode = Keys.Enter cari() btncancel_click(byval btncancel.click i = dgsewa.selectedrows.item(0).index i = 0 End Me.Hide() Dim Sewa As New FormSewaDetail nosewa = dgsewa.item(0, i).value Sewa.state = "CANCEL" Sewa.lblconfirm.Text = "Membatalkan Data Pemesanan ini? " Sewa.lblconfirm.Visible = True Sewa.enable("False") Sewa.MainForm = Me Sewa.StartPosition = Sewa.Show() Sewa.LoadData(nosewa) +Form Sewa Detail Imports System.Data.SqlClient Imports System.Drawing Imports System.Drawing.Printing Public Class FormSewaDetail Friend state As String Friend MainForm As FormSewa Friend hargaruang, hargapaket, totalsewa As Decimal Dim n As Integer Dim s As String Dim adapter As New SqlDataAdapter Dim dssewa As New DataSet Private Doc As New PrintDocument() Button1_Click(ByVal System.EventArgs) Me.Hide() FormSewa.Show() FormSewaDetail_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If state = "ADD" ddlstatus.text = "belum lunas" "SELECT SW+left(convert(varchar,getdate(),1 12),6) + " + _ "isnull(right(0+convert(varchar,max (convert(int,right(no_sewa,2)))+1),2),01) from sewa" Dim s = sqlcmd.executescalar() txtnosewa.text = s "SELECT max(id_penyewa) FROM PENYEWA" s = sqlcmd.executescalar() txtkodepenyewa.text = s If state = "CANCEL" lblconfirm.text = "Anda Yakin Ingin Membatalkan Pemesanan Ini?" Friend Sub enable(byval enable As String) ddljnssewa.enabled = enable ddljamawal.enabled = enable dtbooking.enabled = enable dtpakai.enabled = enable txtuangmuka.enabled = enable ddlstatus.enabled = enable btncari1.enabled = enable btnkoderuang.enabled = enable btnkodepaket.enabled = enable Friend Sub LoadData(ByVal nosewa As String) "Select * from sewa where no_sewa=" + nosewa + "" adapter.selectcommand = sqlcmd adapter.fill(dssewa) txtnosewa.text = dssewa.tables(0).rows(0).item("no_sew a").tostring() dtbooking.text = dssewa.tables(0).rows(0).item("tgl_bo oking").tostring() L16
19 dtpakai.text = dssewa.tables(0).rows(0).item("tgl_pa kai").tostring() txtkodepenyewa.text = dssewa.tables(0).rows(0).item("id_pen yewa").tostring() ddljnssewa.text = dssewa.tables(0).rows(0).item("jns_se wa").tostring() ddlkoderuang.text = dssewa.tables(0).rows(0).item("kd_rua ngan").tostring() ddljamawal.text = dssewa.tables(0).rows(0).item("jam_aw al").tostring() ddljamakhir.text = dssewa.tables(0).rows(0).item("jam_ak hir").tostring() txtuangmuka.text = dssewa.tables(0).rows(0).item("uangmu ka").tostring() If dssewa.tables(0).rows(0).item("status _lunas").tostring() = 0 ddlstatus.text = "Belum Lunas" If dssewa.tables(0).rows(0).item("status _lunas").tostring() = 1 ddlstatus.text = "Lunas" ddlstatus.text = "Batal" txtkodepaket.text = dssewa.tables(0).rows(0).item("no_pes anpaket").tostring() txttotal.text = dssewa.tables(0).rows(0).item("totalh arga").tostring() btncari1_click(byval btncari1.click Dim Sewapenyewa As New FormSewaPenyewa Sewapenyewa.MainForm = Me Sewapenyewa.StartPosition = Sewapenyewa.Show() btnkoderuang_click(byval sender As btnkoderuang.click Dim Sewaruangan As New FormSewaRuangan Sewaruangan.MainFormRuang = Me Sewaruangan.StartPosition = Sewaruangan.Show() btncancel_click(byval btncancel.click btnkodepaket_click(byval sender As btnkodepaket.click Dim Sewapaket As New Form_Paket_Pemesanan Sewapaket.MainFormSewaPaket = Me Sewapaket.StartPosition = Sewapaket.Show() Friend Sub harga(byval hrgpkt As Decimal) txttotal.text = CDec(hargapaket + hargaruang).tostring("##,##,###.00") btnok_click(byval btnok.click Dim kodepaket, statuslunas As String If txtkodepaket.text = "" kodepaket = "0" kodepaket = txtkodepaket.text If ddlstatus.selectedindex = 0 statuslunas = "0" statuslunas = "1" If state = "ADD" totalsewa = hargaruang + hargapaket "Insert into sewa values (" + txtnosewa.text + "," + dtbooking.text + "," + dtpakai.text + "," + ddljamawal.text + _ "," + ddljamakhir.text + "," + txtuangmuka.text + "," + txtkodepenyewa.text + "," + ddlkoderuang.text + "," + kodepaket + _ "," + totalsewa.tostring + ",0,NULL,NULL," + ddljnssewa.text + ")" If state = "EDIT" "UPDATE SEWA SET ID_PENYEWA=" + txtkodepenyewa.text + ", jns_sewa=" + ddljnssewa.text + _ ", kd_ruangan=" + ddlkoderuang.text + ", jam_awal=" + L17
20 ddljamawal.text + ", jam_akhir=" + ddljamakhir.text + _ ",tgl_booking=" + dtbooking.text + ", tgl_pakai=" + dtpakai.text + ", uangmuka=" + txtuangmuka.text + _ ", status_lunas=" + statuslunas + ", no_pesanpaket=" + txtkodepaket.text + ", totalharga=" + txttotal.text + _ " Where no_sewa=" + txtnosewa.text If state = "DELETE" "DELETE FROM SEWA WHERE NO_SEWA=" + txtnosewa.text "UPDATE SEWA SET STATUS_LUNAS=2 WHERE NO_SEWA=" + txtnosewa.text + "" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End sqlconn.dispose() MainForm.loaddata() Me.BringToFront() MsgBox("Eksekusi berhasil", MsgBoxStyle.Information, "Result") If state = "ADD" Or state = "EDIT" cetakfaktur() cetakfaktur() Dim cetak As New FormCetakSewa Dim total As Decimal total = CDec(txttotal.Text) - CDec(txtuangmuka.Text) total = CDec(txtuangmuka.Text) End cetak.lblnosewa.text = txtnosewa.text cetak.lblnama.text = txtkodepenyewa.text cetak.lbljam.text = Now.ToLongTimeString cetak.lbltgl.text = Now.Date.ToShortDateString cetak.lbltglbooking.text = dtbooking.text cetak.lbltglpakai.text = dtpakai.text cetak.lbljamawal.text = ddljamawal.text cetak.lbljamakhir.text = ddljamakhir.text cetak.lbljenissewa.text = ddljnssewa.text cetak.lblkode.text = ddlkoderuang.text cetak.lblnopesan.text = txtkodepaket.text cetak.lblnilai.text = CDec(txttotal.Text).ToString("##,##,# ##.00") cetak.lbluangmuka.text = CDec(txtuangmuka.Text).ToString("##,# #,###.00") cetak.lbltotal.text = CDec(total).ToString("##,##,###.00") cetak.mdiparent = MDIParent1 cetak.mainformcetak = Me cetak.startposition = cetak.show() ddljamawal_selectedindexchanged(byval ddljamawal.selectedindexchanged If ddljnssewa.selectedindex = 0 If ddljamawal.selectedindex = 0 ddljamakhir.text = "14:00" ddljamakhir.text = "22:00" ddljnssewa_selectedindexchanged(byval ddljnssewa.selectedindexchanged If (ddljnssewa.selectedindex = 1 Or ddljnssewa.selectedindex = 2) ddljamakhir.enabled = True ddljamawal.text = "" ddljamakhir.text = "" ddljamawal.selectedindex = 0 ddljamakhir.enabled = False +Form Sewa Ruangan Public Class FormSewaRuangan Dim i, j As Integer L18
21 Friend MainFormRuang As FormSewaDetail DataRuangan_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet11.ruangan table. You can move, or remove it, as needed. Me.RuanganTableAdapter.Fill(Me.DataS et11.ruangan) Me.LoadData() dgruangan.rowsdefaultcellstyle.backco lor = Color.Azure Private Function LoadData() As Boolean Dim ds As New DataSet Dim sql As String = "select *, keterangan= case when (kode_hari=b) then Hari Biasa else" + _ "Hari Libur end from ruangan order by nama_ruangan,kode_hari" Dim adapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sql, sqlconn) adapter.fill(ds) dgruangan.datasource = ds.tables(0) End Function btncancel_click(byval btncancel.click btnok_click(byval btnok.click i = dgruangan.currentrow.index MainFormRuang.ddlkoderuang.Text = dgruangan.item(0, i).value MainFormRuang.hargaruang = dgruangan.item(2, i).value MainFormRuang.txttotal.Text = dgruangan.item(2, i).value +Form Paket Imports System.Data.SqlClient Imports System.Drawing Imports System.Drawing.Printing Public Class Form_Paket_Pemesanan Dim adapter As New SqlDataAdapter Dim ds As New DataSet Dim i As Integer Friend kodeadditem As String Dim kodeitemarray() As String Private Doc As New PrintDocument() Dim hrgpaket As Decimal Friend MainFormSewaPaket As FormSewaDetail Dim total As Decimal ddltambah_selectedindexchanged(byval ddltambah.selectedindexchanged If ddltambah.selectedindex = 0 btnpilih.visible = True "select nama_item from item order by nama_item" adapter.selectcommand = sqlcmd Dim ds2 As New DataSet adapter.fill(ds2) For i = 0 To ds2.tables(0).rows.count - 1 ddltambah2.items.add(ds2.tables(0).ro ws(i).item(0).tostring) Next If ddltambah.selectedindex = 1 btnpilih.visible = False txthargaitem.text = "0" ddldokumentasi_selectedindexchanged(b yval sender As System.Object, ByVal e As ddldokumentasi.selectedindexchanged If ddldokumentasi.selectedindex = 0 lbldokumentasi.text = "30,0000" If ddldokumentasi.selectedindex = 1 lbldokumentasi.text = "50,0000" txthargadok.focus() Form_Paket_Pemesanan_Load(ByVal Me.Load "select distinct kd_paket,nama_paket from paket_makan" adapter.selectcommand = sqlcmd adapter.fill(ds) L19
22 For i = 0 To ds.tables(0).rows.count - 1 ddlpaket.items.add(ds.tables(0).rows( i).item(1).tostring) Next txthargaadmin.text = "250,000.00" AddNoPesanPaket() Dim nopesan, notambah As String Dim statustambah As Boolean Dim n As Integer 0 If ddltambah.selectedindex > statustambah = False statustambah = True "SELECT count(*) FROM dbo.pesan_paket" n = sqlcmd.executescalar() n = n + 1 nopesan = "PSN-" + n.tostring notambah = "TMB-" + n.tostring "INSERT INTO PESAN_PAKET VALUES(" + nopesan + "," + ds.tables(0).rows(i).item(0).tostring + "," + Now.ToString + "," + txtporsi.text _ + "," + txtdiskon.text + "," + hrgpaket.tostring + "," + statustambah.tostring + ")" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End If ddltambah.selectedindex = 0 kodeitemarray = kodeadditem.split(",") For i = 0 To kodeitemarray.length - 1 "INSERT INTO MENU_TAMBAH VALUES(" + notambah + "," + nopesan + "," + kodeitemarray(i).tostring + "," + txtporsi.text + ")" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End Next conn. conn.sqlconn.dispose() MainForm.LoadData() Me.BringToFront() MsgBox("Transaksi Pemesanan Berhasil", MsgBoxStyle.Information, "Pemesanan Paket") MainFormSewaPaket.txtkodepaket.Text = nopesan.tostring txtporsi_textchanged(byval sender As txtporsi.textchanged Dim harga As Decimal Dim porsi As Integer "SELECT sum(harga_item) FROM PAKET_MAKAN A INNER JOIN ITEM B ON A.KD_ITEM = B.KD_ITEM" + _ " where nama_paket=" + Trim(ddlpaket.Text) + "" MsgBox("Harus Isi Dengan Angka") End harga = sqlcmd.executescalar harga = harga * CDec(txtporsi.Text) harga = 0 End txthargapaket.text = harga.tostring("##,##,###.00") Format(harga, "c") porsi = CInt(txtporsi.Text) porsi = 0 End If porsi >= 100 And porsi < 200 txtdiskon.text = "10" If porsi >= 200 And porsi < 400 txtdiskon.text = "20" If porsi >= 400 And porsi < 600 txtdiskon.text = "25" If porsi >= 600 And porsi < 800 txtdiskon.text = "30" If porsi >= 800 txtdiskon.text = "40" txtdiskon.text = "0" L20
23 ddlpaket_selectedindexchanged(byval ddlpaket.selectedindexchanged txtporsi.enabled = True i = ddlpaket.selectedindex txtporsi.focus() keluar: Label15_Click(ByVal Label15.Click txthargaadmin.enabled = True btnkalkulasi_click(byval sender As btnkalkulasi.click pbsave.enabled = True Dim hrgkotor As Decimal hrgkotor = CDec(txthargaPaket.Text) + CDec(txtHargaDok.Text) + CDec(txtHargaAdmin.Text) MsgBox("Isi data dengan lengkap!") GoTo keluar End hrgpaket = hrgkotor - (hrgkotor * CDec(txtdiskon.Text) / 100) lblhrgkotor.text = hrgkotor.tostring lbldiskon2.text = txtdiskon.text + "%" lblhrgpaket.text = hrgpaket.tostring total = hrgpaket + CDec(txthargaitem.Text) Button1_Click(ByVal System.EventArgs) Dim SampleDoc As New Printing.PrintDocument SampleDoc = New Printing.PrintDocument SampleDoc.Print() Dim ppdlg As New PrintPreviewDialog() ppdlg.document = Doc ppdlg.show() btnpilih_click(byval btnpilih.click Dim tambah As New FormMenuTambah tambah.mainform = Me tambah.nm_paket = ddlpaket.text tambah.show() lblhrgkotor.visible = True lbldiskon2.visible = True lblhrgpaket.visible = True lblhrgtambah.visible = True lbltotal.visible = True lbl1.visible = True lbl2.visible = True lbl3.visible = True lbl4.visible = True lbl5.visible = True lblline.visible = True lblline2.visible = True lblhrgtambah.text = CDec(txthargaitem.Text).ToString("##, ##,###.00") txthargadok.text = CDec(txtHargaDok.Text).ToString("##,# #,###.00") lblhrgkotor.text = CDec(lblhrgkotor.Text).ToString("##,# #,###.00") lblhrgpaket.text = CDec(lblhrgpaket.Text).ToString("##,# #,###.00") lbltotal.text = total.tostring("##,##,###.00") pbsave_click(byval pbsave.click AddNoPesanPaket() MainFormSewaPaket.hargapaket = total MainFormSewaPaket.harga(total) btnexit_click(byval btnexit.click btnclear_click(byval btnclear.click ddlpaket.text = "" ddltambah.text = "" ddldokumentasi.text = "" txtporsi.text = "" L21
24 txthargapaket.text = "" txthargaitem.text = "" txthargadok.text = "" txthargaadmin.text = "" txtdiskon.text = "" lblhrgkotor.text = 0 lbldiskon2.text = 0 lblhrgpaket.text = 0 lbltotal.text = 0 lblhrgtambah.text = 0 ddlpaket.focus() +Form Paket Imports System.Data.SqlClient Imports System.Drawing Imports System.Drawing.Printing Public Class Form_Paket_Pemesanan Dim adapter As New SqlDataAdapter Dim ds As New DataSet Dim i As Integer Friend kodeadditem As String Dim kodeitemarray() As String Private Doc As New PrintDocument() Dim hrgpaket As Decimal Friend MainFormSewaPaket As FormSewaDetail Dim total As Decimal ddltambah_selectedindexchanged(byval ddltambah.selectedindexchanged If ddltambah.selectedindex = 0 btnpilih.visible = True "select nama_item from item order by nama_item" adapter.selectcommand = sqlcmd Dim ds2 As New DataSet adapter.fill(ds2) For i = 0 To ds2.tables(0).rows.count - 1 ddltambah2.items.add(ds2.tables(0).ro ws(i).item(0).tostring) Next If ddltambah.selectedindex = 1 btnpilih.visible = False txthargaitem.text = "0" ddldokumentasi_selectedindexchanged(b yval sender As System.Object, ByVal e As ddldokumentasi.selectedindexchanged If ddldokumentasi.selectedindex = 0 lbldokumentasi.text = "30,0000" If ddldokumentasi.selectedindex = 1 lbldokumentasi.text = "50,0000" txthargadok.focus() Form_Paket_Pemesanan_Load(ByVal Me.Load "select distinct kd_paket,nama_paket from paket_makan" adapter.selectcommand = sqlcmd adapter.fill(ds) For i = 0 To ds.tables(0).rows.count - 1 ddlpaket.items.add(ds.tables(0).rows( i).item(1).tostring) Next txthargaadmin.text = "250,000.00" AddNoPesanPaket() Dim nopesan, notambah As String Dim statustambah As Boolean Dim n As Integer 0 If ddltambah.selectedindex > statustambah = False statustambah = True "SELECT count(*) FROM dbo.pesan_paket" n = sqlcmd.executescalar() n = n + 1 nopesan = "PSN-" + n.tostring notambah = "TMB-" + n.tostring "INSERT INTO PESAN_PAKET VALUES(" + nopesan + "," + ds.tables(0).rows(i).item(0).tostring + "," + Now.ToString + "," + txtporsi.text _ + "," + txtdiskon.text + "," + hrgpaket.tostring + "," + statustambah.tostring + ")" sqlcmd.executenonquery() L22
25 MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End If ddltambah.selectedindex = 0 kodeitemarray = kodeadditem.split(",") For i = 0 To kodeitemarray.length - 1 "INSERT INTO MENU_TAMBAH VALUES(" + notambah + "," + nopesan + "," + kodeitemarray(i).tostring + "," + txtporsi.text + ")" sqlcmd.executenonquery() MsgBox(ex.Message, MsgBoxStyle.AbortRetryIgnore, "warning") End Next conn. conn.sqlconn.dispose() MainForm.LoadData() Me.BringToFront() MsgBox("Transaksi Pemesanan Berhasil", MsgBoxStyle.Information, "Pemesanan Paket") MainFormSewaPaket.txtkodepaket.Text = nopesan.tostring txtporsi_textchanged(byval sender As txtporsi.textchanged Dim harga As Decimal Dim porsi As Integer "SELECT sum(harga_item) FROM PAKET_MAKAN A INNER JOIN ITEM B ON A.KD_ITEM = B.KD_ITEM" + _ " where nama_paket=" + Trim(ddlpaket.Text) + "" MsgBox("Harus Isi Dengan Angka") End harga = sqlcmd.executescalar harga = harga * CDec(txtporsi.Text) harga = 0 End txthargapaket.text = harga.tostring("##,##,###.00") Format(harga, "c") porsi = CInt(txtporsi.Text) porsi = 0 End If porsi >= 100 And porsi < 200 txtdiskon.text = "10" If porsi >= 200 And porsi < 400 txtdiskon.text = "20" If porsi >= 400 And porsi < 600 txtdiskon.text = "25" If porsi >= 600 And porsi < 800 txtdiskon.text = "30" If porsi >= 800 txtdiskon.text = "40" txtdiskon.text = "0" ddlpaket_selectedindexchanged(byval ddlpaket.selectedindexchanged txtporsi.enabled = True i = ddlpaket.selectedindex txtporsi.focus() btnkalkulasi_click(byval btnkalkulasi.click pbsave.enabled = True Dim hrgkotor As Decimal hrgkotor = CDec(txthargaPaket.Text) + CDec(txtHargaDok.Text) + CDec(txtHargaAdmin.Text) MsgBox("Isi data dengan lengkap!") GoTo keluar End hrgpaket = hrgkotor - (hrgkotor * CDec(txtdiskon.Text) / 100) lblhrgkotor.text = hrgkotor.tostring lbldiskon2.text = txtdiskon.text + "%" lblhrgpaket.text = hrgpaket.tostring total = hrgpaket + CDec(txthargaitem.Text) lblhrgkotor.visible = True lbldiskon2.visible = True lblhrgpaket.visible = True L23
26 lblhrgtambah.visible = True lbltotal.visible = True lbl1.visible = True lbl2.visible = True lbl3.visible = True lbl4.visible = True lbl5.visible = True lblline.visible = True lblline2.visible = True lblhrgtambah.text = CDec(txthargaitem.Text).ToString("##, ##,###.00") txthargadok.text = CDec(txtHargaDok.Text).ToString("##,# #,###.00") lblhrgkotor.text = CDec(lblhrgkotor.Text).ToString("##,# #,###.00") lblhrgpaket.text = CDec(lblhrgpaket.Text).ToString("##,# #,###.00") lbltotal.text = total.tostring("##,##,###.00") keluar: Label15_Click(ByVal Label15.Click txthargaadmin.enabled = True Button1_Click(ByVal System.EventArgs) Dim SampleDoc As New Printing.PrintDocument SampleDoc = New Printing.PrintDocument SampleDoc.Print() Dim ppdlg As New PrintPreviewDialog() ppdlg.document = Doc ppdlg.show() tnpilih_click(byval btnpilih.click Dim tambah As New FormMenuTambah tambah.mainform = Me tambah.nm_paket = ddlpaket.text tambah.show() pbsave_click(byval sender As pbsave.click AddNoPesanPaket() MainFormSewaPaket.hargapaket = total MainFormSewaPaket.harga(total) btnexit_click(byval btnexit.click btnclear_click(byval btnclear.click ddlpaket.text = "" ddltambah.text = "" ddldokumentasi.text = "" txtporsi.text = "" txthargapaket.text = "" txthargaitem.text = "" txthargadok.text = "" txthargaadmin.text = "" txtdiskon.text = "" lblhrgkotor.text = 0 lbldiskon2.text = 0 lblhrgpaket.text = 0 lbltotal.text = 0 lblhrgtambah.text = 0 ddlpaket.focus() +Form Pelunasan Public Class FormPelunasan Dim i As Integer FormPelunasan_Load(ByVal sender As MyBase.Load TODO: This line of code loads data into the DataSet1.Lunas table. You can move, or remove it, as needed. Me.LunasTableAdapter.Fill(Me.DataSet 1.Lunas) TODO: This line of code loads data into the DataSet1.Lunas table. You can move, or remove it, as needed. Me.LunasTableAdapter.Fill(Me.DataSet1.Lunas) TODO: This line of code loads data into the DataSet1.Lunas table. You can move, or remove it, as needed. Me.LunasTableAdapter.Fill(Me.DataSet 1.Lunas) Me.loaddata() txttgllunas.text = Now.Date.ToShortDateString.ToString Friend Sub loaddata() L24
L A M P I R A N. Universitas Sumatera Utara
L A M P I R A N 1 Listing Program 1. Form Menu Public Class frm_menu Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click frm_login.show() Me.Hide()
More informationLISTING PROGRAM. 1. Tampilan Awal. 2. Menu Login. Public Class Awal
LISTING PROGRAM 1. Tampilan Awal Public Class Awal Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ProgressBar1.Increment(10) If ProgressBar1.Value
More informationLAMPIRAN. Universitas Sumatera Utara
LAMPIRAN 1. Modul Imports System.Data Imports System.Data.OleDb Module Module1 Public conn As OleDbConnection Public CMD As OleDbCommand Public DS As New DataSet Public DA As OleDbDataAdapter Public RD
More informationUnit 4 Advanced Features of VB.Net
Dialog Boxes There are many built-in dialog boxes to be used in Windows forms for various tasks like opening and saving files, printing a page, providing choices for colors, fonts, page setup, etc., to
More informationLISTING PROGRAM. 1. Form Menu Utama. Universitas Sumatera Utara
LISTING PROGRAM 1. Form Menu Utama Dim LenTemp As Integer Dim SrtTemp As String Dim n As Integer Private Sub Form_Load() Call Tengah(Me) lhsysmenu = GetSystemMenu(Me.hwnd, False) lretval = RemoveMenu(lhSysMenu,
More informationDarshan Institute of Engineering & Technology for Diploma Studies
Dialog Box: There are many built-in dialog boxes to be used in Windows forms for various tasks like opening and saving files, printing a page, providing choices for colors, fonts, page setup, etc., to
More informationIT3101 -Rapid Application Development Second Year- First Semester. Practical 01. Visual Basic.NET Environment.
IT3101 -Rapid Application Development Second Year- First Semester Practical 01 Visual Basic.NET Environment. Main Area Menu bar Tool bar Run button Solution Explorer Toolbox Properties Window Q1) Creating
More informationLAMPIRAN A: Listing Program
78 LAMPIRAN A: Listing Program 1. Form Login Public Class FrmLogin Public user As String Private Sub CmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdLogin.Click Dim
More informationMember Management System
Member Management System These codes are provided ONLY for reference / Help developers. And also SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUERMENT FOR THE AWARD OF BACHELOR OF COMPUTER APPLICATION (BCA)
More informationLAMPIRAN A-2 : LAPORAN PENJUALAN DOKUMEN KELUARAN
LAMPIRAN A-2 : LAPORAN PENJUALAN DOKUMEN KELUARAN LAMPIRAN A-1 : NOTA DOKUMEN KELUARAN LAMPIRAN B MASUKAN SISTEM BERJALAN LAMPIRAN B-1 : DATA BARANG DOKUMEN MASUKAN LAMPIRAN B-2 : DATA PELANGGAN DOKUMEN
More informationKartu Bimbingan Tugas Akhir Mahasiswa
KEMENTRIAN PENDIDIKAN DAN KEBUDAYAAN UNIVERSITAS SUMATERA UTARA FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM Jln. Bioteknologi No. 1 Kampus USU Padang Bulan Medan-20155 Telp. (061) 8214290, 8211212, 8211414
More informationVB.NET Programs. ADO.NET (insert, update, view records)
ADO.NET (insert, update, view records) VB.NET Programs Database: Student Table : Studtab (adno, name, age, place) Controls: DataGridView, Insert button, View button, Update button, TextBox1 (for Admission
More informationLAMPIRAN LIST PROGRAM
LAMPIRAN LIST PROGRAM 1. Modules Public conn As New ADODB.Connection Public rstb_pendekatan As ADODB.Recordset Public rstb_solusi As ADODB.Recordset Public rstb_alasan As ADODB.Recordset Public rstb_pilihan
More informationDO NOT COPY AMIT PHOTOSTUDIO
AMIT PHOTOSTUDIO These codes are provided ONLY for reference / Help developers. And also SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUERMENT FOR THE AWARD OF BACHELOR OF COMPUTER APPLICATION (BCA) All rights
More informationPrivate Sub MenuUtamaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.ShowDialog() End Sub
LISTING PROGRAM Menu_Utama.vb Public Class FrmUtama Private Sub DataMovieToolStripMenuItem_Click(ByVal sender As DataMovieToolStripMenuItem.Click FrmMovie.ShowDialog() Private Sub DataPeminjamToolStripMenuItem_Click(ByVal
More informationFOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources
FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources This application demonstrates how a DataGridView control can be
More informationForm Connection. Imports System Imports System.Threading Imports System.IO.Ports Imports System.ComponentModel
Form Connection Imports System Imports System.Threading Imports System.IO.Ports Imports System.ComponentModel Public Class connection '------------------------------------------------ Dim myport As Array
More informationIMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants
IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants These notes are available on the IMS1906 Web site http://www.sims.monash.edu.au Tutorial Sheet 4/Week 5 Please
More informationDEVELOPING OBJECT ORIENTED APPLICATIONS
DEVELOPING OBJECT ORIENTED APPLICATIONS By now, everybody should be comfortable using form controls, their properties, along with methods and events of the form class. In this unit, we discuss creating
More informationElse. End If End Sub End Class. PDF created with pdffactory trial version
Dim a, b, r, m As Single Randomize() a = Fix(Rnd() * 13) b = Fix(Rnd() * 13) Label1.Text = a Label3.Text = b TextBox1.Clear() TextBox1.Focus() Private Sub Button2_Click(ByVal sender As System.Object, ByVal
More informationLISTING PROGRAM. frmmenu.vb. frmlogin.vb. Universitas Sumatera Utara. Public Class frmmenu
LISTING PROGRAM frmmenu.vb Public Class frmmenu Private Sub QuitToolStripMenuItem_Click(ByVal sender As QuitToolStripMenuItem.Click Close() Private Sub OtoritasToolStripMenuItem_Click(ByVal sender As OtoritasToolStripMenuItem.Click
More informationDAFTAR PUSTAKA. Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England
DAFTAR PUSTAKA Bojic, Paul, 2008, Business Information System. Pearson Education Ltd., England Elib.unikom.ac.id, SQL Server, 27 April 2014. Jogiyanto. 2005. Analisis & Desain Sistem Informasi : Pendekatan
More informationWorking with Printers
Chapter 17 Working with Printers After completing this chapter, you will be able to: Print graphics from a Microsoft Visual Basic program. Print text from a Visual Basic program. Print multipage documents.
More informationLampiran 1 Kode Program
53 Lampiran 1 Kode Program Kode Program 1 Kode Menu Peminjaman Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT_Cari.Click Call CariKaset() Private Sub RB_CheckedChanged(ByVal
More informationPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = Label1.
練習問題 1-1 Label1 Label1.Text = Label1.Text + 2 練習問題 1-2 Button2 Label1 Label1.Text = Label1.Text+ 2 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
More informationObjectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism
Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability
More informationLISTING PROGRAM. PrivateSub KeluarToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles KeluarToolStripMenuItem.Click Close() EndSub
LISTING PROGRAM 1.Tampilan awal PublicClassmm PrivateSub InputDataGuruToolStripMenuItem_Click(sender AsObject, e AsEventArgs) Handles InputDataGuruToolStripMenuItem.Click guru.show() Me.Hide() EndSub PrivateSub
More informationLAMPIRAN A: Listing Program
67 1. Form Menu Utama LAMPIRAN A: Listing Program Public Class MScreen Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() Form1.Show()
More informationSenior Software Engineering Project CSSP Project CEN April 5, Adam Cox Tass Oscar
Senior Software Engineering Project CSSP Project CEN 4935 April 5, 2006 Adam Cox Tass Oscar 1. Introduction One of the ways in which social worker professionals and students evaluate their clients is with
More informationSub clear() lblidver.text = Nothing lblstatus.text = Nothing
LAMPIRAN Berikut merupakan listing code dari Form Verifikasi: Imports System.IO Public Class FrmVerifikasi_vb Dim FPDatabase As New FingerspotETouchSDK.FinFPDatabase Dim WithEvents verifikasi As FingerspotETouchSDK.FinFPVerification
More informationSection 7 The BASIC Language II
Dates Section 7 The BASIC Language II The Date class holds a date (between January 1 st, 0001 and December 31 st, 9999) combined with a time (between 0:00:00 and 23:59:59) Constructors of the Date class
More informationWEEK 1. Event: Tick: Occurs when the specified timer interval has elapsed and the timer is enabled.
WEEK 1 Timer: A Timer is used to raise an event at user-defined intervals. It is optimized for use in Windows Forms applications. Timer is used to control and manage events that are time related. For example:
More informationMr.Khaled Anwar ( )
The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program
More informationIn this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.
Simple Calculator In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Let s get started First create a new Visual Basic
More information"!#... )*! "!# )+, -./ 01 $
Email engauday@hotmail.com! "!#... $ %&'... )*! "!# )+, -./ 01 $ ) 1+ 2#3./ 01 %.. 7# 89 ; )! 5/< 3! = ;, >! 5 6/.?
More informationVARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals
VARIABLES WHAT IS A VARIABLE? A variable is a storage location in the computer s memory, used for holding information while the program is running. The information that is stored in a variable may change,
More informationA-1 LISTING PROGRAM. Halaman Koneksi. Universitas Sumatera Utara
A-1 LISTING PROGRAM Halaman Koneksi Imports System.Data.OleDb Imports System.Data.OleDb.OleDbCommand Module koneksi Public con As OleDbConnection Public cmd As OleDbCommand Public dtr As OleDbDataReader
More informationIngegneria del Software T. Interfaccia utente
Interfaccia utente Creating Windows Applications Typical windows-application design & development 1+ classes derived from System.Windows.Forms.Form Design UI with VisualStudio.NET Possible to do anything
More informationCALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3)
CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration MIS 15 Introduction to Business Programming Programming Assignment 3 (P3) Points: 50 Due Date: Tuesday, May 10 The purpose of
More informationA-1 LISTING PROGRAM. 1. Module1
A-1 LISTING PROGRAM 1. Module1 Imports System.Data.Odbc Imports System.Data Imports System.Data.SqlClient Imports MySql.Data.MySqlClient Module Module1 Public userid As String Public level As String Public
More informationA Second Visual BASIC Application : Greetings
The Greetings Program A Second Visual BASIC Application : Greetings The following instructions take you through the steps to create a simple application. A greeting is displayed in one of four different
More informationDesign Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report
Design Of Human Computer Interfaces Assignment 1- Hello World Compliance Report Prepared for: Skip Poehlman Prepared By: K C Course: SE 4D03 Date: September 30, 2008 Contents 1. Code Listing a. Module
More informationC16 Visual Basic Net Programming
C16 Visual Basic Net Programming Student ID Student Name Date - Module Tutor - 1 P a g e Report Contents Introduction... 2 Software Development Process... 3 Self Reflection... 6 References... 6 Appendices...
More informationLearning VB.Net. Tutorial 19 Classes and Inheritance
Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you
More informationLAMPIRAN LISTING PROGRAM
LAMPIRAN LISTING PROGRAM Imports System Imports System.IO Imports System.Math Public Class frmutama Dim dicari As DirectoryInfo Dim flpath As String, srcpath As String Dim asnode As Double, dsnode As Double,
More informationRevision for Final Examination (Second Semester) Grade 9
Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual
More informationXNA 4.0 RPG Tutorials. Part 11b. Game Editors
XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on
More informationLearning VB.Net. Tutorial 15 Structures
Learning VB.Net Tutorial 15 Structures Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.
More informationLearning VB.Net. Tutorial 10 Collections
Learning VB.Net Tutorial 10 Collections Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.
More informationDéclaration du module
Déclaration du module Imports System.IO Module ModuleStagiaires Public Structure Stagiaire Private m_code As Long Private m_nom As String Private m_prenom As String Public Property code() As Long Get Return
More informationCheck out the demo video of this application so you know what you will be making in this tutorial.
Visual Basic - System Information Viewer Welcome to our special tutorial of visual basic. In this tutorial we will use Microsoft visual studio 2010 version. You can download it for free from their website.
More informationLISTING PROGRAM. 1. Menu Utama
LISTING PROGRAM 1. Menu Utama Option Explicit Dim rssms As Recordset Dim stopen As String * 1 Dim IDSms As Integer Dim rspesan As Recordset Dim Kode As String * 1 Dim rspaket As Recordset Dim NmPaket As
More informationAnswer on Question# Programming, C#
Answer on Question#38723 - Programming, C# 1. The development team of SoftSols Inc. has revamped the software according to the requirements of FlyHigh Airlines and is in the process of testing the software.
More informationSerial-out Color Sensor. Overview. Features
Visit us @ www.thearyatechnologies.com Email: aryaprotech@gmail.com / info@thearyatechnologies.com Contact us@ 0253-2512131 Serial-out Color Sensor Overview Color sensor identifies primary colors (Red,
More information1. Create your First VB.Net Program Hello World
1. Create your First VB.Net Program Hello World 1. Open Microsoft Visual Studio and start a new project by select File New Project. 2. Select Windows Forms Application and name it as HelloWorld. Copyright
More informationMy first game. 'function which adds objects with bug tag to bugarray array. Saturday, November 23, :06 AM
My first game Saturday, November 23, 2013 5:06 AM Public Class Form1 Dim moveright As Boolean = False Dim moveup As Boolean = False Dim moveleft As Boolean = False Dim movedown As Boolean = False Dim score
More informationLaboratorio di Ingegneria del Software
Laboratorio di Ingegneria del Software L-A Interfaccia utente System.Windows.Forms The System.Windows.Forms namespace contains classes for creating Windows-based applications The classes can be grouped
More informationLaboratorio di Ingegneria del L-A
Software L-A Interfaccia utente System.Windows.Forms The System.Windows.Forms namespace contains classes for creating Windows-based applications The classes can be grouped into the following categories:
More informationUNIT-3. Prepared by R.VINODINI 1
Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI
More informationMainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.
APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown
More informationLAMPIRAN A : LISTING PROGRAM
LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
More informationLISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara
A-1 LISTING PROGRAM mainform.vb Imports System.IO Public Class mainform Private Sub mainform_load(byval sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load enkripsirb.checked = True
More informationTo enter the number in decimals Label 1 To show total. Text:...
Visual Basic tutorial - currency converter We will use visual studio to create a currency converter where we can convert a UK currency pound to other currencies. This is the interface for the application.
More informationLISTING PROGRAM. 1. Form Login. Private Sub BATAL_Click() End End Sub
LISTING PROGRAM 1. Form Login Private Sub BATAL_Click() End Sub Bersih() USERNAME.Text = "" PASSWORD.Text = "" Private Sub Form_Load() Bersih Private Sub OK_Click() Sql = "select*from tbl_login where username='"
More information'The following GUID is for the ID of the typelib if this project is exposed to COM <Assembly: Guid("8b a5-46bb-a6a9-87b4949d1f4c")>
LAMPIRAN A : LISTING PROGRAM Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes.
More informationHow to work with data sources and datasets
Chapter 14 How to work with data sources and datasets Objectives Applied Use a data source to get the data that an application requires. Use a DataGridView control to present the data that s retrieved
More information1 Dept: CE.NET Programming ( ) Prof. Akash N. Siddhpura. Working with Form: properties, methods and events
Working with Form: properties, methods and events To create a New Window Forms Application, Select File New Project. It will open one dialog box which is shown in Fig 2.1. Fig 2.1 The New Project dialog
More informationTo start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer
C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version
More information超音波モータ制御プログラムの作成 (v1.2.1)
超音波モータ制御プログラムの作成 (v1.2.1) 2008 年 11 月 28 日 Masaaki MATSUO 構成機器 モータ本体 : フコク ロータリーエンコーダー内蔵型超音波モータ USB-60E モータ制御部 : フコク 位置決制御ドライバ DCONT-3-60 (SD13) コントローラ : Interface 2 軸絶縁パルスモーションコントローラ ( 直線補間エンコーダ入力 5V)
More informationChapter 2 Exploration of a Visual Basic.Net Application
Chapter 2 Exploration of a Visual Basic.Net Application We will discuss in this chapter the structure of a typical Visual Basic.Net application and provide you with a simple project that describes the
More informationVISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS
VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS Intended Learning Objectives Able to build a simple Visual Basic Application. 2 The Sub Statement Private Sub ControlName_eventName(ByVal sender As System.Object,
More informationSoftware for Auto-Generating Electrode Block Order Sheet: Study Case in Mold Machining Workshop
Journal of Mechanical Engineering and Mechatronics Submitted : 2016-10-03 ISSN: 2527-6212, Vol. 1 No. 2, pp. 106-117 Accepted : 2016-10-07 2016 Pres Univ Press Publication, Indonesia Software for Auto-Generating
More informationUniversitas Sumatera Utara
LAMPIRAN Listing Program FormUtama.vb Public Class FormUtama Dim uchome As UcHome Dim ucconnection As UcConnection Dim ucbook As UcBook Dim ucanggota As UcAnggota Dim ucpeminjaman As UcPeminjaman Dim ucpengembalian
More informationC4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions
C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what
More informationif (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient;
More informationModule 8: Building a Windows Forms User Interface
Module 8: Building a Windows Forms User Interface Table of Contents Module Overview 8-1 Lesson 1: Managing Forms and Dialog Boxes 8-2 Lesson 2: Creating Menus and Toolbars 8-13 Lab: Implementing Menus
More informationMapWindow Plug-in Development
MapWindow Plug-in Development Sample Project: Simple Path Analyzer Plug-in A step-by-step guide to creating a custom MapWindow Plug-in using the IPlugin interface by Allen Anselmo shade@turbonet.com Introduction
More informationLearning VB.Net. Tutorial 17 Classes
Learning VB.Net Tutorial 17 Classes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If
More informationTutorial, Source code, Request Program Visual Basic
Tutorial, Source code, Request Program Visual Basic Oleh : Moh. A Azis Membuat Form Data Barang Program Persediaan Barang Form Data Barang digunakan untuk menyimpan data barang dan memberikan info mengenai
More informationVisitor Management System
WWW.VALLINME.COM Visitor Management System Ver 1.0 Mohd Noor Azam 18-03-2015 [Type the abstract of the document here. The abstract is typically a short summary of the contents of the document. Type the
More informationก Microsoft Visual Studio 2008
ก 58 ก ก ก ก ก 58 59 ก Microsoft Visual Studio 2008 1. DVD ก MSVS2008 ก MSVS2008 ก ก MSVS2008 ก ก 180 DVD DVD ก MSVS2008 ก ก Install Visual Studio 2008 2. ก ก ก ก ก Next 3. ก ก Options Page ก Custom ก
More informationADO.NET 2.0. database programming with
TRAINING & REFERENCE murach s ADO.NET 2.0 database programming with (Chapter 3) VB 2005 Thanks for downloading this chapter from Murach s ADO.NET 2.0 Database Programming with VB 2005. We hope it will
More informationI101/B100 Problem Solving with Computers
I101/B100 Problem Solving with Computers By: Dr. Hossein Hakimzadeh Computer Science and Informatics IU South Bend 1 What is Visual Basic.Net Visual Basic.Net is the latest reincarnation of Basic language.
More informationLearning VB.Net. Tutorial 16 Modules
Learning VB.Net Tutorial 16 Modules Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If
More informationLecture 10 OOP and VB.Net
Lecture 10 OOP and VB.Net Pillars of OOP Objects and Classes Encapsulation Inheritance Polymorphism Abstraction Classes A class is a template for an object. An object will have attributes and properties.
More informationPrivate Sub Cours_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Public Class Cours Private nc As Integer Private Sub Cours_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO : cette ligne de code charge les données dans la table
More informationโปรแกรมช วยทดสอบหม อแปลงกระแส
โปรแกรมช วยทดสอบหม อแปลงกระแส 1.เมน ของโปรแกรม ภาพท 1 หน าเมน ของโปรแกรม Public Class frmmain Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
More informationUnit 4. Lesson 4.1. Managing Data. Data types. Introduction. Data type. Visual Basic 2008 Data types
Managing Data Unit 4 Managing Data Introduction Lesson 4.1 Data types We come across many types of information and data in our daily life. For example, we need to handle data such as name, address, money,
More informationSoftware-Based Scientific Calculator Using Visual Basic.Net
Software-Based Scientific Calculator Using Visual Basic.Net Isizoh A. N. 1 Anazia A.E. 2 Dept. of Electronic and Computer Engineering, Dept. of Electrical Engineering, Nnamdi Azikiwe University, Awka,
More informationFinal Exam 7:00-10:00pm, April 14, 2008
Name:, (last) (first) Student Number: Section: Instructor: _P. Cribb_ L. Lowther_(circle) York University Faculty of Science and Engineering Department of Computer Science and Engineering Final Exam 7:00-10:00pm,
More informationcreate database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )
create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler
More informationProgramming with Visual Studio Higher (v. 2013)
Programming with Visual Studio Higher (v. 2013) Contents/Requirements Checklist Multiple selection: using ifs & case While Loops Using arrays Filling arrays Displaying array contents Types of variables:
More information...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb
...ic Programming\Mystery Escape\Mystery Escape\frmEscape.vb 1 1 Option Strict On 2 3 Public Class frmescape 4 5 ' Class variables. 6 7 Private _intonehour As Integer = 1 8 Private _inttwohour As Integer
More informationA Complete Tutorial for Beginners LIEW VOON KIONG
I A Complete Tutorial for Beginners LIEW VOON KIONG Disclaimer II Visual Basic 2008 Made Easy- A complete tutorial for beginners is an independent publication and is not affiliated with, nor has it been
More informationThis PDF was generated in real-time using DynamicPDF; Generator for.net.
TableReport.aspx 1 1 Imports System 2 Imports System.Data 3 Imports System.Data.SqlClient 4 5 Imports cete.dynamicpdf 6
More informationProgram Example 15 String Handling 2
Program Example 15 String Handling 2 Objectives Program Purpose Count the number of words, spaces and alphabetic characters in a sentence. Display the tally of letters Learning Goals To develop string
More informationUpgrading Applications
C0561587x.fm Page 77 Thursday, November 15, 2001 2:37 PM Part II Upgrading Applications 5 Your First Upgrade 79 6 Common Tasks in Visual Basic.NET 101 7 Upgrading Wizard Ins and Outs 117 8 Errors, Warnings,
More informationEnd Sub. Sub Kunci() Dim i As Integer For i = 0 To 4 Txtfield(i).Locked = True Next i grddatagrid.enabled = False End Sub
Source Aplikasi Sistem Informasi Akademik GENERAL Dim db As Connection Dim WithEvents adoprimaryrs1 As Recordset Dim WithEvents adoprimaryrs2 As Recordset Dim WithEvents rscaridata As Recordset Dim cekid
More informationISM 3253 Exam I Spring 2009
ISM 3253 Exam I Spring 2009 Directions: You have exactly 75 minutes to complete this test. Time available is part of the exam conditions and all work must cease when "Stop work" is announced. Failing to
More informationS.2 Computer Literacy Question-Answer Book
S.2 C.L. Half-yearly Examination (2012-13) 1 12-13 S.2 C.L. Question- Answer Book Hong Kong Taoist Association Tang Hin Memorial Secondary School 2012-2013 Half-yearly Examination S.2 Computer Literacy
More information