以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求助:如何计算物品入库中入库物品的种数 如何查找并显示当前库存小于300的物品 并全部显示出来如:白菜,库存100需采购200|牛肉,库存100需采购200 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=53518) |
-- 作者:李孝春 -- 发布时间:2014/7/9 17:46:00 -- 求助:如何计算物品入库中入库物品的种数 如何查找并显示当前库存小于300的物品 并全部显示出来如:白菜,库存100需采购200|牛肉,库存100需采购200 求助:如何计算物品入库中入库物品的种数 同一名称的物品只统计一次 内部函数代码如下: Dim xxl As WinForm.TopicBar = Forms("主窗体").Controls("TopicBar1") Dim kg1 As String = "------" Dim jy As WinForm.TopicPage =xxl.Pages("今日信息") jy.Links(1).Text = "今日消费金额【" & DataTables("消费明细").Compute("sum(累计消费)","消费时间 >= #" & Date.Today & " 00:00:00# and 消费时间<= #" & Date.Today & " 23:59:59#") & "】元" jy.Links(0).Text = "今日就餐人数【" & DataTables("消费信息").Compute("sum(就餐人数)","就餐时间 >= #" & Date.Today & " 00:00:00# and 就餐时间<= #" & Date.Today & " 23:59:59#") & "】人" jy.Links(2).Text = "今日结账金额【" & DataTables("结账登记").Compute("sum(消费金额)","结账时间 >= #" & Date.Today & " 00:00:00# and 结账时间<= #" & Date.Today & " 23:59:59#") & "】人" Dim A1 As Integer = DataTables("消费明细").Compute("sum(累计消费)","消费时间 >= #" & Date.Today & " 00:00:00# and 消费时间<= #" & Date.Today & " 23:59:59#") Dim b1 As Integer = DataTables("结账登记").Compute("sum(消费金额)","结账时间 >= #" & Date.Today & " 00:00:00# and 结账时间<= #" & Date.Today & " 23:59:59#") Dim c1 As Integer c1 = a1-b1 jy.Links(3).Text = "尚未结账金额【" & c1 & "】元" Dim jy1 As WinForm.TopicPage =xxl.Pages("历史信息") jy1.Links(1).Text = "历史营业金额【" & DataTables("消费明细").Compute("sum(累计消费)") & "】元" jy1.Links(0).Text = "历史就餐人数【" & DataTables("消费信息").Compute("sum(就餐人数)") & "】人" \'CUNumber jy1.Links(2).Text = "历史结账金额【" & DataTables("结账登记").Compute("sum(消费金额)") & "】元" Dim A As Integer = DataTables("消费明细").Compute("sum(累计消费)") Dim b As Integer = DataTables("结账登记").Compute("sum(消费金额)") Dim c As Integer c = a-b jy1.Links(3).Text = "尚未结账金额【" & c & "】元" \'CUMoney(DataTables("消费明细").Compute("sum(累计消费)")) Dim jy2 As WinForm.TopicPage =xxl.Pages("物品信息") Dim cnt As Integer = DataTables("入库出库").Select("库存 <= 300").Count If cnt > 0 Then Tables("入库出库").filter = "库存 <= 300" \'messagebox.show("总共有" & cnt & "件物品急需采购!","提 示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If jy2.Links(3).Text = "急需采购物品【" & cnt & "】种" ‘如:白菜,库存100需采购200|牛肉,库存100需采购200 jy2.links(2).text = "今日入库物品【" & DataTables("入库出库").Compute("sum(_Identify)","入库时间 >= #" & Date.Today & " 00:00:00# and 入库时间<= #" & Date.Today & " 23:59:59#") & "】种【" & DataTables("入库出库").Compute("sum(入库)","入库时间 >= #" & Date.Today & " 00:00:00# and 入库时间<= #" & Date.Today & " 23:59:59#") & "】件" jy2.links(1).text = "今日出库物品【" & DataTables("入库出库").Compute("sum(出库)","出库时间 >= #" & Date.Today & " 00:00:00# and 出库时间<= #" & Date.Today & " 23:59:59#") & "】件" 求助:如何查找并显示当前库存小于300的物品 并全部显示出来如:白菜,库存100需采购200|牛肉,库存100需采购200 并显示在框内
[此贴子已经被作者于2014-7-10 10:04:29编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/7/9 18:08:00 -- 问题二:
jy2.links(2).text = "今日入库物品【" & DataTables("入库出库").Compute("count(物品名称)","入库时间 >= #" & Date.Today & " 00:00:00# and 入库时间<= #" & Date.Today & " 23:59:59#") & "】种" |
-- 作者:有点甜 -- 发布时间:2014/7/9 18:22:00 -- 问题一
Dim ls As List(Of String) = DataTables("入库出库").GetValues("物品名称", "库存 <= 300 and 物品名称 is not null") |
-- 作者:李孝春 -- 发布时间:2014/7/10 10:04:00 -- 回复:(有点甜) 问题一 Dim ls As Li... 谢谢有点甜老师 |