Public Sub DdlItem_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim DdlItem As DropDownList = sender
If DdlItem.SelectedValue <> "0|0" Then
Select Case DdlItem.SelectedValue.Split("|")(0)
Case "Delete"
Page.Response.Redirect("BankDelete.aspx?id=" & ModSec.EnText(DdlItem.SelectedValue.Split("|")(1)))
Case "Customer"
Page.Response.Redirect("ChgMemberInfo.aspx?id=" & ModSec.EnText(DdlItem.SelectedValue.Split("|")(1)))
End Select
End If
End Sub
Private Sub DtgList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DtgList.ItemDataBound
If e.Item.ItemIndex >= 0 Then
Dim DdlItem As DropDownList = e.Item.FindControl("DdlItem")
If Not IsDBNull(DdlItem) Then
Dim item_nothing As New ListItem("请选择动作", "0|0") : DdlItem.Items.Add(item_nothing)
Dim item_Manage As New ListItem("删除此款项", "Delete|" & DataBinder.Eval(e.Item, "DataItem.ID")) : DdlItem.Items.Add(item_Manage)
Dim item_Customer As New ListItem("查看客户信息", "Customer|" & DataBinder.Eval(e.Item, "DataItem.Customer")) : DdlItem.Items.Add(item_Customer)
End If
End If
End Sub
Dim DdlItem As DropDownList = sender
If DdlItem.SelectedValue <> "0|0" Then
Select Case DdlItem.SelectedValue.Split("|")(0)
Case "Delete"
Page.Response.Redirect("BankDelete.aspx?id=" & ModSec.EnText(DdlItem.SelectedValue.Split("|")(1)))
Case "Customer"
Page.Response.Redirect("ChgMemberInfo.aspx?id=" & ModSec.EnText(DdlItem.SelectedValue.Split("|")(1)))
End Select
End If
End Sub
Private Sub DtgList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DtgList.ItemDataBound
If e.Item.ItemIndex >= 0 Then
Dim DdlItem As DropDownList = e.Item.FindControl("DdlItem")
If Not IsDBNull(DdlItem) Then
Dim item_nothing As New ListItem("请选择动作", "0|0") : DdlItem.Items.Add(item_nothing)
Dim item_Manage As New ListItem("删除此款项", "Delete|" & DataBinder.Eval(e.Item, "DataItem.ID")) : DdlItem.Items.Add(item_Manage)
Dim item_Customer As New ListItem("查看客户信息", "Customer|" & DataBinder.Eval(e.Item, "DataItem.Customer")) : DdlItem.Items.Add(item_Customer)
End If
End If
End Sub