Advertisement
AndreJaya

Untitled

Nov 20th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.10 KB | None | 0 0
  1. Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles TextBox6.TextChanged
  2.         On Error Resume Next
  3.         TextBox6.Text = FormatNumber(TextBox6.Text, 0)
  4.         TextBox6.SelectionStart = Len(TextBox6.Text)
  5.     End Sub
  6. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  7.         If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Or TextBox6.Text = "" Or TextBox7.Text = "" Then
  8.             MsgBox("data tidak boleh kosong")
  9.             Exit Sub
  10.         Else
  11.             Call connection()
  12.             Dim simpanDebet1 As String
  13.             simpanDebet1 = "insert into [TBL_JURNAL] (tanggal,voucher,coa,nama_coa,keterangan,debet,kredit,saldo) values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox15.Text & "')"
  14.             cmd = New SqlCommand(simpanDebet1, conn)
  15.             cmd.ExecuteNonQuery()
  16.             MsgBox("data berhasil disimpan")
  17.         End If
  18.     End Sub
  19. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement