17-05-22, 03:23 AM
قمت بتحويل الكود الي
ولكن تظهر الخطأ
Attempting to free an in-use RCW can cause corruption or data loss.
كود :
Dim idx As Integer = DGVTest(6, DGVTest.SelectedRows(0).Index).Value.ToString
Dim dt As DataTable = New DAL().selectdatatable(String.Format("SELECT Test_Price, Test_No FROM Tests order by Tests.Test_No;"))
Dim d As New DAL
d.Dataedit(String.Format("delete from comprices where comid={0} ", idx))
Parallel.[For](0, dt.Rows.Count - 1, Sub(i)
d.Dataedit(String.Format("insert into comprices (TestPrice,Test_No,comid) values({0},{1},{2})", dt.Rows(i)(0), dt.Rows(i)(1), idx))
End Sub)
MessageBox.Show("تمت العمليه بنجاح", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.RightAlign)Attempting to free an in-use RCW can cause corruption or data loss.
M.M

