20-03-13, 02:27 AM
خلاص شكرا اخي حليتها،،، هذا هو الكود ،،، التعديل ما هو بالاحمر
كود :
For aLoop As Integer = [color=#FF0000]1[/color] To Val(TextBox92.Text.Trim)
Dim cm2 As New SqlCommand("insert into Table2 (NameCloth,TypeCloth,ColorCloth,LengthM,LengthY,Quantity) values (@NameCloth,@TypeCloth,@ColorCloth,@LengthM,@LengthY,@Quantity)", Conn)
cm2.Parameters.AddWithValue("@NameCloth", SqlDbType.VarChar).Value = (TextBox64.Text).ToString
cm2.Parameters.AddWithValue("@TypeCloth", SqlDbType.VarChar).Value = (TextBox63.Text).ToString
cm2.Parameters.AddWithValue("@ColorCloth", SqlDbType.VarChar).Value = (TextBox60.Text).ToString
cm2.Parameters.AddWithValue("@LengthM", SqlDbType.Decimal).Value = (TextBox72.Text).ToString
cm2.Parameters.AddWithValue("@LengthY", SqlDbType.Decimal).Value = (TextBox85.Text).ToString
cm2.Parameters.AddWithValue("@Quantity", SqlDbType.VarChar).Value = (TextBox83.Text).ToString
If Conn.State = ConnectionState.Closed Then
Conn.Open()
End If
cm2.ExecuteNonQuery()
cm2.Parameters.Clear()
Me.RefreshListView2()
Next
