This question is an exact duplicate of:
I'm Currently creating a program that will Match Up the cocks(Chicken). For Example I have 10 category(Category 1 (range 1001 to 1005 )Category 2 (range 1006 to 1010 )Category 3 (range 1011 to 1015 ) and so on....)
for now i already know how to categorized, the categorization will based on the weight of the cock(chicken) for example: there are 10 cocks that is under the category 1 because there weight is between 1001 to 1005. after categorize it will random match up example cock1 match cock2, cock4 match cock6 and so on. therefore there are 5 match.fights for the category1.... So my problem is how to add the match cocks to another table and assign a MAtchID Example COck1 and cock2 will save to other table and will be given a MAtchID... Hope you understand and could help me with this... Thank you in advance
DataGridView1.Sort(DataGridView1.Columns(3), ListSortDirection.Ascending)
For Each row As DataGridViewRow In DataGridView1.Rows
If Not row.IsNewRow Then
If row.Cells(3).Value <= 1005 Then
If row.Cells(1).Value = row.Cells(1).Value Then 'to Check if there is duplicate in NAme
' in here to put the MAtch up Syntax to save the random match up to another table
Else 'to Check if there is duplicate in NAme
MsgBox("Duplicate Name")
End If
ElseIf row.Cells(3).Value <= 1010 Then
If row.Cells(1).Value = row.Cells(1).Value Then 'to Check if there is duplicate in NAme
MsgBox("No Duplicate Name")
Else 'to Check if there is duplicate in NAme
MsgBox("Duplicate Name")
End If
ElseIf row.Cells(3).Value <= 1010 Then
If row.Cells(1).Value = row.Cells(1).Value Then 'to Check if there is duplicate in NAme
MsgBox("No Duplicate NAme")
Else 'to Check if there is duplicate in NAme
MsgBox("Duplicate Name")
End If
End If
End If
Next
Aucun commentaire:
Enregistrer un commentaire