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

using FactorsNamespace;

namespace ProtoReports
{
	public partial class mainForm : Form
	{


		public mainForm()
		{
			InitializeComponent();

      butView.Click += new EventHandler(butView_Click);
			data = new mDataProvider();

		}

    private DataTable tableRes;
		private DataTable tableOrignal;
		private mDataProvider data;

    void butView_Click(object sender, EventArgs e)
    {
      tableRes = new DataTable();
      tableRes.Columns.Add("col01");
      tableRes.Columns.Add("col02");
      tableRes.Columns.Add("col03");

      tableRes.Rows.Add("r1c1", "r1c2", "r1c3");
      tableRes.Rows.Add("r2c1", "r2c2", "r2c3");
      tableRes.Rows.Add("r3c1", "r3c2", "r3c3");



			tableOrignal = data.SelectOriginal();/*new FutureDBFactor[] 
        {
					new FutureDBFactor("p01", "p1"), 
					new FutureDBFactor("p02", "p20")
				}
				); /**/

			tableRes = data.Select();

			dataGridOriginal.DataSource = tableOrignal;
			dataGridRes.DataSource = tableRes;
//      dataGridView1.DataSource = tableRes;  
      //throw new Exception("The method or operation is not implemented.");
    }
	}
}