---------------------------
错误
---------------------------
编译错误:“DataRow”不是“RowColEventArgs”的成员。
错误代码:Dim dr As DataRow = e.DataRow
---------------------------
确定
---------------------------
Dim dr As DataRow = e.DataRow
If dr.IsNull ("楼层") Or Dr.IsNull("房间") Or Dr.IsNull("产品名") Then
MessageBox.show("产品名 必填","提示")
e.cancel = True
Else
If e.Col.name = "图片" Then
baseMainForm.WindowState= Windows.forms.FormWindowState.Minimized
ClipBoard.Clear
Dim proc As new Process
proc.File = ApplicationPath & "/capture.exe"
proc.WaitForClose = True
proc.Start
If ClipBoard.GetImage IsNot Nothing Then
Dim f As String = e.Row("用户ID") & "\" & "3.报价配图" & e.Row("楼层")& "\" & "\" & Format( Date.Today,"yyyy-MM-dd") & "\"& e.Row("产品名") &"-" & e.Row("产品号")&".png"
Dim path As String = e.Col.DataCol.DefaultFolder
If path = "" Then
' "项目文件" & "\" & ProjectPath &
path = Vars("IPM")
'path = ProjectPath & "CYGJ2016/"
End If
basemainform.WindowState = 2
Dim dir As String = FileSys.GetParentPath(path & "/" & f)
If FileSys.DirectoryExists(dir) = False Then FileSys.CreateDirectory(dir)
ClipBoard.GetImage.save(path & "/" & f)
e.Row(e.Col.name) = f
End If
e.cancel = True
Tables("报价清单").Current.Save() '保存文件的行
End If
End If