13-04-20, 04:53 PM
PHP كود :
Sub insert_()
Dim dd As Integer = DataGridView1.Rows.Cast(Of DataGridViewRow).Where(Function(row) CStr(row.Cells(1).Value) = ComboBox1.SelectedItem).Count
If dd > 0 Then
MsgBox("هذا العضو موجود")
Exit Sub
End If
Dim cmd As New SqlCeCommand("insert into asd (a, b, c) values('" & ComboBox1.Text & "','" & DateTimePicker2.Text & "','" & DateTimePicker1.Text & "')", Con)
Con.Open()
cmd.ExecuteNonQuery()
Con.Close()
End Sub
سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
