以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 请问这段代码那里出错了? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=192659) |
-- 作者:9EQ98 -- 发布时间:2024/7/9 23:32:00 -- 请问这段代码那里出错了? e.Form.Controls("所有记录").Checked = True Dim 操作表 As WinForm.Table = e.Form.Controls("样品明细") Dim MT As Table = 操作表.Table For Each R As Row In MT.Rows Dim FDR As Row = R MT.Position = R.Index Dim 记录ID As Integer = FDr("_Identify") Dim Fil As String = "_Identify = " & 记录ID & "" Dim CFil As String = " 记录ID = " & 记录ID If FDr.IsNull("应签收数量") OrElse Fdr("签收完成") = False Then If FDr("审批数量") > 0 Then FDr("应签收数量") = FDr("审批数量") Else If FDr("审核数量") > 0 Then FDr("应签收数量") = FDr("审核数量") Else If FDr("计划数量") > 0 Then FDr("应签收数量") = FDr("计划数量") End If End If End If End If Dim 缺陷列表 As String = "" Dim drs As List(Of DataRow) = DataTables("样品签收日志").SQLSelect(CFil) For Each LR As DataRow In DRS 缺陷列表 = 缺陷列表 & LR("缺陷记录") & "|" Next 缺陷列表 = Functions.Execute("List_Bis", 缺陷列表) If drs.Count > 0 Then FDr("缺陷记录") = 缺陷列表 FDr("签收数量") = DataTables("样品签收日志").SQLCompute("Sum(本次签收数量)", CFil) FDr("出瓷总数") = DataTables("样品签收日志").SQLCompute("Sum(本次出瓷数量)", CFil) FDr("不合格数量") = DataTables("样品签收日志").SQLCompute("Sum(不合格数量)", CFil) FDr("出样批次") = DataTables("样品签收日志").SQLCompute("Count(*)", CFil) FDr("签收下差数") = FDr("应签收数量") - fdr("签收数量") If FDr("签收数量") > 0 AndAlso FDr("应签收数量") > 0 Then If FDr("签收下差数") <= 0 Then FDr("签收完成") = True End If End If Dim FFDr As DataRow = DataTables("样品签收日志").SQLFind(CFil, "签收日期 Desc") If FFDr IsNot Nothing Then Fdr("今日缺陷") = FFDr("缺陷记录") Fdr("今日签收") = FFDr("本次签收数量") Fdr("今日出瓷") = FFDr("本次出瓷数量") FDr("最近签收日期") = FFDr("签收日期") End If Else FDr("缺陷记录") = "" FDr("签收数量") = Nothing FDr("出瓷总数") = Nothing FDr("不合格数量") = Nothing FDr("出样批次") = Nothing FDr("签收下差数") = Nothing FDr("签收完成") = False Fdr("今日缺陷") = Nothing Fdr("今日签收") = Nothing Fdr("今日出瓷") = Nothing FDr("最近签收日期") = Nothing End If _跳过全局表事件 = True FDr.Save Next MessageBox.Show("统计完成") |
-- 作者:有点蓝 -- 发布时间:2024/7/10 8:31:00 -- 调试技巧:http://www.foxtable.com/webhelp/scr/1485.htm,看哪一句代码出错 |