Example #1
0
        private void displayTodayReport()
        {
            try
            {
                DBconnection connection5 = new DBconnection();

                DataTable      dt = new DataTable();
                SqlDataAdapter da = new SqlDataAdapter(connection5.displayTodayReport(date));
                da.Fill(dt);
                dataGrid.DataSource = dt;
                connection5.getConnection().Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in Displaying Reports:\n" + ex, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Console.WriteLine("Error: \n" + ex);
            }
        }