![]() |
|
[سؤال] ملئ button.text باسماء من قاعدة البيانات - نسخة قابلة للطباعة +- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb) +-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182) +--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183) +--- الموضوع : [سؤال] ملئ button.text باسماء من قاعدة البيانات (/showthread.php?tid=10747) الصفحات:
1
2
|
RE: ملئ button.text باسماء من قاعدة البيانات - abid - 06-12-14 هذا كود لملئء button لعلها تنفع الاخوة con.Open() Dim da As New OleDbDataAdapter("select * from ItemsCat", con) Dim ds As New DataSet da.Fill(ds, "ItemsCat") con.Close() Dim lastdsas As Integer = 0 Dim j As Integer = 0 Dim x As New Integer Dim i As Integer Dim b As Button = Nothing For i = lastdsas To lastdsas + 8 - 1 If j = 0 Then b = Button2 If j = 1 Then b = Button3 If j = 2 Then b = Button4 If j = 3 Then b = Button5 If j = 4 Then b = Button6 If j = 5 Then b = Button7 If j = 6 Then b = Button8 If j = 7 Then b = Button9 j = j + 1 If ds.Tables("ItemsCat").Rows.Count > i Then b.Text = ds.Tables("ItemsCat").Rows(i).Item("CatName") b.Tag = ds.Tables("ItemsCat").Rows(i).Item("CatId") End If Next |