using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HesabdariSubSys
{
    public partial class frmReportChech : Form
    {
        public frmReportChech()
        {
            InitializeComponent();
        }

        private void frmReportChech_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dtsHes.tblChecks' table. You can move, or remove it, as needed.
            this.tblChecksTableAdapter.Fill(this.dtsHes.tblChecks);
            this.tblChecksBindingSource.DataSource = this.dtsHes.tblChecks;
            this.reportViewer1.RefreshReport();
            reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            reportViewer1.ZoomPercent = 25;
        }

        private void Btn_ShowSerial_Click(object sender, EventArgs e)
        {
            this.tblChecksTableAdapter.FillBySerial(this.dtsHes.tblChecks, Cmb_Serial.SelectedValue.ToString());
            this.tblChecksBindingSource.DataSource = this.dtsHes.tblChecks;
            this.reportViewer1.RefreshReport();
        }

        private void Btn_ShowAll_Click(object sender, EventArgs e)
        {
            this.tblChecksTableAdapter.Fill(this.dtsHes.tblChecks);
            this.tblChecksBindingSource.DataSource = this.dtsHes.tblChecks;
            this.reportViewer1.RefreshReport();

        }
    }
}
