07-03-13, 02:09 AM
@@أبورائد@@ كتب :السلام عليكم ورحمة الله وبركاته
ممكن تكتب لنا كود الحفظ لأني أعتقد أنك استخدمت أسلوب خاطئ.
السلام عليكم ورحمة الله وبركاته
ما اعتقد ،، لان الكود يظيف بشكل ممتاز ،،، ،هذا هو كود الاضافة ( مرتب بشكل صحيح )
كود :
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
' Add New Record
Conn.Open()
Dim Cmd As New SqlCommand("insert into Table1 (UserName,MobileNumber,Date,Price,Rest,Recipient,NameShop,PlaceShop,UserShop,Email,NumberDresses,ColorDress1,TypeCloth1,TypeDesign1,TypePocket1,IDCloth1,LengthM1,LengthY1,ColorDress2,TypeCloth2,TypeDesign2,TypePocket2,IDCloth2,LengthM2,LengthY2,ColorDress3,TypeCloth3,TypeDesign3,TypePocket3,IDCloth3,LengthM3,LengthY3,LengthDress,DisplayKtf,DisplayDress,LengthKmSadh,LengthKmKbk,DisplayKmSadh1,DisplayKmSadh2,DisplayKmSadh3,DisplayKmKbk1,DisplayKmKbk2,DisplayKmKbk3,RakbhKllab1,RakbhKllab2,RakbhSadh1,RakbhSadh2,DownDress1,DownDress2,LengthKbzor,Other) values ( '" & Trim(TextBox1.Text) & "' , " & Val(TextBox2.Text) & " , '" & Trim(TextBox7.Text) & "' , " & Val(TextBox45.Text) & " , " & Val(TextBox46.Text) & " , " & Val(TextBox47.Text) & " , '" & Trim(TextBox4.Text) & "' , '" & Trim(TextBox5.Text) & "' , '" & Trim(TextBox6.Text) & "' , '" & Trim(TextBox3.Text) & "' , " & Val(TextBox71.Text) & " , '" & Trim(TextBox8.Text) & "' , '" & Trim(TextBox9.Text) & "' , '" & Trim(TextBox10.Text) & "' , '" & Trim(TextBox11.Text) & "' , " & Val(TextBox20.Text) & " , " & Val(TextBox21.Text) & " , " & Val(TextBox87.Text) & " , '" & Trim(TextBox15.Text) & "' , '" & Trim(TextBox14.Text) & "' , '" & Trim(TextBox13.Text) & "' , '" & Trim(TextBox12.Text) & "' , " & Val(TextBox22.Text) & " , " & Val(TextBox23.Text) & " , " & Val(TextBox88.Text) & " , '" & Trim(TextBox19.Text) & "' , '" & Trim(TextBox18.Text) & "' , '" & Trim(TextBox17.Text) & "' , '" & Trim(TextBox16.Text) & "' , " & Val(TextBox24.Text) & " , " & Val(TextBox25.Text) & " , " & Val(TextBox89.Text) & " , " & Val(TextBox26.Text) & " , " & Val(TextBox27.Text) & " , " & Val(TextBox28.Text) & " , " & Val(TextBox29.Text) & " , " & Val(TextBox30.Text) & " , " & Val(TextBox31.Text) & " , " & Val(TextBox32.Text) & " , " & Val(TextBox33.Text) & " , " & Val(TextBox34.Text) & " , " & Val(TextBox35.Text) & " , " & Val(TextBox36.Text) & " , " & Val(TextBox37.Text) & " , " & Val(TextBox39.Text) & " , " & Val(TextBox40.Text) & " , " & Val(TextBox41.Text) & " , " & Val(TextBox42.Text) & " , " & Val(TextBox43.Text) & " , " & Val(TextBox44.Text) & " , '" & Trim(TextBox38.Text) & "' )", Conn)
Cmd.ExecuteNonQuery()
RefreshListView()
End Sub
