﻿using Microsoft.Reporting.WinForms;
using Negocio;
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;

namespace Ui.Desktop
{
    public partial class ProvinciasReport : Form
    {
        ProvinciaLogic Negocio = new ProvinciaLogic();

        public ProvinciasReport()
        {
            InitializeComponent();
        }

        private void ProvinciasReport_Load(object sender, EventArgs e)
        {
            DataTable dt = Negocio.GetAllDataTable();

            ReportDataSource rds = new ReportDataSource("DataSetProvincias", dt);
            
            this.rvProvincias.LocalReport.DataSources.Clear();
            this.rvProvincias.LocalReport.DataSources.Add(rds);
            this.rvProvincias.RefreshReport();
        }
    }
}
