con_string.ConnectionString = @"Provider = Microsoft.ACE.OLEDB.12.0;Data Source =|DataDirectory|\Restaurant.accdb;Persist Security Info=False"; con_string.Open(); DataSet dsa1 = new DataSet(); DataTable dt1 = new DataTable(); dsa1.Tables.Add(dt1); OleDbDataAdapter da1 = new OleDbDataAdapter(); da1 = new OleDbDataAdapter(string.Format("SELECT [column3] As [Tables],count(Tables) As [QTY] from [Total] Where [column3] like 'DineIn%' Or [Date] Between #{0}# And #{1}# Or not [column1] = 0 Group By [column3]", DateTime.Now.ToShortDateString(), DateTime.Now.AddDays(1).ToShortDateString()), con_string); da1.Fill(dt1); con_string.Close(); int sum1 = 0; for (int i = 0; i < dsa1.Tables[0].Rows.Count; ++i) { sum1 += Convert.ToInt32(dsa1.Tables[0].Rows[i][1].ToString()); } Dinein_Orders.Text = sum1.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)