التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[كود] مساعدة في كود keyDown
#1
السلام عليكم
ممكن مساعدة يا اخواني في هذا الكود
عند كتابة اسم المعرف في ليبيل ال ID يظهر لي اسم الصنف في التيكست بوكس الخاص به
ولكني أريد كتابة اسم الصنف بدلا من اسم المعرف ، ولكن يبدو ان هذه الخاصية لا تدعم كتابة النصوص
أرجو منكم المساعدة
Private Sub txtLabel_KeyDown(sender As Object, e As KeyEventArgs) Handles txtLabel.KeyDown
If e.KeyCode = Keys.Enter Then
Try
cmd = New OleDb.OleDbCommand("select Price from TBL_PRODUCTS where Label = " & txtLabel.Text, con)
con.Open()

Dim dr As OleDb.OleDbDataReader = cmd.ExecuteReader
dr.Read()


If dr.HasRows Then
txtPrice.Text = dr(0)
txtQty.Focus()

Else
MsgBox("الصنف غير موجود", MsgBoxStyle.Exclamation, "تنبيه")
txtLabel.Clear()
txtQty.Clear()
txtPrice.Clear()
txtAmount.Clear()

txtLabel.Focus()

End If
dr.Close()


Catch ex As Exception
Exit Sub
Finally
con.Close()

End Try
End If

End Sub
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مساعدة في كود keyDown - بواسطة المبرمج العبقري - 19-01-17, 08:49 PM
RE: مساعدة في كود keyDown - بواسطة thevirus - 23-01-17, 01:06 AM
RE: مساعدة في كود keyDown - بواسطة مساعدة - 23-01-17, 01:49 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم