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

namespace RezerveBeliteHavaPeimaCS
{
    public partial class rptStafsfrm : Form
    {
        DataSet1 d1 = new DataSet1();
        public rptStafsfrm()
        {
            InitializeComponent();
        }

        private void rptStafsfrm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'DataSet1.StaffsTable' table. You can move, or remove it, as needed.
            this.StaffsTableTableAdapter.Fill(this.DataSet1.StaffsTable);
            FirstClass db = new FirstClass();

            db.cmd.CommandText = @"SELECT     StaffID, NameSname, PhoneNum, FaxNum, Notes FROM  StaffsTable ORDER BY StaffID";

            SqlDataAdapter da = new SqlDataAdapter(db.cmd);
           
            da.Fill(d1, "StaffsTable");
            StaffsTableBindingSource.DataSource = d1;
            this.reportViewer1.RefreshReport();

            reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            reportViewer1.ZoomPercent = 25;
        }

    }
}