以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- mouseentercell (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=95466) |
-- 作者:lk15502 -- 发布时间:2017/1/20 14:10:00 -- mouseentercell 配缸表的“下一工序”列是备注型,里面有较多字符,在mouseentercell事件代码:;今天单元格显示的信息没有了空的,鼠标放到单元格上能显示里面的信息,是什么原因?老师! If e.Col.Name = "下一工序" AndAlso e.Row.IsNull("下一工序") = False Then e.Table.ShowToolTip(e.Row("下一工序"),e.Row,e.Col) End If |
-- 作者:lk15502 -- 发布时间:2017/1/20 14:17:00 -- 窗口有一个“下一工序”列更新的按钮代码:原料单元格可以正常显示,今天加了这句代码就不能显示了:dr1("下一工序") = dr1("下一工序") & vbcrlf & "订单总重量:" & dr1("订单重量") & "计划总重量:" & dr1("计划重量") If _usergroup = "原料坯布仓库" OrElse _userroles.Contains("计划配缸") = True OrElse _userroles.Contains("系统维护") = True Then If Tables("计划配缸通知单").Rows.Count > 0 Then For Each r1 As Row In Tables("计划配缸通知单").Rows r1("下一工序") = Nothing Next Dim dt1 As DataTable = Tables("计划配缸通知单").DataTable Dim dt2 As DataTable = DataTables("染色生产表") \'已染色 Dim dt3 As DataTable = DataTables("烘剪产量表") \'已烘剪 Dim dt4 As DataTable = DataTables("定型产量表") \'已打包称重 Dim dt5 As DataTable = DataTables("成品入库表") \'已入库 Dim dt6 As DataTable = DataTables("成品库存表") \'已库存 Dim dt7 As DataTable = DataTables("成品出库表") \'已出库 For Each dr1 As DataRow In dt1.Select("配缸 = true and 缸号 is not null") dr1("下一工序") = dr1("下一工序") & vbcrlf & "订单总重量:" & dr1("订单重量") & "计划总重量:" & dr1("计划重量") Dim dr2s As List(Of DataRow) = dt2.SQLSelect("缸号 = \'" & dr1("缸号") & "\' and 流转日期 is not null") If dr2s.Count > 0 Then For Each dr2 As DataRow In dr2s If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已染色:" & "染色编号" & "-" & dr2("染色编号") & "|" & "流转日期" & "-" & dr2("流转日期") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已染色:" & "染色编号" & "-" & dr2("染色编号") & "|" & "流转日期" & "-" & dr2("流转日期") End If Next End If Dim dr3s As List(Of DataRow) = dt3.SQLSelect("缸号 = \'" & dr1("缸号") & "\' And 流转日期 Is not null") If dr3s.Count > 0 Then For Each dr3 As DataRow In dr3s If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已烘剪:" & "烘剪编号" & "-" & dr3("烘剪编号") & "|" & "流转日期" & "-" & dr3("流转日期") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已烘剪:" & "烘剪编号" & "-" & dr3("烘剪编号") & "|" & "流转日期" & "-" & dr3("流转日期") End If Next End If Dim dr4s As List(Of DataRow) = dt4.SQLSelect("缸号 = \'" & dr1("缸号") & "\' and 加工类型 = \'打包称重\' and 下一工序 = \'成品仓库\' and 流转日期 is not null") If dr4s.count > 0 Then For Each dr4 As DataRow In dr4s If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已打包称重:" & "定型编号" & "-" & dr4("定型编号") & "|" & "定型重量" & "-" & dr4("定型重量") & "|" & "定型匹数" & "-" & dr4("定型匹数") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已打包称重:" & "定型编号" & "-" & dr4("定型编号") & "|" & "定型重量" & "-" & dr4("定型重量") & "|" & "定型匹数" & "-" & dr4("定型匹数") End If Next End If Dim dr5s As List(of DataRow) = dt5.SQLSelect("缸号 like \'%" & dr1("缸号") & "%\'") Dim zl5 As Double = 0 If dr5s.count > 0 Then For Each dr5 As DataRow In dr5s zl5 = zl5 + dr5("重量") If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已入库:" & "入库编号" & "-" & dr5("入库编号") & "|" & "重量" & "-" & dr5("重量") & "|" & "匹数" & "-" & dr5("匹数") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已入库:" & "入库编号" & "-" & dr5("入库编号") & "|" & "重量" & "-" & dr5("重量") & "|" & "匹数" & "-" & dr5("匹数") End If Next End If Dim dr6s As List(of DataRow) = dt6.SQLSelect("缸号 like \'%" & dr1("缸号") & "%\'") If dr6s.count > 0 Then For Each dr6 As DataRow In dr6s If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已库存:" & "入库编号" & "-" & dr6("入库编号") & "|" & "重量" & "-" & dr6("重量") & "|" & "匹数" & "-" & dr6("匹数") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已库存:" & "入库编号" & "-" & dr6("入库编号") & "|" & "重量" & "-" & dr6("重量") & "|" & "匹数" & "-" & dr6("匹数") End If Next End If Dim dr7s As List(of DataRow) = dt7.SQLSelect("缸号 like \'%" & dr1("缸号") & "%\'") If dr7s.count > 0 Then Dim zl7 As Double = 0 For Each dr7 As DataRow In dr7s zl7 = zl7 + dr7("重量") If dr1.isnull("下一工序") = True Then dr1("下一工序") = "已出库:" & "出库编号" & "-" & dr7("出库编号") & "|" & "重量" & "-" & dr7("重量") & "|" & "匹数" & "-" & dr7("匹数") Else dr1("下一工序") = dr1("下一工序") & vbcrlf & "已出库:" & "出库编号" & "-" & dr7("出库编号") & "|" & "重量" & "-" & dr7("重量") & "|" & "匹数" & "-" & dr7("匹数") End If Next If zl7 > 0 AndAlso zl5 > 0 AndAlso zl7 < zl5 Then dr1("下一工序") = dr1("下一工序") & vbcrlf & "已部分完成" ElseIf zl7 > 0 AndAlso zl5 > 0 AndAlso zl7 = zl5 Then dr1("下一工序") = dr1("下一工序") & vbcrlf & "已完成" End If End If Next dt1.save End If Else MessageBox.Show("您没有操作权限!","提示") End If |
-- 作者:有点色 -- 发布时间:2017/1/20 14:35:00 -- 你把行拉高一些就能看到了吧?是不是第一行是回车字符了?
dr1("下一工序") = dr1("下一工序") & vbcrlf & "订单总重量:" & dr1("订单重量") & "计划总重量:" & dr1("计划重量")
要改成
dr1("下一工序") = iif(dr1.IsNull("下一工序"), "", dr1("下一工序") & vbcrlf) & "订单总重量:" & dr1("订单重量") & "计划总重量:" & dr1("计划重量") |
-- 作者:lk15502 -- 发布时间:2017/1/20 15:29:00 -- 老师是这个原因; iif(dr1.IsNull("下一工序"),要在逗号之前加空格,否者报错! |