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 rptKhadamatefrm : Form
    {
        DataSet1 d1 = new DataSet1();
        public rptKhadamatefrm()
        {
            InitializeComponent();
        }

        private void rptKhadamatefrm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'DataSet1.ServicesDef' table. You can move, or remove it, as needed.
            this.ServicesDefTableAdapter.Fill(this.DataSet1.ServicesDef);
            //SqlConnection con = new SqlConnection();
            //con.ConnectionString = "server = (local); Database = RezerveBelitTotal; trusted_connection = yes;";
            //SqlCommand cmd = new SqlCommand();
            //cmd.Connection = con;
            FirstClass db = new FirstClass();
            db.cmd.CommandText = @"SELECT     ServiceID, ServiceDescript, ServiceDate, Quantity, ExpireBit FROM ServicesDef ORDER BY ServiceID";

            //cmd.CommandText = 

            SqlDataAdapter da = new SqlDataAdapter(db.cmd);
            //con.Open();
            da.Fill(d1, "ServicesDef");
            //con.Close();
            ServicesDefBindingSource.DataSource = d1;
            this.reportViewer1.RefreshReport();
            reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            reportViewer1.ZoomPercent = 25;
        }
    }
}