📄 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 + -