代码如下:点击"通知_状态"、"签收_状态"、"签收_审核"不能执行对应后面代码,请帮修改,谢谢!
'列表项目,3级列值
If e.DataCol.Name = "收报单位" OrElse e.DataCol.Name = "通知_姓名" Then
If e.DataRow("收报时间") = Nothing OrElse e.DataRow("收报编号") = "" OrElse e.DataRow("来电单位") = "" OrElse e.DataRow("电文标题及文号") = "" OrElse e.DataRow("等级") = "" OrElse e.DataRow("密级") = "" OrElse e.DataRow("页数") = Nothing OrElse e.DataRow("收报编号") = "" Then
MessageBox.Show("将'空白'栏的信息录入后,再选择单位.","提示")
e.DataRow("收报单位") = Nothing
Else
'标识_位置3:logo,Location,解除当前锁定.
Dim bsloc3 As DataRow '查找行
bsloc3 = DataTables("参数").Find("[标识_位置] = '位置3'")
If e.DataRow("收报单位") = bsloc3("标识_名称") Then
e.DataRow("通知_姓名") = _Username
Dim dr1 As DataRow
dr1 = DataTables("Users").Find("[Group] = '" & e.DataRow("收报单位") & "' And [Name] = '" & e.DataRow("通知_姓名") & "'")
If dr1 IsNot Nothing Then
e.DataRow("通知_座机") = dr1("座机")
e.DataRow("通知_短信手机") = dr1("短信手机")
e.DataRow("通知_手机") = dr1("手机")
End If
e.DataRow("通知_状态") = True
e.DataRow("通知_姓名") = _UserName
e.DataRow("姓名身份证_通知") = _UserNameCard
e.DataRow("通知_时间") = Date.Now
e.DataRow("签收_状态") = True
e.DataRow("签收_姓名") = _UserName
e.DataRow("姓名身份证_签收") = _UserNameCard
Dim czdr1 As DataRow '查找行
czdr1 = DataTables("Users").Find("[姓名身份证] = '" & _UserNameCard & "'")
If czdr1 IsNot Nothing Then
e.DataRow("签收_标准照") = czdr1("标准照")
End If
e.DataRow("签收_时间") = Date.Now
e.DataRow("签收_审核") = True
e.DataRow("签收_姓名") = _UserName
e.DataRow("姓名身份证_审核") = _UserNameCard
e.DataRow("签收_审核时间") = Date.Now
'复制相关信息到密收办理
Dim dr3 As DataRow
dr3 = DataTables("密收办理").Find("[收报编号] = '" & e.DataRow("收报编号") & "'")
If dr3 Is Nothing Then
Dim nma() As String = {"来电单位","来电编号","电文标题及文号","等级","密级","页数","收报编号"} '密收登记表数据来源列
Dim nmb() As String = {"来电单位","来电编号","电文标题及文号","等级","密级","页数","收报编号"} '密收办理表数据接收列
Dim dr2 As DataRow = DataTables("密收办理").AddNew
For i As Integer = 0 To nma.Length - 1
dr2(nmb(i)) = e.DataRow(nma(i))
Next
End If
Else
'通知状态,通知
Dim dr1 As DataRow
dr1 = DataTables("Users").Find("[Group] = '" & e.DataRow("收报单位") & "' And [Name] = '" & e.DataRow("通知_姓名") & "'")
If dr1 IsNot Nothing Then
e.DataRow("通知_座机") = dr1("座机")
e.DataRow("通知_短信手机") = dr1("短信手机")
e.DataRow("通知_手机") = dr1("手机")
End If
'通知状态,状态
If e.DataRow("通知_状态") = True Then
e.DataRow("通知_值机") = _UserName
e.DataRow("姓名身份证_通知") = _UserNameCard
e.DataRow("通知_时间") = Date.Now
Else
e.DataRow("通知_状态") = False
e.DataRow("通知_值机") = Nothing
e.DataRow("姓名身份证_通知") = Nothing
e.DataRow("通知_时间") = Nothing
End If
'签收状态,签收
If e.DataRow("签收_状态") = True And e.DataRow("收报单位") = _UserGroup Then
Dim czdr1 As DataRow '查找行
czdr1 = DataTables("Users").Find("[姓名身份证] = '" & _UserNameCard & "'")
If czdr1 IsNot Nothing Then
e.DataRow("签收_姓名") = _UserName
e.DataRow("姓名身份证_签收") = _UserNameCard
e.DataRow("签收_时间") = Date.Now
e.DataRow("签收_标准照") = czdr1("标准照")
End If
Else
e.DataRow("签收_状态") = False
e.DataRow("签收_姓名") = Nothing
e.DataRow("姓名身份证_签收") = Nothing
e.DataRow("签收_时间") = Nothing
e.DataRow("签收_标准照") = Nothing
e.DataRow("签收_审核") = False
End If
'签收状态,审核
If e.DataRow("签收_审核") = True Then
e.DataRow("签收_值机") = _UserName
e.DataRow("姓名身份证_审核") = _UserNameCard
e.DataRow("签收_审核时间") = Date.Now
Else
e.DataRow("签收_审核") = False
e.DataRow("签收_值机") = Nothing
e.DataRow("姓名身份证_审核") = Nothing
e.DataRow("签收_审核时间") = Nothing
End If
End If
End If
End If