?? order_detail_search_control.ascx.vb
字號:
?Imports System.Data
Imports OrderDll.C_SQLUtil
Partial Class Order_Detail_Search_Control
Inherits System.Web.UI.UserControl
Dim strClientID As String
Dim strOrderId As String
Dim strProductID As String
Dim strSql As StringBuilder
Dim ds As New dataset
Private Const MESSAGEID As String = "MESSAGEID"
Public Event msgSubPanel(ByVal MsgDescription As String)
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
strOrderId = Trim(txtOrderID.Text.ToString)
strClientID = Trim(txtClientID.Text.ToString)
strSql = New StringBuilder("")
strSql.AppendLine("SELECT")
strSql.AppendLine("OrderList.OrderId as OrderId,")
strSql.AppendLine("OrderList.ClientId as ClientId,")
strSql.AppendLine("OrderList.ProductId as ProductId,")
strSql.AppendLine("OrderList.OrderNumber as OrderNumber,")
strSql.AppendLine("OrderList.OrderDate as OrderDate,")
strSql.AppendLine("OrderList.DeliveryDate as DeliveryDate")
strSql.AppendLine("FROM")
strSql.AppendLine("OrderList")
If strOrderId <> "" OrElse strClientID <> "" Then
strSql.AppendLine("WHERE")
If strOrderId <> "" Then
strSql.AppendLine("OrderId = " & strOrderId)
End If
If strClientID <> "" Then
If strOrderId <> "" Then
strSql.AppendLine("AND")
strSql.AppendLine("ClientId = " & strClientID)
Else
strSql.AppendLine("ClientId = " & strClientID)
End If
End If
End If
ds = OrderDll.C_SQLUtil.fExecuteDataset(strSql.ToString)
Session("ds") = ds
gdvSearch.DataSource = ds
gdvSearch.DataBind()
If ds.Tables(0).Rows.Count = 0 Then
Session(MESSAGEID) = 0
RaiseEvent msgSubPanel("無符合條件的數據")
Else
Session(MESSAGEID) = 0
RaiseEvent msgSubPanel("查找成功")
End If
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -