tb1.text = datetime.now.tostring("MM/dd/yyyy HH:mm:ss")
tb1.text=actdate (from module)
Unable to find an entry point named 'PostMessage' in DLL 'user32.dll'.
'part of the usings Imports System.Runtime.InteropServices 'declares Private Declare Function PostMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal msg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Boolean Private Const WM_LBUTTONDOWN As Int32 = 513 'method to call dropdown Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) handles button1.click Dim x As Int32 = (dateTimePicker1.Width - 10) Dim y As Int32 = (dateTimePicker1.Height / 2) Dim lParam As Int32 = (x + (y * 65536)) PostMessage(dateTimePicker1.Handle, WM_LBUTTONDOWN, 1, lParam) End Sub
CREATE TABLE [CUBE] ( [NO] SMALLINT, [LETDATE] DATETIME )
dim actdate as datetime = datetime.now.tostring("MM/dd/yyyy HH:mm:ss")
Datetime.Now.Tostring("MM/dd/yyyy HH:mm:ss")
Dim actDate as DateTime = DateTime.Now cmd.parameters.AddWithValue("letdate", sctDate)
call koneksi() sql = "insert into cube([no],[letdate])" & " "values(?,?)" cmd = New OleDbCommand(sql, conn) dim actdate as datetime = DateTime.Now With cmd.Parameters .Add(New OleDbParameter("@no", CType(serno.Text, Integer))) .Add(New OleDbParameter("@letdate", CType(actdate, Date))) End With cmd.ExecuteNonQuery() cmd.Dispose() conn.Close()
datetime.now.tostring("dd/MM/yyyy hh:mm:ss")
actdate = DateTime.Now
"select top 1 no_booking from booking where date_service in (select top 1 date_service from booking group by date_service having count (date_service) < 4) order by no_booking desc"
For i As Integer = 0 To dataspdibeli.Rows.Count - 1 If Not IsDBNull(dataspdibeli.Rows(i).Cells("NID_SP").Value) AndAlso dataspdibeli.Rows(i).Cells("NID_SP").Value = spnid.Text Then If MessageBox.Show("Data Barang Sudah Ada , Tambah Jumlah Barang ?", "Confirmation !", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then dataspdibeli.Rows(i).Cells("QTY").Value = dataspdibeli.Rows(i).Cells("QTY").Value + Val(spqty.Text) Else Exit Sub End If Exit Sub End If Next
<pre>Dim stock = datasparepart.CurrentRow.Cells(5).Value If stock = 0 Then MsgBox("Stock Item Habis", MsgBoxStyle.Exclamation) ElseIf stock < Val(spqty.Text) Then MsgBox("Stock Kurang Dari Jumlah Item Yang Dibeli", MsgBoxStyle.Exclamation) ElseIf spqty.Text = "" Then MsgBox("Masukkan Jumlah Item", MsgBoxStyle.Exclamation) spqty.Focus() elseif ----{HOW PLACE/CHECK THE PRIVATE SUB DUPLICATE HERE} Else With dataspdibeli 'Insert data ke DGV .Rows.Insert(.NewRowIndex, penfaktur.Text, spnid.Text, spnama.Text, spharga.Text, spqty.Text, spsubtotal.Text) End With hitung() End If