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 fromdatagridveiw
{
    public partial class customer : Form
    {
        public customer()
        {
            InitializeComponent();
        }

        private void customer_Load(object sender, EventArgs e)
        {
            DataTable dt1 = new DataTable();
            DataBase db1 = new DataBase();
            dt1 = db1.MySelect("select * from customer");
            dgvcustomer.DataSource = dt1;
        }

        private void dgvcustomer_DoubleClick(object sender, EventArgs e)
        {
            factor ffactor = (factor)Application.OpenForms["factor"];
            ffactor.GetCustomerName(dgvcustomer.CurrentRow.Cells[1].Value.ToString());
            this.Close();
        }
    }
}
