16,554
社区成员
发帖
与我相关
我的任务
分享
Public Sub DDLNode()
Dim ds As New DataSet
ds = DB_SicManage.GetYBindNodeName()
Dim dtn As New DataTable
dtn = ds.Tables(0)
ddlBindNode(Me.ddlCNode, dtn)
End Sub
Public Sub ddlBindNode(ByVal ddl As DropDownList, ByVal dt As DataTable)
ddl.DataSource = dt
ddl.DataTextField = "name"
ddl.DataValueField = "nodeId"
ddl.DataBind()
Dim item As New ListItem()
item.Text = "--请选择--"
item.Value = "0"
item.Selected = True
ddl.Items.Add(item)
End Sub
Public Sub DDLNode()
Dim ds As New DataSet
If DB_SicManage Is Nothing Then
MsgBox("DB_SicManage is nothing")
Exit Sub
End If
ds = DB_SicManage.GetYBindNodeName()
Dim dtn As New DataTable
If ds Is Nothing Then
MsgBox("ds is nothing")
Exit Sub
End If
dtn = ds.Tables(0)
ddlBindNode(Me.ddlCNode, dtn)
End Sub