If e.DataCol.name="状态" Then
If e.DataRow("状态") = "Published" Then
If r.IsNull("临时版本编号") = True OrElse r.isnull("软件环境") = True OrElse r.isnull("show_version") = True Then
MessageBox.show("请检查,临时版本编号列,软件环境列,show version列不能为空","提示",MessageBoxButtons.OK,MessageBoxIcon.Question)
e.DataRow("状态") = ""
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"
If r.IsNull("邮件通知") = False Then
m.AddReceiver(r("邮件通知"))
End If
If r.IsNull("研发邮箱") = False Then
m.AddReceiver(r("研发邮箱"))
End If
If r.IsNull("技术支持邮箱") = False Then
m.AddReceiver(r("技术支持邮箱"))
End If
m.Title = "博达软件管理系统= = = = = = =" & "需求编号:" & r("需求编号") &"------>临时版本编号:" & r("临时版本编号") & "+" & r("软件环境") & "已发布"
m.C & r("需求编号") &"------>临时版本编号:" & r("临时版本编号") & "+" & r("软件环境") & "已发布"
m.Send
msgbox("临时版本编号:" & r("临时版本编号") & "+" & r("软件环境") & "已发布并mail通知了相关邮件接收者!")
r.locked = True
Else e.DataRow("状态") = ""
End If
End If
End If
For Each cdr As DataRow In r.DataRow.GetChildRows("需求明细表")
cdr("状态") = r("状态")
Next
End If