Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For Each row As DataGridViewRow In DataGridView1.Rows
- pID = row.Cells("productID").Value.ToString()
- pcode = row.Cells("ProductCode").Value.ToString()
- pname = row.Cells("ProductName").Value.ToString()
- price = row.Cells("SellingPrice").Value.ToString()
- total = row.Cells("SellingPrice").Value * 1
- If row.Cells("chk").Value = True Then
- 'before adding check if the product is already added to the list
- For ii = 0 To .RowCount - 1
- If pID = .Item(2, ii).Value Then
- count = count + 1
- If count <> 0 Then
- 'if item exist do not add the product
- Else
- '
- End If
- End If
- Next ii
- If count = 0 Then
- .Rows.Add("Delete", "Select", pID, pcode, pname, "", price, 1, total, 0, 0, total)
- End If
- End If
- Next
Add Comment
Please, Sign In to add comment