|
 |
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
 |
กระทู้ #3080 [Vb] (จาก IP: 115.87.181.216)
ขอโค้ดค้นหา 2008 แบบคลิกเลือกได้หน่อยคะ
ขอโค้ดค้นหาหน่อยคะ แบบที่เวลาพิม ชื่อจริงไป แล้วคลิก Enter หรือคลิกที่ botton ค้นหา แล้วคนที่มีชื่อจริง เช่น สมชาย จะขึ้นมาให้เราเลือกคลิกได้อ่าคะ แล้วรายละเอียดจะไปโผล่ที่เท็กบ๊อกที่เราเชื่อมฐานข้อมูลมา
|
จากคุณ
:
กิ๊ก / ubolrat_zaza@hotmail.com [2011-06-13 20:17:37]
|
|
ความคิดเห็น #28455 (จาก IP: 61.90.149.29)
Dim i As Integer = 0 Dim cc As Integer = 0 If (txtserch.Text = "") Then MessageBox.Show("กรุณาข้อมูลให้ครบ", "ผลการทำงาน", MessageBoxButtons.OK, MessageBoxIcon.Information) Else
End If 'sqlfish = "Select * from tblOrderDetails where Order_ID Like '%" & txtserch.Text & "%'" With ds.Tables("tblOrderDetails") If ComboBox1.Text = "เลขที่ใบสั่งซื้อ" Then .DefaultView.RowFilter = "Order_ID Like '%" & txtserch.Text & "%'" ElseIf ComboBox1.Text = "รหัสสินค้า" Then .DefaultView.RowFilter = "Product_ID Like '%" & txtserch.Text & "%'"
If BindingContext(ds, "tblOrderDetails").Position < 0 Then With grdBookType MsgBox("Database Is Empty !", MsgBoxStyle.Information, "Inventory System") Exit Sub End With ElseIf .DefaultView.Count = 0 Then MsgBox("Data Not Found !", MsgBoxStyle.Information, "Inventory System") ComboBox1.Focus() ElseIf txtserch.Text <> "" And ComboBox1.Text <> "" And .DefaultView.Count <> 0 Then MsgBox("Data Found : " & .DefaultView.Count.ToString(), MsgBoxStyle.Information, "Inventory System") End If
If IsFind = True Then ds.Tables("tblOrderDetails").Clear() End If
da = New OleDbDataAdapter(sqlfish, conn) da.Fill(ds, "tblOrderDetails")
If ds.Tables("tblOrderDetails").Rows.Count <> 0 Then IsFind = True With grdBookType .AllowNavigation = False .ReadOnly = True .DataSource = ds.Tables("tblOrderDetails") End With Else IsFind = False grdBookType.DataSource = Nothing 'grdBookType.DataSource = .DefaultView End If End If
End With End Sub
********ลองเอาไปประยุกต์ใช้ดูนะครับ |
จากคุณ
:
arm / supoj_4@hotmail.com [2011-08-09 14:57:24]
|
 |
|
- - - - - - - - - - - - - - ผู้ให้การสนับสนุน- - - - - - - - - - - - - -
|
|
|
|
|