private void btndel_Click(object sender, EventArgs e) { if (MessageBox.Show("هل تريد فعلا الحذف", "عمليه الحذف", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes) { prd.DELETEPRODUCT(this.dataGridView1.CurrentRow.Cells[0].Value.ToString()); MessageBox.Show("تمت عمليه الحذف", "عمليه الحذف", MessageBoxButtons.OK, MessageBoxIcon.Information); this.dataGridView1.DataSource = prd.GET_ALL_PRODUCT(); } else { MessageBox.Show("تم الغاء عمليه الحذف", "الغاء الحذف", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } FRM_PRODUCTS.getmainform.dataGridView1.DataSource = prd.GET_ALL_PRODUCT(); }