以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 整列数据重置时提示出错,但一行一行剪切刷新就没有错误。这有可能是什么问题呢? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=154750) |
-- 作者:旭日生 -- 发布时间:2020/9/25 17:41:00 -- 整列数据重置时提示出错,但一行一行剪切刷新就没有错误。这有可能是什么问题呢? ![]() ![]() |
-- 作者:有点蓝 -- 发布时间:2020/9/25 17:42:00 -- 贴出事件完整代码 |
-- 作者:旭日生 -- 发布时间:2020/9/25 18:00:00 -- Dim file As String = e.DataRow("路径文件名") \' MessageBox.Show(file) If FileSys.FileExists(file) Then Dim img As image = getImage(file) Dim PICH As Integer = img.Height.ToString() Dim PICW As Integer = img.Width.ToString() If file.EndsWith(".jpg") OrElse file.EndsWith(".png") Then e.DataRow("图像大小")= PICH & "*" & PICW & "DPI" If Math.Round((PICW * PICH)/(2480*3507),1) < 1.2 Then ’感觉主要出错在此段 e.DataRow("折算A4页数量") = 1 \' MessageBox.Show(Math.Round((PICW * PICH)/(2480*3507),1)) ElseIf Math.Round((PICW * PICH)/(2480*3507),1) >= 1.2 AndAlso Math.Round((PICW * PICH)/(2480*3507),1) <= 1.8 Then e.DataRow("折算A4页数量") = 2 ElseIf Math.Round((PICW * PICH)/(2480*3507),1) > 1.8 AndAlso Math.Round((PICW * PICH)/(2480*3507),1) <= 2.4 Then e.DataRow("折算A4页数量") = 3 ElseIf Math.Round((PICW * PICH)/(2480*3507),1) >2.4 AndAlso Math.Round((PICW * PICH)/(2480*3507),1) <= 3.4 Then e.DataRow("折算A4页数量") = 4 Else e.DataRow("折算A4页数量") = 5 End If End If Else e.DataRow("图像大小") = " " \' MessageBox.Show(4) End If [此贴子已经被作者于2020/9/25 18:02:00编辑过]
|
-- 作者:旭日生 -- 发布时间:2020/9/25 18:11:00 -- 感觉代码没有问题。但利用“重置列”和“多行剪切批量重置”时,就会出现1楼问题。单行剪切或少量剪切时,就没有1楼问题了。 |
-- 作者:有点蓝 -- 发布时间:2020/9/27 8:45:00 -- 确定是完整代码?先看看:http://www.foxtable.com/webhelp/topics/1522.htm |