If e.DataCol.Name = "需求编号" Then
If e.NewValue Is Nothing Then
e.DataRow("技术支持邮箱") = Nothing
e.DataRow("研发邮箱") = Nothing
e.DataRow("期望交期") = Nothing
Else
Dim dr As DataRow
dr = DataTables("需求明细表").Find("[需求编号] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("技术支持邮箱") = dr("技术支持邮箱")
e.DataRow("研发邮箱") = dr("研发邮箱")
e.DataRow("期望交期") = dr("版本期望交期")
End If
End If
End If
Dim r As Row = Tables("需求主表").Current
If e.DataCol.name="审核通过" Then
If e.DataRow("审核通过") Then
If r.IsNull("邮件通知") = True Then
MessageBox.show("请对邮件通知下拉列选择通知人员","博达软件管理系统",MessageBoxButtons.OK,MessageBoxIcon.Warning)
e.DataRow("审核通过") = "false"
Else
If MessageBox.show("请核实已审核的需求","博达软件管理系统",MessageBoxButtons.OKCancel,MessageBoxIcon.Question)=DialogResult.OK Then
Dim m As New MailSender
m.Host = "mail.bdcom.com.cn"
m.Account = "version@bdcom.com.cn"
m.Password = "version"
m.From = "version@bdcom.com.cn"
m.To = r("邮件通知").Replace(vbcrlf, ",").Replace(chr(13), ",").Replace(chr(10), ",")
If r.IsNull("研发邮箱") = False Then
m.AddReceiver(r("研发邮箱").Replace(vbcrlf, ",").Replace(chr(13), ",").Replace(chr(10), ","))
End If
If r.IsNull("附加通知人员") = False Then
m.AddReceiver(r("附加通知人员").Replace(vbcrlf, ",").Replace(chr(13), ",").Replace(chr(10), ","))
End If
m.Title = "博达软件管理系统= = = = = = =" & "需求编号:" & r("需求编号") & "-----此需求已审核,请研发和测试尽快处理"
m.C & r("需求编号") & " 期望交期:" & r("期望交期")
m.Send
MessageBox.show("需求编号:" & r("需求编号") & "------>" & "此需求已审核通过并mail通知了相关研发测试人员!","博达软件管理系统")
Select Case e.DataCol.Name
Case "审核通过"
Tables("需求主表").Filter = "审核通过 = False And 审核不通过 = False"
End Select
For Each cdr As DataRow In r.DataRow.GetChildRows("需求明细表")
cdr("状态") = r("审核通过")
Next
If r.DataRow.GetChildRows("临时版本跟踪表").Count = 0 Then
Dim dr As DataRow = DataTables("临时版本跟踪表").AddNew()
dr("需求编号") = r("需求编号")
End If
Else
e.DataRow("审核通过") = False
End If
End If
End If
End If
DataTables.Save()
If e.DataCol.name="审核不通过" Then
If e.DataRow("审核不通过") Then
If r.IsNull("审核未通过原因") = True Then
MessageBox.show("请检查,审核未通过原因列不能为空","博达软件管理系统",MessageBoxButtons.OK,MessageBoxIcon.Warning)
e.DataRow("审核不通过") = "false"
Else
If MessageBox.show("请核实未审核通过的需求","博达软件管理系统",MessageBoxButtons.OKCancel,MessageBoxIcon.Question)=DialogResult.OK Then
Dim m As New MailSender
m.Host = "mail.bdcom.com.cn"
m.Account = "version@bdcom.com.cn"
m.Password = "version"
m.From = "version@bdcom.com.cn"
m.To = r("技术支持邮箱")
m.Title ="博达软件管理系统= = = = = = =" & "需求编号:" & r("需求编号") & "-----此需求审核未通过,请地方技术支持修改并再次提交需求"
m.C & r("需求编号") & " 审核未通过原因:" & r("审核未通过原因")
m.Send
MessageBox.show("需求编号:" & r("需求编号") & "------>" & "此需求未审核通过并mail通知了需求提交人员!","博达软件管理系统")
Select Case e.DataCol.Name
Case "审核不通过"
Tables("需求主表").Filter = "审核通过 = False And 审核不通过 = False"
End Select
For Each cdr As DataRow In r.DataRow.GetChildRows("需求明细表")
cdr("状态") = r("审核通过")
Next
Else
e.DataRow("审核不通过") = False
End If
End If
End If
End If
DataTables.Save()
点击审核,发现报错,如附件。看不懂出错原因,之前一直没有出过这样的报错。

此主题相关图片如下:提示.png


此主题相关图片如下:报错.png