private void button1_Click(object sender, EventArgs e) { اضافه_ماده_خام or = new اضافه_ماده_خام(); or.ShowDialog(); dt = pro.ALL_Org_products(); dataGridView1.DataSource = dt; }
private void button2_Click(object sender, EventArgs e) { presentation_layer.اضافه_ماده_خام org_pro = new اضافه_ماده_خام(); org_pro.button1.Text = "تعديل"; org_pro.txt_qun.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString(); org_pro.txtname.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString(); org_pro.txtprice.Text = dataGridView1.CurrentRow.Cells[4].Value.ToString(); org_pro.txt_total.Text = dataGridView1.CurrentRow.Cells[5].Value.ToString(); org_pro.textBox1.Text = dataGridView1.CurrentRow.Cells[0].Value.ToString(); org_pro.ShowDialog(); org_pro.button1.Text = "اضافه"; dt = pro.ALL_Org_products(); dataGridView1.DataSource = dt; }