-- 作者:liujywwy
-- 发布时间:2014/10/20 15:39:00
--
奇怪,好像并没有赋值。请看红色的代码。哪里有问题?
Dim TextBox1 As String Dim r As Row = Tables("需求主表").Current
If e.DataCol.name="审核通过" Then If e.DataRow("审核通过") Then If r.IsNull("邮件通知") = True OrElse 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通知了相关研发测试人员!","博达软件管理系统") TextBox1 = User.Name & " " & Date.Now & " " & e.DataRow("需求编号") & e.DataRow("审核通过") 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通知了需求提交人员!","博达软件管理系统") TextBox1 = User.Name & " " & Date.Now & " " & e.DataRow("需求编号") & e.DataRow("审核不通过") 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
|