Dim ad As SqlDataAdapter = New SqlDataAdapter(strSQLFee, myConnection)
Dim ds As DataSet = New DataSet
ad.Fill(ds, "View_Fumi_Charge")
'如果内容为空,则显示表头
If ds.Tables(0).Rows.Count = 0 Then
ds.Tables(0).Rows.Add(ds.Tables(0).NewRow)
GridView1.DataSource = ds
GridView1.DataBind()
Dim ColumnCount As Integer = GridView1.Rows(0).Cells.Count
GridView1.Rows(0).Cells.Clear()
GridView1.Rows(0).Cells.Add(New TableCell)
GridView1.Rows(0).Cells(0).ColumnSpan = ColumnCount
' gridview1.rows(0).cells(0).text="无没记录"
Else
GridView1.DataSource = ds
GridView1.DataBind()
End If
Dim ds As DataSet = New DataSet
ad.Fill(ds, "View_Fumi_Charge")
'如果内容为空,则显示表头
If ds.Tables(0).Rows.Count = 0 Then
ds.Tables(0).Rows.Add(ds.Tables(0).NewRow)
GridView1.DataSource = ds
GridView1.DataBind()
Dim ColumnCount As Integer = GridView1.Rows(0).Cells.Count
GridView1.Rows(0).Cells.Clear()
GridView1.Rows(0).Cells.Add(New TableCell)
GridView1.Rows(0).Cells(0).ColumnSpan = ColumnCount
' gridview1.rows(0).cells(0).text="无没记录"
Else
GridView1.DataSource = ds
GridView1.DataBind()
End If