Public Class LATIHAN035_46109001 Dim dwitya As New OleDb.OleDbCommand Dim saadah As New ByIskandar.CariKeDataBaseByIskandar Dim wiwi As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TM46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109001.Click If KB46109001.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UN46109001.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HR46109001.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim tingting As DataRow tingting = wiwi.NewRow tingting("KODEBARANG") = Val(KB46109001.Text) tingting("UNIT") = Val(UN46109001.Text) tingting("HARGA") = Val(HR46109001.Text)
Private Sub LATIHAN035_46109001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ting As New OleDb.OleDbDataAdapter ting = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109001.Text & "'", conect) ting.Fill(wiwi) ting.Dispose()
DATA46109001.DataSource = wiwi
End Sub
Private Sub S46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109001.Click If NT46109001.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If JT46109001.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If wiwi.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
saadah.AturPencarianDataBase("mastertransaksi", "notrans", NT46109001.Text, 1, conect) If saadah.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In wiwi.Rows dwitya = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109001.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() dwitya.ExecuteNonQuery() conect.Close() Next dwitya.Dispose()
Dim wahda As New OleDb.OleDbCommand Dim niah As New ByIskandar.CariKeDataBaseByIskandar Dim ani As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=thepinkers29")
Private Sub TM_46109051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM_46109051.Click If KB_46109051.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(U_46109051.Text) = 0 Then MsgBox("Tolong di isi nah !!!") Exit Sub End If
If Val(H_46109051.Text) = 0 Then MsgBox("Tolong di isi nah !!!") Exit Sub End If Dim tingting As DataRow tingting = ani.NewRow tingting("KODEBARANG") = Val(KB_46109051.Text) tingting("UNIT") = Val(U_46109051.Text) tingting("HARGA") = Val(H_46109051.Text)
Private Sub SAVE_46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAVE_46109051.Click If NT_46109051.Text.Length = 0 Then MsgBox("isi Qi No TransaksiTa'...") Exit Sub End If
If JT_46109051.Text.Length = 0 Then MsgBox("isi Qi No TransaksiTa'...") Exit Sub End If
If ani.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
niah.AturPencarianDataBase("mastertransaksi", "notrans", NT_46109051.Text, 1, conect) If niah.JumlanBaris > 0 Then MsgBox("Adami no.trans seperti itu anu....") Exit Sub End If
For Each x As DataRow In ani.Rows wahda = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_46109051.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() wahda.ExecuteNonQuery() conect.Close() Next wahda.Dispose()
NT_46109051.Text = "" JT_46109051.Text = ""
ani.Rows.Clear() End Sub Private Sub LATIHAN35_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cantik As New OleDb.OleDbDataAdapter cantik = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_46109051.Text & "'", conect) cantik.Fill(ani) cantik.Dispose()
Public Class LATIHAN035_46109005 Dim fahrul As New OleDb.OleDbCommand Dim april As New ByIskandar.CariKeDataBaseByIskandar Dim arul As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=arul")
Private Sub TM46109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109005.Click If KB46109005.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UN46109005.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HR46109005.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim barru As DataRow barru = arul.NewRow barru("KODEBARANG") = Val(KB46109005.Text) barru("UNIT") = Val(UN46109005.Text) barru("HARGA") = Val(HR46109005.Text)
Private Sub LATIHAN035_46109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ngek As New OleDb.OleDbDataAdapter ngek = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109005.Text & "'", conect) ngek.Fill(arul) ngek.Dispose()
DATA46109005.DataSource = arul
End Sub
Private Sub S46109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109005.Click If NT46109005.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If JT46109005.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If arul.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
april.AturPencarianDataBase("mastertransaksi", "notrans", NT46109005.Text, 1, conect) If april.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In arul.Rows fahrul = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109005.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() fahrul.ExecuteNonQuery() conect.Close() Next fahrul.Dispose()
Public Class Form35 Dim FADILLAH As New OleDb.OleDbCommand Dim SAGENA As New ByIskandar.CariKeDataBaseByIskandar Dim DILA As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=240991")
Private Sub TAMBAH_059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH_059.Click If KODE_059.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UNIT_059.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HARGA_059.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim UDHE As DataRow UDHE = DILA.NewRow UDHE("KODEBARANG") = Val(KODE_059.Text) UDHE("UNIT") = Val(UNIT_059.Text) UDHE("HARGA") = Val(HARGA_059.Text)
Private Sub FORM35_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim DAUDE As New OleDb.OleDbDataAdapter DAUDE = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & DILA1_059.Text & "'", conect) DAUDE.Fill(DILA) DAUDE.Dispose()
DATA_059.DataSource = DILA
End Sub
Private Sub SIMPAN_059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN_059.Click If DILA1_059.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If DILA2_059.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If DILA.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
SAGENA.AturPencarianDataBase("mastertransaksi", "notrans", DILA1_059.Text, 1, conect) If SAGENA.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In DILA.Rows FADILLAH = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & DILA1_059.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() FADILLAH.ExecuteNonQuery() conect.Close() Next FADILLAH.Dispose()
DILA1_059.Text = "" DILA2_059.Text = ""
DILA.Rows.Clear() End Sub
Private Sub DILA1_059_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DILA1_059.TextChanged
Public Class LATIHAN035_46109017 Dim ayu As New OleDb.OleDbCommand Dim wandika As New ByIskandar.CariKeDataBaseByIskandar Dim putri As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=putri")
Private Sub TM46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109017.Click If KB46109017.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UN46109017.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HR46109017.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim utami As DataRow utami = putri.NewRow utami("KODEBARANG") = Val(KB46109017.Text) utami("UNIT") = Val(UN46109017.Text) utami("HARGA") = Val(HR46109017.Text)
Private Sub LATIHAN035_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim idung As New OleDb.OleDbDataAdapter idung = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109017.Text & "'", conect) idung.Fill(putri) idung.Dispose()
DATA46109017.DataSource = putri
End Sub
Private Sub S46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109017.Click If NT46109017.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If JT46109017.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If putri.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
wandika.AturPencarianDataBase("mastertransaksi", "notrans", NT46109017.Text, 1, conect) If wandika.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In putri.Rows ayu = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109017.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() ayu.ExecuteNonQuery() conect.Close() Next ayu.Dispose()
LATIHAN 35 Public Class LATIHAN035_46109030 Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATAMAJEMUK.accdb;Jet OLEDB:Database Password=ainun") Dim DT As New DataTable Dim telusur As New ByIskandar.CariKeDataBaseByIskandar Private Sub LATIHAN035_46109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ainun As New OleDb.OleDbDataAdapter ainun = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA FROM DETAILTRANSAKSI WHERE NOTRANS= '" & KB_46109030.Text & "'", CONECT) DT.Rows.Clear() ainun.Fill(DT) dg_46109030.DataSource = DT
ainun.Dispose() End Sub
Private Sub t_46109030_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t_46109030.Click If KB_46109030.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If Val(UN_46109030.Text) = 0 Then MsgBox("UNIT belum terisi") Exit Sub End If
KB_46109030.Text = "" UN_46109030.Text = "" HR_46109030.Text = "" End Sub
Private Sub s_46109030_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles s_46109030.Click If nt_46109030.Text.Length = 0 Then MsgBox("no.transaksi belum terisi") Exit Sub End If If jt_46109030.Text.Length = 0 Then MsgBox("jenis transaksi belum terisi") Exit Sub End If
If telusur.JumlanBaris > 0 Then MsgBox("NO.TRANS sudah ada") Exit Sub End If
If DT.Rows.Count = 0 Then MsgBox("data tidak tersedia") End If
Dim nun As New OleDb.OleDbCommand nun = New OleDb.OleDbCommand("insert into mastertransaksi (notrans, tanggaltransaksi, jenistransaksi) values ('" & nt_46109030.Text & "',#" & dtp_46109030.Value.Date & "#," & Val(jt_46109030.Text) & ")", CONECT) CONECT.Open() nun.ExecuteNonQuery() CONECT.Close()
For Each r As DataRow In DT.Rows
nun = New OleDb.OleDbCommand("insert into detailtransaksi (notrans, kodebarang, unit, harga ) values ('" & nt_46109030.Text & "','" & r("kodebarang") & "'," & r("unit") & "," & r("harga") & ")", CONECT)
Aryandira Latihan 35 Public Class Latihan35_034 Dim dt As New DataTable Dim cm As New OleDb.OleDbCommand Dim As New ByIskandar.CariKeDataBaseByIskandar Dim satu As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/datamajemuk.ACCDB")
Private Sub Latihan35_034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As New OleDb.OleDbDataAdapter a = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & aa_034.Text & "'", satu) a.Fill(dt) a.Dispose()
dgv.DataSource = dt End Sub
Private Sub gg_034_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gg_034.Click If dd_034.Text.Length = 0 Then MsgBox("Isi rong itu kode barang") Exit Sub End If
If Val(ee_034.Text) = 0 Then MsgBox("Isi rong itu unit") Exit Sub End If
If Val(ff_034.Text) = 0 Then MsgBox("Isi rong itu harga ") Exit Sub End If
Dim dr As DataRow dr = dt.NewRow dr("KODEBARANG") = dd_034.Text dr("UNIT") = ee_034.Text dr("HARGA") = ff_034.Text
dt.Rows.Add(dr)
dd_034.Text = "" ee_034.Text = "" ff_034.Text = "" End Sub
Private Sub hh_034_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hh_034.Click If aa_034.Text.Length = 0 Then MsgBox("isi rong No Transaksi") Exit Sub End If
If cc_034.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi") Exit Sub End If
If dt.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable") Exit Sub End If
Dira.AturPencarianDataBase("mastertransaksi", "notrans", aa_034.Text, 1, satu) If dira.JumlanBaris > 0 Then MsgBox("Ada notrans seperti itu") Exit Sub End If
For Each x As DataRow In dt.Rows cm = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & aa_034.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", satu) satu.Open() cm.ExecuteNonQuery() satu.Close() Next cm.Dispose()
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATAMAJEMUK.accdb;Jet OLEDB:Database Password=12345")
Dim DT As New DataTable Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub LATIHAN035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ASYH As New OleDb.OleDbDataAdapter ASYH = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA FROM DETAILTRANSAKSI WHERE NOTRANS= '" & NOKB_056.Text & "'", CONECT) 'memunculkan semua data dari tabel barang dlm acces DT.Rows.Clear() ASYH.Fill(DT) DG1_056.DataSource = DT
ASYH.Dispose()
End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH.Click
If NOKB_056.Text.Length = 0 Then MsgBox("kode barang belum terisi") Exit Sub End If
If Val(UN_056.Text) = 0 Then MsgBox("UNIT belum terisi") Exit Sub End If
If Val(HR_056.Text) = 0 Then MsgBox("HARGA belum terisi") Exit Sub End If
If cari.JumlanBaris > 0 Then MsgBox("NO.TRANS sudah ada") Exit Sub End If
If DT.Rows.Count = 0 Then MsgBox("data tidak tersedia") End If
Dim com As New OleDb.OleDbCommand com = New OleDb.OleDbCommand("insert into mastertransaksi (notrans, tanggaltransaksi, jenistransaksi) values ('" & NOKB_056.Text & "',#" & DG1_056.Text & "#," & Val(NOKB_056.Text) & ")", CONECT)
Public Class LATIHAN035_46109041 Dim joice As New OleDb.OleDbCommand Dim natalina As New ByIskandar.CariKeDataBaseByIskandar Dim paginta As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=paginta")
Private Sub TB_041_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TB_041.Click If KB_041.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UN_041.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(H_041.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim parinding As DataRow parinding = paginta.NewRow parinding("KODEBARANG") = Val(KB_041.Text) parinding("UNIT") = Val(UN_041.Text) parinding("HARGA") = Val(H_041.Text)
Private Sub LATIHAN035_46109041_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim seunggi As New OleDb.OleDbDataAdapter seunggi = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_041.Text & "'", conect) seunggi.Fill(paginta) seunggi.Dispose()
lee_041.DataSource = paginta
End Sub
Private Sub S_041_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S_041.Click If NT_041.Text.Length = 0 Then MsgBox("tolong diisi no transaksi") Exit Sub End If
If JT_041.Text.Length = 0 Then MsgBox("tolong diisi jenis transaksi") Exit Sub End If
If paginta.Rows.Count = 0 Then MsgBox("tolong diisi datatable") Exit Sub End If
natalina.AturPencarianDataBase("mastertransaksi", "notrans", NT_041.Text, 1, conect) If natalina.JumlanBaris > 0 Then MsgBox("sudah ada") Exit Sub End If
For Each x As DataRow In paginta.Rows joice = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_041.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() joice.ExecuteNonQuery() conect.Close() Next joice.Dispose()
Public Class LATIHAN_035_46109054 Dim DWI As New DataTable Dim MUSTIKA As New OleDb.OleDbCommand Dim CHAERUNNISA As New ByIskandar.CariKeDataBaseByIskandar Dim MULYADI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATAMAJEMUK.ACCDB;Jet OLEDB:Database Password=wiwi")
Private Sub LATIHAN_035_46109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim TING As New OleDb.OleDbDataAdapter TING = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & ww1_46109054.Text & "'", MULYADI) TING.Fill(DWI) TING.Dispose()
dgv_46109054.DataSource = DWI End Sub
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI1_46109054.Click If WW3_46109054.Text.Length = 0 Then MsgBox("ISI KODE BARANG_NYA DULU") Exit Sub End If
If Val(WW4_46109054.Text) = 0 Then MsgBox("Isi Unit_Nya dulu") Exit Sub End If
If Val(WW5_46109054.Text) = 0 Then MsgBox("Isi Harga_nya dulu") Exit Sub End If
Dim dr As DataRow dr = DWI.NewRow dr("KODEBARANG") = WW3_46109054.Text dr("UNIT") = WW4_46109054.Text dr("HARGA") = WW5_46109054.Text
DWI.Rows.Add(dr)
WW3_46109054.Text = "" WW4_46109054.Text = "" WW5_46109054.Text = "" End Sub
Private Sub DWI2_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI2_46109054.Click If ww1_46109054.Text.Length = 0 Then MsgBox("isi No Transaksi_Nya dulu") Exit Sub End If
If WW2_46109054.Text.Length = 0 Then MsgBox("Isi Jenis Transaksi_nya dulu") Exit Sub End If
If DWI.Rows.Count = 0 Then MsgBox("Maaf, Isi datatable_nya dulu") Exit Sub End If
CHAERUNNISA.AturPencarianDataBase("mastertransaksi", "notrans", ww1_46109054.Text, 1, MULYADI) If CHAERUNNISA.JumlanBaris > 0 Then MsgBox("notrans seperti itu sudah ada") Exit Sub End If
For Each x As DataRow In DWI.Rows MUSTIKA = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & ww1_46109054.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", MULYADI) MULYADI.Open() MUSTIKA.ExecuteNonQuery() MULYADI.Close() Next MUSTIKA.Dispose()
Public Class Form35 Dim ismi As New OleDb.OleDbCommand Dim sri As New ByIskandar.CariKeDataBaseByIskandar Dim cimi As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=cimi")
Private Sub tambah_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_46109023.Click If kode_46109023.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(unit_46109023.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(harga_46109023.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim cimi2 As DataRow cimi2 = cimi.NewRow cimi2("KODEBARANG") = Val(kode_46109023.Text) cimi2("UNIT") = Val(unit_46109023.Text) cimi2("HARGA") = Val(harga_46109023.Text)
Private Sub Form35_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cimi3 As New OleDb.OleDbDataAdapter cimi3 = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & notrans_46109023.Text & "'", conect) cimi3.Fill(cimi) cimi3.Dispose()
data_46109023.DataSource = cimi
End Sub
Private Sub simpan_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109023.Click If notrans_46109023.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If jenis_46109023.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If cimi.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
sri.AturPencarianDataBase("mastertransaksi", "notrans", notrans_46109023.Text, 1, conect) If sri.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In cimi.Rows ismi = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & notrans_46109023.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() ismi.ExecuteNonQuery() conect.Close() Next ismi.Dispose()
Public Class LATIHAN_035_46109054 Dim DWI As New DataTable Dim MUSTIKA As New OleDb.OleDbCommand Dim CHAERUNNISA As New ByIskandar.CariKeDataBaseByIskandar Dim MULYADI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATAMAJEMUK.ACCDB;Jet OLEDB:Database Password=wiwi")
Private Sub LATIHAN_035_46109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim TING As New OleDb.OleDbDataAdapter TING = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & ww1_46109054.Text & "'", MULYADI) TING.Fill(DWI) TING.Dispose()
dgv_46109054.DataSource = DWI End Sub
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI1_46109054.Click If WW3_46109054.Text.Length = 0 Then MsgBox("ISI KODE BARANG_NYA DULU") Exit Sub End If
If Val(WW4_46109054.Text) = 0 Then MsgBox("Isi Unit_Nya dulu") Exit Sub End If
If Val(WW5_46109054.Text) = 0 Then MsgBox("Isi Harga_nya dulu") Exit Sub End If
Dim dr As DataRow dr = DWI.NewRow dr("KODEBARANG") = WW3_46109054.Text dr("UNIT") = WW4_46109054.Text dr("HARGA") = WW5_46109054.Text
DWI.Rows.Add(dr)
WW3_46109054.Text = "" WW4_46109054.Text = "" WW5_46109054.Text = "" End Sub
Private Sub DWI2_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI2_46109054.Click If ww1_46109054.Text.Length = 0 Then MsgBox("isi No Transaksi_Nya dulu") Exit Sub End If
If WW2_46109054.Text.Length = 0 Then MsgBox("Isi Jenis Transaksi_nya dulu") Exit Sub End If
If DWI.Rows.Count = 0 Then MsgBox("Maaf, Isi datatable_nya dulu") Exit Sub End If
CHAERUNNISA.AturPencarianDataBase("mastertransaksi", "notrans", ww1_46109054.Text, 1, MULYADI) If CHAERUNNISA.JumlanBaris > 0 Then MsgBox("notrans seperti itu sudah ada") Exit Sub End If
For Each x As DataRow In DWI.Rows MUSTIKA = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & ww1_46109054.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", MULYADI) MULYADI.Open() MUSTIKA.ExecuteNonQuery() MULYADI.Close() Next MUSTIKA.Dispose()
Public Class LATIHAN035_46109027 Dim febiana As New OleDb.OleDbCommand Dim fransiskus As New ByIskandar.CariKeDataBaseByIskandar Dim feby As New DataTable Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TM_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM_46109027.Click If KB_46109027.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UN_46109027.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HR_46109027.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim tingting As DataRow tingting = feby.NewRow tingting("KODEBARANG") = Val(KB_46109027.Text) tingting("UNIT") = Val(UN_46109027.Text) tingting("HARGA") = Val(HR_46109027.Text)
Private Sub LATIHAN035_46109027_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ting As New OleDb.OleDbDataAdapter ting = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_46109027.Text & "'", conect) ting.Fill(feby) ting.Dispose()
D_46109027.DataSource = feby
End Sub
Private Sub S46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S_46109027.Click If NT_46109027.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If JT_46109027.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If feby.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
fransiskus.AturPencarianDataBase("mastertransaksi", "notrans", NT_46109027.Text, 1, conect) If fransiskus.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In feby.Rows febiana = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_46109027.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect) conect.Open() febiana.ExecuteNonQuery() conect.Close() Next febiana.Dispose()
Public Class LATIHAN_035_46109053 Dim INDAH As New OleDb.OleDbCommand Dim YANI As New ByIskandar.CariKeDataBaseByIskandar Dim DT As New DataTable Dim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\daTAMBAHajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TAMBAH_053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH_053.Click If KB_053.Text.Length = 0 Then MsgBox("Kode tsb sudah ada") Exit Sub End If
If Val(UNIT_053.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If
If Val(HRG_053.Text) = 0 Then MsgBox("Tolong di isi") Exit Sub End If Dim SAE As DataRow SAE = DT.NewRow SAE("KODEBARANG") = Val(KB_053.Text) SAE("UNIT") = Val(UNIT_053.Text) SAE("HARGA") = Val(HRG_053.Text)
Private Sub LATIHAN035_053_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ENONG As New OleDb.OleDbDataAdapter ENONG = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_053.Text & "'", koneksi) ENONG.Fill(DT) ENONG.Dispose()
DATA_053.DataSource = DT
End Sub
Private Sub SIMPAN_053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN_053.Click If NT_053.Text.Length = 0 Then MsgBox("isi rong No Transaksi na..") Exit Sub End If
If JT_053.Text.Length = 0 Then MsgBox("Isi rong Jenis Transaksi na..") Exit Sub End If
If DT.Rows.Count = 0 Then MsgBox("Maaf...Isi rong itu datatable na..") Exit Sub End If
YANI.AturPencarianDataBase("mastertransaksi", "notrans", NT_053.Text, 1, koneksi) If YANI.JumlanBaris > 0 Then MsgBox("Adami notrans seperti itu") Exit Sub End If
For Each x As DataRow In DT.Rows INDAH = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_053.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", koneksi) koneksi.Open() INDAH.ExecuteNonQuery() koneksi.Close() Next INDAH.Dispose()
Public Class LATIHAN035_46109001
BalasHapusDim dwitya As New OleDb.OleDbCommand
Dim saadah As New ByIskandar.CariKeDataBaseByIskandar
Dim wiwi As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TM46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109001.Click
If KB46109001.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UN46109001.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HR46109001.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim tingting As DataRow
tingting = wiwi.NewRow
tingting("KODEBARANG") = Val(KB46109001.Text)
tingting("UNIT") = Val(UN46109001.Text)
tingting("HARGA") = Val(HR46109001.Text)
wiwi.Rows.Add(tingting)
KB46109001.Text = ""
UN46109001.Text = ""
HR46109001.Text = ""
End Sub
Private Sub LATIHAN035_46109001_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ting As New OleDb.OleDbDataAdapter
ting = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109001.Text & "'", conect)
ting.Fill(wiwi)
ting.Dispose()
DATA46109001.DataSource = wiwi
End Sub
Private Sub S46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109001.Click
If NT46109001.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If JT46109001.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If wiwi.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
saadah.AturPencarianDataBase("mastertransaksi", "notrans", NT46109001.Text, 1, conect)
If saadah.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
dwitya = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT46109001.Text & "',#" & T46109001.Value.Month & "/" & T46109001.Value.Day & "/" & T46109001.Value.Year & "#,'" & JT46109001.Text & "')", conect)
conect.Open()
dwitya.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In wiwi.Rows
dwitya = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109001.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
dwitya.ExecuteNonQuery()
conect.Close()
Next
dwitya.Dispose()
NT46109001.Text = ""
JT46109001.Text = ""
wiwi.Rows.Clear()
End Sub
End Class
Public Class LATIHAN35_46109051
BalasHapusDim wahda As New OleDb.OleDbCommand
Dim niah As New ByIskandar.CariKeDataBaseByIskandar
Dim ani As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=thepinkers29")
Private Sub TM_46109051_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM_46109051.Click
If KB_46109051.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(U_46109051.Text) = 0 Then
MsgBox("Tolong di isi nah !!!")
Exit Sub
End If
If Val(H_46109051.Text) = 0 Then
MsgBox("Tolong di isi nah !!!")
Exit Sub
End If
Dim tingting As DataRow
tingting = ani.NewRow
tingting("KODEBARANG") = Val(KB_46109051.Text)
tingting("UNIT") = Val(U_46109051.Text)
tingting("HARGA") = Val(H_46109051.Text)
ani.Rows.Add(tingting)
KB_46109051.Text = ""
U_46109051.Text = ""
H_46109051.Text = ""
End Sub
Private Sub SAVE_46109001_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SAVE_46109051.Click
If NT_46109051.Text.Length = 0 Then
MsgBox("isi Qi No TransaksiTa'...")
Exit Sub
End If
If JT_46109051.Text.Length = 0 Then
MsgBox("isi Qi No TransaksiTa'...")
Exit Sub
End If
If ani.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
niah.AturPencarianDataBase("mastertransaksi", "notrans", NT_46109051.Text, 1, conect)
If niah.JumlanBaris > 0 Then
MsgBox("Adami no.trans seperti itu anu....")
Exit Sub
End If
wahda = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT_46109051.Text & "',#" & DT_46109051.Value.Month & "/" & DT_46109051.Value.Day & "/" & DT_46109051.Value.Year & "#,'" & JT_46109051.Text & "')", conect)
conect.Open()
wahda.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In ani.Rows
wahda = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_46109051.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
wahda.ExecuteNonQuery()
conect.Close()
Next
wahda.Dispose()
NT_46109051.Text = ""
JT_46109051.Text = ""
ani.Rows.Clear()
End Sub
Private Sub LATIHAN35_46109051_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cantik As New OleDb.OleDbDataAdapter
cantik = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_46109051.Text & "'", conect)
cantik.Fill(ani)
cantik.Dispose()
DG_46109051.DataSource = ani
End Sub
End Class
Public Class LATIHAN035_46109005
BalasHapusDim fahrul As New OleDb.OleDbCommand
Dim april As New ByIskandar.CariKeDataBaseByIskandar
Dim arul As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=arul")
Private Sub TM46109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109005.Click
If KB46109005.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UN46109005.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HR46109005.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim barru As DataRow
barru = arul.NewRow
barru("KODEBARANG") = Val(KB46109005.Text)
barru("UNIT") = Val(UN46109005.Text)
barru("HARGA") = Val(HR46109005.Text)
arul.Rows.Add(barru)
KB46109005.Text = ""
UN46109005.Text = ""
HR46109005.Text = ""
End Sub
Private Sub LATIHAN035_46109005_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ngek As New OleDb.OleDbDataAdapter
ngek = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109005.Text & "'", conect)
ngek.Fill(arul)
ngek.Dispose()
DATA46109005.DataSource = arul
End Sub
Private Sub S46109005_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109005.Click
If NT46109005.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If JT46109005.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If arul.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
april.AturPencarianDataBase("mastertransaksi", "notrans", NT46109005.Text, 1, conect)
If april.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
fahrul = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT46109005.Text & "',#" & T46109005.Value.Month & "/" & T46109005.Value.Day & "/" & T46109005.Value.Year & "#,'" & JT46109005.Text & "')", conect)
conect.Open()
fahrul.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In arul.Rows
fahrul = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109005.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
fahrul.ExecuteNonQuery()
conect.Close()
Next
fahrul.Dispose()
NT46109005.Text = ""
JT46109005.Text = ""
arul.Rows.Clear()
End Sub
End Class
Public Class Form35
BalasHapusDim FADILLAH As New OleDb.OleDbCommand
Dim SAGENA As New ByIskandar.CariKeDataBaseByIskandar
Dim DILA As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=240991")
Private Sub TAMBAH_059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH_059.Click
If KODE_059.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UNIT_059.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HARGA_059.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim UDHE As DataRow
UDHE = DILA.NewRow
UDHE("KODEBARANG") = Val(KODE_059.Text)
UDHE("UNIT") = Val(UNIT_059.Text)
UDHE("HARGA") = Val(HARGA_059.Text)
DILA.Rows.Add(UDHE)
KODE_059.Text = ""
UNIT_059.Text = ""
HARGA_059.Text = ""
End Sub
Private Sub FORM35_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DAUDE As New OleDb.OleDbDataAdapter
DAUDE = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & DILA1_059.Text & "'", conect)
DAUDE.Fill(DILA)
DAUDE.Dispose()
DATA_059.DataSource = DILA
End Sub
Private Sub SIMPAN_059_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN_059.Click
If DILA1_059.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If DILA2_059.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If DILA.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
SAGENA.AturPencarianDataBase("mastertransaksi", "notrans", DILA1_059.Text, 1, conect)
If SAGENA.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
FADILLAH = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & DILA1_059.Text & "',#" & TGL_059.Value.Month & "/" & TGL_059.Value.Day & "/" & TGL_059.Value.Year & "#,'" & DILA2_059.Text & "')", conect)
conect.Open()
FADILLAH.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In DILA.Rows
FADILLAH = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & DILA1_059.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
FADILLAH.ExecuteNonQuery()
conect.Close()
Next
FADILLAH.Dispose()
DILA1_059.Text = ""
DILA2_059.Text = ""
DILA.Rows.Clear()
End Sub
Private Sub DILA1_059_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DILA1_059.TextChanged
End Sub
End Class
Public Class LATIHAN035_46109017
BalasHapusDim ayu As New OleDb.OleDbCommand
Dim wandika As New ByIskandar.CariKeDataBaseByIskandar
Dim putri As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=putri")
Private Sub TM46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM46109017.Click
If KB46109017.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UN46109017.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HR46109017.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim utami As DataRow
utami = putri.NewRow
utami("KODEBARANG") = Val(KB46109017.Text)
utami("UNIT") = Val(UN46109017.Text)
utami("HARGA") = Val(HR46109017.Text)
putri.Rows.Add(utami)
KB46109017.Text = ""
UN46109017.Text = ""
HR46109017.Text = ""
End Sub
Private Sub LATIHAN035_46109017_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim idung As New OleDb.OleDbDataAdapter
idung = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT46109017.Text & "'", conect)
idung.Fill(putri)
idung.Dispose()
DATA46109017.DataSource = putri
End Sub
Private Sub S46109017_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S46109017.Click
If NT46109017.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If JT46109017.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If putri.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
wandika.AturPencarianDataBase("mastertransaksi", "notrans", NT46109017.Text, 1, conect)
If wandika.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
ayu = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT46109017.Text & "',#" & T46109017.Value.Month & "/" & T46109017.Value.Day & "/" & T46109017.Value.Year & "#,'" & JT46109017.Text & "')", conect)
conect.Open()
ayu.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In putri.Rows
ayu = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT46109017.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
ayu.ExecuteNonQuery()
conect.Close()
Next
ayu.Dispose()
NT46109017.Text = ""
JT46109017.Text = ""
putri.Rows.Clear()
End Sub
End Class
LATIHAN 35
BalasHapusPublic Class LATIHAN035_46109030
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATAMAJEMUK.accdb;Jet OLEDB:Database Password=ainun")
Dim DT As New DataTable
Dim telusur As New ByIskandar.CariKeDataBaseByIskandar
Private Sub LATIHAN035_46109030_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ainun As New OleDb.OleDbDataAdapter
ainun = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA FROM DETAILTRANSAKSI WHERE NOTRANS= '" & KB_46109030.Text & "'", CONECT)
DT.Rows.Clear()
ainun.Fill(DT)
dg_46109030.DataSource = DT
ainun.Dispose()
End Sub
Private Sub t_46109030_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t_46109030.Click
If KB_46109030.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If Val(UN_46109030.Text) = 0 Then
MsgBox("UNIT belum terisi")
Exit Sub
End If
Dim nunun As DataRow
nunun = DT.NewRow
nunun("KODEBARANG") = KB_46109030.Text
nunun("UNIT") = UN_46109030.Text
nunun("HARGA") = HR_46109030.Text
DT.Rows.Add(nunun)
KB_46109030.Text = ""
UN_46109030.Text = ""
HR_46109030.Text = ""
End Sub
Private Sub s_46109030_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles s_46109030.Click
If nt_46109030.Text.Length = 0 Then
MsgBox("no.transaksi belum terisi")
Exit Sub
End If
If jt_46109030.Text.Length = 0 Then
MsgBox("jenis transaksi belum terisi")
Exit Sub
End If
telusur.AturPencarianDataBase("mastertransaksi", "notrans", nt_46109030.Text, 1, CONECT)
If telusur.JumlanBaris > 0 Then
MsgBox("NO.TRANS sudah ada")
Exit Sub
End If
If DT.Rows.Count = 0 Then
MsgBox("data tidak tersedia")
End If
Dim nun As New OleDb.OleDbCommand
nun = New OleDb.OleDbCommand("insert into mastertransaksi (notrans, tanggaltransaksi, jenistransaksi) values ('" & nt_46109030.Text & "',#" & dtp_46109030.Value.Date & "#," & Val(jt_46109030.Text) & ")", CONECT)
CONECT.Open()
nun.ExecuteNonQuery()
CONECT.Close()
For Each r As DataRow In DT.Rows
nun = New OleDb.OleDbCommand("insert into detailtransaksi (notrans, kodebarang, unit, harga ) values ('" & nt_46109030.Text & "','" & r("kodebarang") & "'," & r("unit") & "," & r("harga") & ")", CONECT)
CONECT.Open()
nun.ExecuteNonQuery()
CONECT.Close()
nun.Dispose()
Next
DT.Rows.Clear()
nt_46109030.Text = ""
jt_46109030.Text = ""
End Sub
End Class
Aryandira
BalasHapusLatihan 35
Public Class Latihan35_034
Dim dt As New DataTable
Dim cm As New OleDb.OleDbCommand
Dim As New ByIskandar.CariKeDataBaseByIskandar
Dim satu As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/datamajemuk.ACCDB")
Private Sub Latihan35_034_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New OleDb.OleDbDataAdapter
a = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & aa_034.Text & "'", satu)
a.Fill(dt)
a.Dispose()
dgv.DataSource = dt
End Sub
Private Sub gg_034_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gg_034.Click
If dd_034.Text.Length = 0 Then
MsgBox("Isi rong itu kode barang")
Exit Sub
End If
If Val(ee_034.Text) = 0 Then
MsgBox("Isi rong itu unit")
Exit Sub
End If
If Val(ff_034.Text) = 0 Then
MsgBox("Isi rong itu harga ")
Exit Sub
End If
Dim dr As DataRow
dr = dt.NewRow
dr("KODEBARANG") = dd_034.Text
dr("UNIT") = ee_034.Text
dr("HARGA") = ff_034.Text
dt.Rows.Add(dr)
dd_034.Text = ""
ee_034.Text = ""
ff_034.Text = ""
End Sub
Private Sub hh_034_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hh_034.Click
If aa_034.Text.Length = 0 Then
MsgBox("isi rong No Transaksi")
Exit Sub
End If
If cc_034.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi")
Exit Sub
End If
If dt.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable")
Exit Sub
End If
Dira.AturPencarianDataBase("mastertransaksi", "notrans", aa_034.Text, 1, satu)
If dira.JumlanBaris > 0 Then
MsgBox("Ada notrans seperti itu")
Exit Sub
End If
cm = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & aa_034.Text & "',#" & bb_034.Value.Month & "/" & bb_034.Value.Day & "/" & bb_034.Value.Year & "#,'" & cc_034.Text & "')", satu)
satu.Open()
cm.ExecuteNonQuery()
satu.Close()
For Each x As DataRow In dt.Rows
cm = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & aa_034.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", satu)
satu.Open()
cm.ExecuteNonQuery()
satu.Close()
Next
cm.Dispose()
aa_034.Text = ""
cc_034.Text = ""
dt.Rows.Clear()
End Sub
End Class
Public Class LATIHAN035_46109056
BalasHapusDim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\DATAMAJEMUK.accdb;Jet OLEDB:Database Password=12345")
Dim DT As New DataTable
Dim cari As New ByIskandar.CariKeDataBaseByIskandar
Private Sub LATIHAN035_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ASYH As New OleDb.OleDbDataAdapter
ASYH = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA FROM DETAILTRANSAKSI WHERE NOTRANS= '" & NOKB_056.Text & "'", CONECT) 'memunculkan semua data dari tabel barang dlm acces
DT.Rows.Clear()
ASYH.Fill(DT)
DG1_056.DataSource = DT
ASYH.Dispose()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH.Click
If NOKB_056.Text.Length = 0 Then
MsgBox("kode barang belum terisi")
Exit Sub
End If
If Val(UN_056.Text) = 0 Then
MsgBox("UNIT belum terisi")
Exit Sub
End If
If Val(HR_056.Text) = 0 Then
MsgBox("HARGA belum terisi")
Exit Sub
End If
Dim muhASYH As DataRow
muhASYH = DT.NewRow
muhASYH("KODEBARANG") = NOKB_056.Text
muhASYH("UNIT") = UN_056.Text
muhASYH("HARGA") = HR_056.Text
DT.Rows.Add(muhASYH)
NOKB_056.Text = ""
UN_056.Text = ""
HR_056.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN.Click
If NOKB_056.Text.Length = 0 Then
MsgBox("no.transaksi belum terisi")
Exit Sub
End If
If NOKB_056.Text.Length = 0 Then
MsgBox("jenis transaksi belum terisi")
Exit Sub
End If
cari.AturPencarianDataBase("mastertransaksi", "notrans", NOKB_056.Text, 1, CONECT)
If cari.JumlanBaris > 0 Then
MsgBox("NO.TRANS sudah ada")
Exit Sub
End If
If DT.Rows.Count = 0 Then
MsgBox("data tidak tersedia")
End If
Dim com As New OleDb.OleDbCommand
com = New OleDb.OleDbCommand("insert into mastertransaksi (notrans, tanggaltransaksi, jenistransaksi) values ('" & NOKB_056.Text & "',#" & DG1_056.Text & "#," & Val(NOKB_056.Text) & ")", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
For Each r As DataRow In DT.Rows
com = New OleDb.OleDbCommand("insert into detailtransaksi (notrans, kodebarang, unit, harga ) values ('" & NOKB_056.Text & "','" & r("kodebarang") & "'," & r("unit") & "," & r("harga") & ")", CONECT)
CONECT.Open()
com.ExecuteNonQuery()
CONECT.Close()
com.Dispose()
Next
DT.Rows.Clear()
NOKB_056.Text = ""
NOKB_056.Text = ""
End Sub
End Class
Public Class LATIHAN035_46109041
BalasHapusDim joice As New OleDb.OleDbCommand
Dim natalina As New ByIskandar.CariKeDataBaseByIskandar
Dim paginta As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=paginta")
Private Sub TB_041_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TB_041.Click
If KB_041.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UN_041.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(H_041.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim parinding As DataRow
parinding = paginta.NewRow
parinding("KODEBARANG") = Val(KB_041.Text)
parinding("UNIT") = Val(UN_041.Text)
parinding("HARGA") = Val(H_041.Text)
paginta.Rows.Add(parinding)
KB_041.Text = ""
UN_041.Text = ""
H_041.Text = ""
End Sub
Private Sub LATIHAN035_46109041_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim seunggi As New OleDb.OleDbDataAdapter
seunggi = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_041.Text & "'", conect)
seunggi.Fill(paginta)
seunggi.Dispose()
lee_041.DataSource = paginta
End Sub
Private Sub S_041_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S_041.Click
If NT_041.Text.Length = 0 Then
MsgBox("tolong diisi no transaksi")
Exit Sub
End If
If JT_041.Text.Length = 0 Then
MsgBox("tolong diisi jenis transaksi")
Exit Sub
End If
If paginta.Rows.Count = 0 Then
MsgBox("tolong diisi datatable")
Exit Sub
End If
natalina.AturPencarianDataBase("mastertransaksi", "notrans", NT_041.Text, 1, conect)
If natalina.JumlanBaris > 0 Then
MsgBox("sudah ada")
Exit Sub
End If
joice = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT_041.Text & "',#" & T_041.Value.Month & "/" & T_041.Value.Day & "/" & T_041.Value.Year & "#,'" & JT_041.Text & "')", conect)
conect.Open()
joice.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In paginta.Rows
joice = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_041.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
joice.ExecuteNonQuery()
conect.Close()
Next
joice.Dispose()
NT_041.Text = ""
JT_041.Text = ""
paginta.Rows.Clear()
End Sub
End Class
Public Class LATIHAN_035_46109054
BalasHapusDim DWI As New DataTable
Dim MUSTIKA As New OleDb.OleDbCommand
Dim CHAERUNNISA As New ByIskandar.CariKeDataBaseByIskandar
Dim MULYADI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATAMAJEMUK.ACCDB;Jet OLEDB:Database Password=wiwi")
Private Sub LATIHAN_035_46109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TING As New OleDb.OleDbDataAdapter
TING = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & ww1_46109054.Text & "'", MULYADI)
TING.Fill(DWI)
TING.Dispose()
dgv_46109054.DataSource = DWI
End Sub
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI1_46109054.Click
If WW3_46109054.Text.Length = 0 Then
MsgBox("ISI KODE BARANG_NYA DULU")
Exit Sub
End If
If Val(WW4_46109054.Text) = 0 Then
MsgBox("Isi Unit_Nya dulu")
Exit Sub
End If
If Val(WW5_46109054.Text) = 0 Then
MsgBox("Isi Harga_nya dulu")
Exit Sub
End If
Dim dr As DataRow
dr = DWI.NewRow
dr("KODEBARANG") = WW3_46109054.Text
dr("UNIT") = WW4_46109054.Text
dr("HARGA") = WW5_46109054.Text
DWI.Rows.Add(dr)
WW3_46109054.Text = ""
WW4_46109054.Text = ""
WW5_46109054.Text = ""
End Sub
Private Sub DWI2_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI2_46109054.Click
If ww1_46109054.Text.Length = 0 Then
MsgBox("isi No Transaksi_Nya dulu")
Exit Sub
End If
If WW2_46109054.Text.Length = 0 Then
MsgBox("Isi Jenis Transaksi_nya dulu")
Exit Sub
End If
If DWI.Rows.Count = 0 Then
MsgBox("Maaf, Isi datatable_nya dulu")
Exit Sub
End If
CHAERUNNISA.AturPencarianDataBase("mastertransaksi", "notrans", ww1_46109054.Text, 1, MULYADI)
If CHAERUNNISA.JumlanBaris > 0 Then
MsgBox("notrans seperti itu sudah ada")
Exit Sub
End If
MUSTIKA = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & ww1_46109054.Text & "',#" & DTP_46109054.Value.Month & "/" & DTP_46109054.Value.Day & "/" & DTP_46109054.Value.Year & "#,'" & WW2_46109054.Text & "')", MULYADI)
MULYADI.Open()
MUSTIKA.ExecuteNonQuery()
MULYADI.Close()
For Each x As DataRow In DWI.Rows
MUSTIKA = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & ww1_46109054.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", MULYADI)
MULYADI.Open()
MUSTIKA.ExecuteNonQuery()
MULYADI.Close()
Next
MUSTIKA.Dispose()
ww1_46109054.Text = ""
WW2_46109054.Text = ""
DWI.Rows.Clear()
End Sub
End Class
Public Class Form35
BalasHapusDim ismi As New OleDb.OleDbCommand
Dim sri As New ByIskandar.CariKeDataBaseByIskandar
Dim cimi As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=cimi")
Private Sub tambah_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah_46109023.Click
If kode_46109023.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(unit_46109023.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(harga_46109023.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim cimi2 As DataRow
cimi2 = cimi.NewRow
cimi2("KODEBARANG") = Val(kode_46109023.Text)
cimi2("UNIT") = Val(unit_46109023.Text)
cimi2("HARGA") = Val(harga_46109023.Text)
cimi.Rows.Add(cimi2)
kode_46109023.Text = ""
unit_46109023.Text = ""
harga_46109023.Text = ""
End Sub
Private Sub Form35_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cimi3 As New OleDb.OleDbDataAdapter
cimi3 = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & notrans_46109023.Text & "'", conect)
cimi3.Fill(cimi)
cimi3.Dispose()
data_46109023.DataSource = cimi
End Sub
Private Sub simpan_46109023_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan_46109023.Click
If notrans_46109023.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If jenis_46109023.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If cimi.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
sri.AturPencarianDataBase("mastertransaksi", "notrans", notrans_46109023.Text, 1, conect)
If sri.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
ismi = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & notrans_46109023.Text & "',#" & tgl_46109023.Value.Month & "/" & tgl_46109023.Value.Day & "/" & tgl_46109023.Value.Year & "#,'" & jenis_46109023.Text & "')", conect)
conect.Open()
ismi.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In cimi.Rows
ismi = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & notrans_46109023.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
ismi.ExecuteNonQuery()
conect.Close()
Next
ismi.Dispose()
notrans_46109023.Text = ""
jenis_46109023.Text = ""
cimi.Rows.Clear()
End Sub
End Class
Public Class LATIHAN_035_46109054
BalasHapusDim DWI As New DataTable
Dim MUSTIKA As New OleDb.OleDbCommand
Dim CHAERUNNISA As New ByIskandar.CariKeDataBaseByIskandar
Dim MULYADI As New OleDb.OleDbConnection("PROVIDER = MICROSOFT.ACE.OLEDB.12.0; DATA SOURCE =" & Application.StartupPath & "/DATAMAJEMUK.ACCDB;Jet OLEDB:Database Password=wiwi")
Private Sub LATIHAN_035_46109054_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim TING As New OleDb.OleDbDataAdapter
TING = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & ww1_46109054.Text & "'", MULYADI)
TING.Fill(DWI)
TING.Dispose()
dgv_46109054.DataSource = DWI
End Sub
Private Sub Dwi1_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI1_46109054.Click
If WW3_46109054.Text.Length = 0 Then
MsgBox("ISI KODE BARANG_NYA DULU")
Exit Sub
End If
If Val(WW4_46109054.Text) = 0 Then
MsgBox("Isi Unit_Nya dulu")
Exit Sub
End If
If Val(WW5_46109054.Text) = 0 Then
MsgBox("Isi Harga_nya dulu")
Exit Sub
End If
Dim dr As DataRow
dr = DWI.NewRow
dr("KODEBARANG") = WW3_46109054.Text
dr("UNIT") = WW4_46109054.Text
dr("HARGA") = WW5_46109054.Text
DWI.Rows.Add(dr)
WW3_46109054.Text = ""
WW4_46109054.Text = ""
WW5_46109054.Text = ""
End Sub
Private Sub DWI2_46109054_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DWI2_46109054.Click
If ww1_46109054.Text.Length = 0 Then
MsgBox("isi No Transaksi_Nya dulu")
Exit Sub
End If
If WW2_46109054.Text.Length = 0 Then
MsgBox("Isi Jenis Transaksi_nya dulu")
Exit Sub
End If
If DWI.Rows.Count = 0 Then
MsgBox("Maaf, Isi datatable_nya dulu")
Exit Sub
End If
CHAERUNNISA.AturPencarianDataBase("mastertransaksi", "notrans", ww1_46109054.Text, 1, MULYADI)
If CHAERUNNISA.JumlanBaris > 0 Then
MsgBox("notrans seperti itu sudah ada")
Exit Sub
End If
MUSTIKA = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & ww1_46109054.Text & "',#" & DTP_46109054.Value.Month & "/" & DTP_46109054.Value.Day & "/" & DTP_46109054.Value.Year & "#,'" & WW2_46109054.Text & "')", MULYADI)
MULYADI.Open()
MUSTIKA.ExecuteNonQuery()
MULYADI.Close()
For Each x As DataRow In DWI.Rows
MUSTIKA = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & ww1_46109054.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", MULYADI)
MULYADI.Open()
MUSTIKA.ExecuteNonQuery()
MULYADI.Close()
Next
MUSTIKA.Dispose()
ww1_46109054.Text = ""
WW2_46109054.Text = ""
DWI.Rows.Clear()
End Sub
End Class
Public Class LATIHAN035_46109027
BalasHapusDim febiana As New OleDb.OleDbCommand
Dim fransiskus As New ByIskandar.CariKeDataBaseByIskandar
Dim feby As New DataTable
Dim conect As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\datamajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TM_46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TM_46109027.Click
If KB_46109027.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UN_46109027.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HR_46109027.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim tingting As DataRow
tingting = feby.NewRow
tingting("KODEBARANG") = Val(KB_46109027.Text)
tingting("UNIT") = Val(UN_46109027.Text)
tingting("HARGA") = Val(HR_46109027.Text)
feby.Rows.Add(tingting)
KB_46109027.Text = ""
UN_46109027.Text = ""
HR_46109027.Text = ""
End Sub
Private Sub LATIHAN035_46109027_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ting As New OleDb.OleDbDataAdapter
ting = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_46109027.Text & "'", conect)
ting.Fill(feby)
ting.Dispose()
D_46109027.DataSource = feby
End Sub
Private Sub S46109027_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S_46109027.Click
If NT_46109027.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If JT_46109027.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If feby.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
fransiskus.AturPencarianDataBase("mastertransaksi", "notrans", NT_46109027.Text, 1, conect)
If fransiskus.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
febiana = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT_46109027.Text & "',#" & T_46109027.Value.Month & "/" & T_46109027.Value.Day & "/" & T_46109027.Value.Year & "#,'" & JT_46109027.Text & "')", conect)
conect.Open()
febiana.ExecuteNonQuery()
conect.Close()
For Each x As DataRow In feby.Rows
febiana = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_46109027.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", conect)
conect.Open()
febiana.ExecuteNonQuery()
conect.Close()
Next
febiana.Dispose()
NT_46109027.Text = ""
JT_46109027.Text = ""
feby.Rows.Clear()
End Sub
End Class
Public Class LATIHAN_035_46109053
BalasHapusDim INDAH As New OleDb.OleDbCommand
Dim YANI As New ByIskandar.CariKeDataBaseByIskandar
Dim DT As New DataTable
Dim koneksi As New OleDb.OleDbConnection("provider = microsoft.ace.oledb.12.0;data source=" & Application.StartupPath & "\daTAMBAHajemuk.accdb;Jet OLEDB:Database Password=ngekngek")
Private Sub TAMBAH_053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TAMBAH_053.Click
If KB_053.Text.Length = 0 Then
MsgBox("Kode tsb sudah ada")
Exit Sub
End If
If Val(UNIT_053.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
If Val(HRG_053.Text) = 0 Then
MsgBox("Tolong di isi")
Exit Sub
End If
Dim SAE As DataRow
SAE = DT.NewRow
SAE("KODEBARANG") = Val(KB_053.Text)
SAE("UNIT") = Val(UNIT_053.Text)
SAE("HARGA") = Val(HRG_053.Text)
DT.Rows.Add(SAE)
KB_053.Text = ""
UNIT_053.Text = ""
HRG_053.Text = ""
End Sub
Private Sub LATIHAN035_053_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim ENONG As New OleDb.OleDbDataAdapter
ENONG = New OleDb.OleDbDataAdapter("select KODEBARANG, UNIT, HARGA from detailtransaksi where notrans = '" & NT_053.Text & "'", koneksi)
ENONG.Fill(DT)
ENONG.Dispose()
DATA_053.DataSource = DT
End Sub
Private Sub SIMPAN_053_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SIMPAN_053.Click
If NT_053.Text.Length = 0 Then
MsgBox("isi rong No Transaksi na..")
Exit Sub
End If
If JT_053.Text.Length = 0 Then
MsgBox("Isi rong Jenis Transaksi na..")
Exit Sub
End If
If DT.Rows.Count = 0 Then
MsgBox("Maaf...Isi rong itu datatable na..")
Exit Sub
End If
YANI.AturPencarianDataBase("mastertransaksi", "notrans", NT_053.Text, 1, koneksi)
If YANI.JumlanBaris > 0 Then
MsgBox("Adami notrans seperti itu")
Exit Sub
End If
INDAH = New OleDb.OleDbCommand("insert into mastertransaksi(notrans, tanggaltransaksi, jenistransaksi) values ('" & NT_053.Text & "',#" & TGL_053.Value.Month & "/" & TGL_053.Value.Day & "/" & TGL_053.Value.Year & "#,'" & JT_053.Text & "')", koneksi)
koneksi.Open()
INDAH.ExecuteNonQuery()
koneksi.Close()
For Each x As DataRow In DT.Rows
INDAH = New OleDb.OleDbCommand("insert into detailtransaksi(notrans, kodebarang, unit, harga) values ('" & NT_053.Text & "','" & x("kodebarang") & "','" & x("unit") & "','" & x("harga") & "')", koneksi)
koneksi.Open()
INDAH.ExecuteNonQuery()
koneksi.Close()
Next
INDAH.Dispose()
NT_053.Text = ""
JT_053.Text = ""
DT.Rows.Clear()
End Sub
End Class
http://cacalisa.blogspot.com/2012/11/latihan3546110038.html
BalasHapushttp://rafidashaleh.blogspot.com/2012/11/latihan3546110041.html
BalasHapushttp://mulyawarman039.blogspot.com/2012/11/latihan3546110039.html
BalasHapushttp://wahyunirachman.blogspot.com/2012/11/latihan3546110020.html
BalasHapushttp://srikartikafanty.blogspot.com/2012/11/latihan3546110007.html
BalasHapushttp://dianmegariski.blogspot.com/2012/11/latihan3546110023_3389.html
BalasHapushttp://bahrizj.blogspot.com/2012/11/latihan3546110001_5.html
BalasHapushttp://restyaccounting.blogspot.com/2012/11/latihan3546110027.html
BalasHapushttp://alfaega.blogspot.com/2012/11/latihan3546110022.html
BalasHapushttp://idhamsyaam.blogspot.com/2012/11/latihan3546110021.html
BalasHapushttp://sulhihusni.blogspot.com/2012/11/latihan3546110004.html
BalasHapushttp://fitrianihamka.blogspot.com/2012/11/latihan3546110006.html
BalasHapushttp://ildayani.blogspot.com/2012/11/latihan3546110002.html
BalasHapushttp://masdarwati.blogspot.com/2012/11/latihan3546110024.html
BalasHapushttp://hanihasan07.blogspot.com/2012/12/latihan3546110044.html
BalasHapushttp://bothbon.blogspot.com/2013/01/latihan3546110043.html
BalasHapushttp://muthmil8.blogspot.com/2012/11/latihan3546110037.html
BalasHapushttp://amalmaulana92.blogspot.com/2013/01/latihan3546110003_9063.html
BalasHapushttp://aardianzah2.blogspot.com/2013/01/latihan-35.html
BalasHapushttp://feibyfrycilia.blogspot.com/2013/01/latihan3546110055.html
BalasHapushttp://diyanahdina.blogspot.com/2013/01/latihan3546110045.html
BalasHapushttp://deodns.blogspot.com/#!/2013/01/latihan3546110040.html
BalasHapus