.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2014.10.16.1
错误所在事件:监造日志,CurrentChanged
详细错误信息:
未将对象引用设置到对象的实例。
CurrentChanged的代码如下:
If Forms("监造日志窗口").Opened Then
Dim fm As WinForm.FileManager = Forms("监造日志窗口").Controls("FileManager1")
Dim tv As Date = Tables("监造日志").Current("填报日期")
Dim tp As TimeSpan = Date.Today - tv
If tp.TotalDays >= 1 Then '如果订单已经超过1天
forms("监造日志窗口").controls("TextBox1").Enabled=False
fm.DeleteCommand.Visible = False
fm.ClearCommand.Visible = False
fm.AddCommand.Visible = False
Else
forms("监造日志窗口").controls("TextBox1").Enabled=True
fm.DeleteCommand.Visible = True
fm.ClearCommand.Visible = True
fm.AddCommand.Visible = True
End If
End If
If Forms("监造日志窗口").Opened Then
Dim fn As WinForm.PictureViewer = Forms("监造日志窗口").Controls("PictureViewer1")
Dim tv As Date = Tables("监造日志").Current("填报日期")
Dim tp As TimeSpan = Date.Today - tv
If tp.TotalDays >= 1 Then '如果订单已经超过1天
fn.DeleteCommand.Visible = False
fn.ClearCommand.Visible = False
fn.AddCommand.Visible = False
Else
fn.DeleteCommand.Visible = True
fn.ClearCommand.Visible = True
fn.AddCommand.Visible = True
End If