![]() |
حذف سطر من datagridview لدي قاعدة بيانات و كونت بها Delete procedure نصه ALTERproc [dbo].[Deleteitems](@MainLineID int) as begin deletefrom dbo.Main_Line where MainLineID=@MainLineID end و عند تطيقه علي برنامج vb.net 2005 كتبت كود الحذف هكذا فأين الخطا PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim i AsInteger Dim ta AsNew M_ListDataSetTableAdapters.Main_LineTableAdapter Dim x As MsgBoxResult x = MsgBox("Are you sure", MsgBoxStyle.YesNo, "Confirm") If x = MsgBoxResult.Yes Then For i = 0 To DataGridView1.RowCount - 1 If DataGridView1.Rows(i).Cells(0).Value = TrueThen ta.Deleteitems(DataGridView1.Rows(i).Cells(1).Valu e) EndIf Next EndIf EndSub |
الساعة الآن 08:38 AM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir