Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
Dim Page As WinForm.TopicPage
Dim dr As DataRow = e.DataRow
Dim d As Date = dr("开piao月份")
Dim y As Integer = d.Year
Dim m As Integer = d.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim cnt1 As Integer = DataTables("开piao资料").Compute("Count(销售数量)", "开piao月份 >= #" & dt1 & "# And D <= #" & dt2 & "#")
Dim cnt2 As Integer = DataTables("开piao资料").Compute("Count(销售金额)", "开piao月份 >= #" & dt1 & "# And D <= #" & dt2 & "#")
Page = e.Form.Controls("TopicBar1").Pages.Add("本月销售", "本月销售")
Page.Links.Add("销售数量", "销售数量(" & cnt1 & ")")
Page.Links.Add("销售金额", "销售金额(" & cnt2 & ")")
提示这句活错误,Dim dr As DataRow = e.DataRow 在表格是这样变量的,,在窗口要怎么改的,不会了,老师给讲解一下谢谢
老师在请教一下,,数据表不是有选择行,执行代码,直接刷新窗口的TopicBar1是不是可以做到的,,好比鼠标在窗口经过导航栏自动刷新TopicBar1
If Tables("开piao资料").Current IsNot Nothing Then
Dim dr As DataRow = Tables("开piao资料").Current.DataRow
Dim Page As WinForm.TopicPage
Dim d As Date = dr("开piao月份")
Dim y As Integer = d.Year
Dim m As Integer = d.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim cnt1 As Integer = DataTables("开piao资料").Compute("sum(销售数量)", "开piao月份 >= #" & dt1 & "# And 开piao月份 <= #" & dt2 & "#")
Dim cnt2 As Integer = DataTables("开piao资料").Compute("sum(销售金额)", "开piao月份 >= #" & dt1 & "# And 开piao月份 <= #" & dt2 & "#")
Dim tpb As WinForm.TopicBar = Forms("导航目录").Controls("TopicBar1")
If tpb.Pages("本月销售") Is Nothing Then
Page = tpb.Pages.Add("本月销售", "本月销售")
Page.Links.Add("销售数量", "销售数量(" & cnt1 & ")")
Page.Links.Add("销售金额", "销售金额(" & cnt2 & ")")
Else
Page = tpb.Pages("本月销售")
Page.Links("销售数量").Text = "销售数量(" & cnt1 & ")"
Page.Links("销售金额").Text = "销售金额(" & cnt2 & ")"
End If
End If
谢谢老师,,已经实现了,,变量这里我加了个窗口就会跟新了