22-03-14, 03:25 AM
كود :
If al.Text.Trim.Replace(" ", "") = "" Then Exit Sub
Dim thnote As New Thread(AddressOf tellnote)
Button1.Enabled = False
thnote.Start()
Sub tellnote()
Try
For Each itm In ListBox1.SelectedItems
Dim cm As New SqlCommand("insert into notes (mto,note) values(@mto,@note)", con)
cm.Parameters.AddWithValue("@mto", itm)
cm.Parameters.AddWithValue("@note", al.Text)
If con.State = ConnectionState.Closed Then
con.Open()
End If
cm.ExecuteNonQuery()
MsgBox("تم تنبيه الجميع", MsgBoxStyle.Information, "")
Next
Catch ex As Exception
MsgBox(Err.Description, MsgBoxStyle.Critical, "")
End Try
Button1.Enabled = True
End Subاللهم إني أعوذ بك من غلبة الدين وغلبة العدو، اللهم إني أعوذ بك من جهد البلاء ومن درك الشقاء ومن سوء القضاء ومن شماتة الأعداء
اللهم اغفر لي خطيئتي وجهلي، وإسرافي في أمري وما أنت أعلم به مني، اللهم اغفر لي ما قدمت وما أخرت، وما أسررت وما أعلنت وما أنت أعلم به مني، أنت المقدم وأنت المؤخر وأنت على كل شيء قدير


