using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TinyHeels.App_Code;
using Microsoft.Reporting.WinForms;

namespace TinyHeels
{
    public partial class ReportDailySales : Form
    {
        public ReportDailySales()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ReportDailySales_Load(object sender, EventArgs e)
        {
            try
            {
                SelectDate d = new SelectDate();
                d.ShowDialog();
                if (Common.command == true)
                {
                    // TODO: This line of code loads data into the 'DataSet.DailySales' table. You can move, or remove it, as needed.
                    this.DailySalesTableAdapter.Fill(this.DataSet.DailySales,Common.firstDate.ToShortDateString());
                    reportViewer1.SetDisplayMode(DisplayMode.PrintLayout);
                    reportViewer1.ZoomMode = ZoomMode.Percent;
                    reportViewer1.ZoomPercent = 100;
                    this.reportViewer1.RefreshReport();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}
