producingview.aspx.vb

来自「这是一个订单管理系统」· VB 代码 · 共 53 行

VB
53
字号
Imports OrderDll

Partial Class ProducingView
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim strId As String
        strId = Me.Request.QueryString("PID")
        strId = strId.Replace("'", "''")
        If strId <> "" Then
            ProcductInit(strId)
            ViewInit(strId)
        End If
        Me.ProductControl1.strType = "VIEW"
    End Sub

    Private Sub ViewInit(ByVal id As String)
        Dim dsProduce As New Data.DataSet
        Dim cp As New ClassProducing
        Dim count As Integer
        If cp.ViewByID(dsProduce, id) = False Then
            With dsProduce.Tables(0)
                For count = 0 To .Rows.Count - 1
                    TableProducing.Controls.Add(GenrateRow( _
                    .Rows(count).Item(0), _
                    .Rows(count).Item(1)) _
                    )
                Next
            End With
        Else

        End If


    End Sub

    Private Sub ProcductInit(ByVal id As String)

    End Sub

    Private Function GenrateRow(ByVal dt As String, ByVal number As Integer) As TableRow
        Dim tr As New TableRow
        Dim tc As TableCell
        tc = New TableCell
        tc.Text = dt
        tr.Controls.Add(tc)
        tc = New TableCell
        tc.Text = number.ToString()
        tr.Controls.Add(tc)
        Return tr
    End Function
End Class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?