4. Form Simpan Ke Laporan
Public Class frmProsesSekaligus Private Sub frmProsesSekaligus_Loadsender As Object, e As EventArgs Handles
MyBase.Load If psediaan = 0 Or pminta = 0 Then
MsgBoxSilahkan mengisi data terlebih dahulu Close
frmProses.Show Else
lblumt.Text = Math.Rounds_pmtT, 2 lblumtt.Text = Math.Roundt_pmtT, 2
lblumn.Text = Math.Rounds_pmtN, 2 lblumnt.Text = Math.Roundt_pmtN, 2
lblust.Text = Math.Rounds_smB, 2 lblustt.Text = Math.Roundt_smB, 2
lblusn.Text = Math.Rounds_smS, 2 lblusnt.Text = Math.Roundt_smS, 2
lblNama.Text = Teh Botol Sosro lblDefuz.Text = Math.Rounds_defuzzy, 2
lblDefuzT.Text = Math.Roundt_defuzzy, 2 lblRun.Text = s_runtime
lblRunT.Text = t_runtime lblMintaMax.Text = minta_max
lblMintaMin.Text = minta_min lblSediaMAx.Text = sedia_max
lblSediaMin.Text = sedia_min lblProMax.Text = prod_max
lblProMin.Text = prod_min End If
End Sub Private Sub btnKembali_Clicksender As Object, e As EventArgs
Close frmProses.Show
End Sub
Private Sub btnSimpan_Click_1sender As Object, e As EventArgs Handles btnSimpan.Click Dim cmdtxt As String = Nothing
Dim cmdtxt2 As String = Nothing cmdtxt = Insert into fuzzy[bulan],[tahun],[permintaan], [persediaan], [rk sugeno], [rk
tsukamoto], [rt sugeno], [rt tsukamoto] _ Values stBulan , stTahun , pminta , psediaan ,
Math.RoundVallblDefuz.Text, 2 , Math.RoundVallblDefuzT.Text, 2 , Strs_runtime , Strt_runtime
cmdtxt2 = Insert into minuman[nama], [bulan], [tahun], [permintaan], [persediaan], [jlh_produksi] _
Values Teh Botol Sosro , stBulan , stTahun , pminta , psediaan , Math.RoundVallblDefuz.Text, 0
Try con.ConnectionString = strConn
con.Open With cmd
.Connection = con .CommandType = CommandType.Text
.CommandText = cmdtxt End With
cmd.ExecuteNonQuery With cmd
.Connection = con .CommandType = CommandType.Text
.CommandText = cmdtxt2 End With
cmd.ExecuteNonQuery dateUpdate = False
MsgBoxData berhasil disimpan Catch ex As Exception
MsgBoxex.Message, vbCritical Finally
con.Dispose con.Close
End Try End Sub
Private Sub btnKembali_Click_1sender As Object, e As EventArgs Handles btnKembali.Click
Close frmProses.Show
End Sub
End Class
5. Form Sugeno