vb.net未实现方法或操作

时间:2013-05-09 14:34:12

标签: vb.net datagridview

我有一个数据网格视图,当我单击网格中的Viewdtails按钮时,它会在其下方填充异常详细信息网格。这工作正常,但我有第二个查询填充历史网格供用户查看,但当我取消注释并运行它时,我收到错误“方法或操作未实现”。然后我的第一个查询根本不返回结果。如何重写此操作以运行两个查询并填充两个网格?

   Protected Sub CountAlerts_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles CountAlerts.RowCommand
    If (e.CommandName = "Viewdtails") Then
        Dim index As Integer = Convert.ToInt32(e.CommandArgument)

        Dim abc, Unit, Cell, DTTM, prod, Query As String
        'Dim qry2 As String
        Dim DS As DataSet
        'Dim DS2 As DataSet

        abc = CountAlerts.DataKeys(index).Values("ABC")
        Cell = CountAlerts.DataKeys(index).Values("Cell")
        Unit = CountAlerts.DataKeys(index).Values("Unit")
        DTTM = CountAlerts.DataKeys(index).Values("CycTimeDate")
        prod = CountAlerts.DataKeys(index).Values("ProductDesc")

        For Each irow As GridViewRow In CountAlerts.Rows
            If irow.Attributes("class") = "highlight" Then
                irow.Attributes.Remove("class")
            End If
        Next

        CountAlerts.Rows(index).Attributes("class") = "highlight"
        Query = "EXEC [Audits].[dbo].[DetailsCombined] '" & abc & "', '" & Cell & "', '" & Unit & "', '" & DTTM & "', '" & User.Viewing & "' "
        DS = SelectQuery(Query)
        ExceptionDetails.DataSource = DS
        ExceptionDetails.DataBind()

        'qry2 = "EXEC [Audits].[dbo].[TrackerCombined] '" & abc & "', '" & Cell & "', '" & Unit & "', '" & StartDate.Text & "', '" & EndDate.Text & "', '" & User.Viewing & "' "
        'DS2 = SelectQuery(qry2)
        'ExceptionHist.DataSource = DS2
        'ExceptionHist.DataBind()

    End If
End Sub

0 个答案:

没有答案