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 frmReportCashBook : Form
    {
        public frmReportCashBook()
        {
            InitializeComponent();
        }

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

        private void Btn_ShowDate_Click(object sender, EventArgs e)
        {
            this.tblCashBookTableAdapter.FillByDate(this.dtsHes.tblCashBook, Msk_Txt_SDate.Text , Msk_Txt_EndDate.Text );
            tblCashBookBindingSource.DataSource = this.dtsHes.tblCashBook;
            this.reportViewer1.RefreshReport();
        }

        private void Btn_ShowBookName_Click(object sender, EventArgs e)
        {
            this.tblCashBookTableAdapter.FillByBookName(this.dtsHes.tblCashBook, Txt_BookName.Text.Trim());
            tblCashBookBindingSource.DataSource = this.dtsHes.tblCashBook;
            this.reportViewer1.RefreshReport();
        }

        private void Btn_ShowAll_Click(object sender, EventArgs e)
        {
            this.tblCashBookTableAdapter.Fill(this.dtsHes.tblCashBook);
            tblCashBookBindingSource.DataSource = this.dtsHes.tblCashBook;
            this.reportViewer1.RefreshReport();
        }
    }
}
