dts.Tables.Clear(); SqlDataAdapter da = new SqlDataAdapter("SELECT t.Date, t.Barcode, t.Name, t.Quantity, d.BuyPrice, t.SellPrice FROM tblSales t, tblMagazine d WHERE t.Date BETWEEN '" + DateTimePicker1.Value + "' AND '" + DateTimePicker2.Value + "'", con); da.Fill(dts); dataGridView1.DataSource = dts.Tables[0];
tblSales
tblMagazine
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)