03-05-18, 03:45 PM
جرب
كود :
Try
(cmd = New MySqlCommand("select pro_name,price_q from project where pro_cod='" & Textpro.Text & "' , con
con.Open()
Dim dr As MySqlDataReader = cmd.ExecuteReader
dr.Read()
If dr.HasRows Then
Textpro.Text = dr(0)
Textprice.Text = dr(0)
Textnum.Focus()
Else
MsgBox("هذا المنتج غير موجود في قائمة المنتجات")
Textpro.Clear()
Textnum.Clear()
Textprice.Clear()
Textpricetak.Clear()
Textpro.Focus()
End If
dr.Close()
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try