private void Form1_Load(object sender, EventArgs e) { BL.BL bl = new BL.BL(); DataTable dt = bl.SHOWDATA(); dataGridView1.DataSource = dt; //Form1_Load(null, null); }
private void button1_Click(object sender, EventArgs e) { int x; BL.BL b = new BL.BL(); b.Project_Num = textBox1.Text; b.Auto_ID = textBox2.Text; b.Auto_Date = textBox3.Text; b.Addr = textBox4.Text; b.ADD(); Form1_Load(null, null); MessageBox.Show("Saved"); }