Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim _q = Request.QueryString("q")
If (_q IsNot Nothing) Then
If _q.Trim() <> "" Then
Dim db As New dbIndirectDataContext()
Dim ts = From t In db.Products
Where t.Product_ID.Contains(_q)
Order By t.Product_ID Descending
Select New With {
.Product_ID = t.Product_ID,
.Product_Name = t.Product_Name,
.Product_Detail = t.Product_Detail,
.Product_Unit = t.Product_Unit,
.Product_Price = t.Product_Price,
.Product_Quantity = t.Product_Quantity
}
If ts.Rows.Count > 0 Then
TextName.Text = ts.Rows(0)("Product_Name")
End If
Else
Response.RedirectPermanent("StockIN.aspx")
End If
End If
End Sub
Protected Sub cmdSearch_Click(sender As Object, e As System.EventArgs) Handles cmdSearch.Click
If textID.Text.Trim() <> "" Then
Response.RedirectPermanent("StockIN.aspx?q=" & textID.Text.Trim())
End If
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim _q = Request.QueryString("q")
If (_q IsNot Nothing) Then
If _q.Trim() <> "" Then
Dim db As New dbIndirectDataContext()
Dim ts = From t In db.Products
Where t.Product_ID.Contains(_q)
Order By t.Product_ID Descending
Select New With {
.Product_ID = t.Product_ID,
.Product_Name = t.Product_Name,
.Product_Detail = t.Product_Detail,
.Product_Unit = t.Product_Unit,
.Product_Price = t.Product_Price,
.Product_Quantity = t.Product_Quantity
}
If ts.Count() > 0 Then
Dim a As New
TextName.Text = a.GetType()
TextDetail.Text = a.GetType()
TextUnit.Text = a.GetType()
TextPrice.Text = ts.GetType()
TextQuantity.Text = ts.GetType()
End If
Else
Response.RedirectPermanent("StockIN.aspx")
End If
End If