04-06-22, 02:18 PM
(آخر تعديل لهذه المشاركة : 04-06-22, 03:02 PM {2} بواسطة asemshahen5.)
PHP كود :
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
DataGridView1.DataSource = SelectBetweenVB(DateTimePicker1.Value, DateTimePicker2.Value, 1626)
End Sub
Private Function SelectBetweenVB(Date1 As DateTime, Date2 As DateTime, EmpID As Integer) As DataTable
Dim StrSQL As String = "Select * FROM EmpTbl Where Tdata BETWEEN #" & Date1.ToString("yyyy-MM-dd") & "# and #" & Date2.ToString("yyyy-MM-dd") & "# and EmpID=" & EmpID
Dim cn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\AsemXP\Desktop\Test.accdb;Jet OLEDB:Database Password=;")
Dim da As New OleDbDataAdapter(StrSQL, cn)
Dim dt As New DataTable
da.Fill(dt)
Return dt
End Function
وهذا مثال .
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
