需求明细表的“取消”单选按钮CheckedChanged代码如下。目的是当点击了取消后,在临时版本跟踪表的状态栏的值为cancle。
可事实上,当“录入”组点击了取消后,临时版本跟踪表的状态栏的值并没有改变,没有变为cancle。用开发者的账号点击取消,临时版本跟踪表的状态栏的值会变为cancle
请问是怎么回事?是不是权限设置问题?
DataTables.save()
If e.Sender.Checked Then
Dim r As Row = Tables("需求明细表").Current
If r IsNot Nothing Then
If MessageBox.show("请确认此需求需要取消?","博达软件管理系统",MessageBoxButtons.OKCancel,MessageBoxIcon.Question)=DialogResult.OK Then
DataTables("临时版本跟踪表").ReplaceFor("状态", "Cancle", "需求编号 = '" & r("需求编号") & "'")
Forms("发送mail").open
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("邮件通知").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
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("需求编号") & "======" & "抱歉,此需求已经取消特此通知!"
m.Send
Forms("发送mail").close
MessageBox.show("需求编号:" & r("需求编号") & "哈哈,你已经取消了这个需求编号啦!","博达软件管理系统")
r("状态") = "Cancle"
Else
e.sender.Checked = False
End If
End If
End If
DataTables.save()