Protected Sub BtValidCommande_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtValidCommande.Click Dim da2 As New DataSet1TableAdapters.ATTENTE_LIVRAISONTableAdapter Dim xnm As Double = 0 Dim da As New DataSet1TableAdapters.DEMDETableAdapter Dim da1 As New DataSet1TableAdapters.E_DEMDETableAdapter Dim dt2 As DataSet1.DEMDEDataTable = da.GetDataDEMDE Dim atleastonerow As Boolean = False Dim i As Integer = 0 For i = 0 To GridView1.Rows.Count - 1 Dim cb As CheckBox = CType(GridView1.Rows(i).FindControl("checkbox1"), CheckBox) 'Dim cb1 As CheckBox = FindControl("checkbox2") ' If cb.Checked Then If dt2.Rows.Count > 0 Then Dim xrow1 As DataSet1.DEMDERow = dt2.Rows(0) xnm = da2.QueryPROCHAINE For Each xrow1 In dt2.Rows If cb.Checked Then 'da2.Insert(xnm, xrow1.SYMB, GridView2.SelectedDataKey.Values.Item(0), Now, GridView2.SelectedDataKey.Values.Item(4), GridView2.SelectedDataKey.Values.Item(1)) da2.Insert(xnm, GridView1.Rows(i).Cells.Item(0).Text, GridView2.SelectedDataKey.Values.Item(0), Now, GridView1.Rows(i).Cells.Item(3).Text, GridView2.SelectedDataKey.Values.Item(1)) da.DeleteQueryDEMDE(xrow1.SYMB) da1.DeleteQueryE_DEMDEb_by_NDEM(NDEMhf.Value) End If Next 'End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)