25-01-19, 05:53 PM
السلام عليكم
الحمد لله
توصلت للحل هذا هو الكود يقوم بجلب جميع الفواتير المسجلة من جدول المبيعات خلال فترة بين تاريخين
الكود
الحمد لله
توصلت للحل هذا هو الكود يقوم بجلب جميع الفواتير المسجلة من جدول المبيعات خلال فترة بين تاريخين
الكود
PHP كود :
Dim sql As String
Dim conn As New System.Data.OleDb.OleDbConnection
'Dim lst As String = dvgNumb.CurrentRow.Cells(1).Value
'Dim lst2 As String = DataGridView1.CurrentRow.Cells(5).Value
sql = "select [sales_numb] from tbl_sales where [ddate] between #" & ddate1.Value.Date & "# and # " & ddate2.Value.Date & "# Group By [sales_numb]"
'sql = "select [date of consumed] from total where [num of box] ='" & lst & "' and [machine num]= '" & lst2 & "' and [date of consumed] between #" & ddate1.Value.Date & "# and # " & ddate2.Value.Date & "#"
con.Open()
Dim da1 As New System.Data.OleDb.OleDbDataAdapter(sql, con)
Dim ds1 As New DataSet()
da1.Fill(ds1, "total")
Dim table As DataTable = ds1.Tables(0)
ListBox2.DataSource = table
ListBox2.DisplayMember = "sales_numb"

