以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]添加新负责邮箱报错。  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=56381)

--  作者:liujywwy
--  发布时间:2014/9/4 10:41:00
--  [求助]添加新负责邮箱报错。

技术支持信息表的datacol代码

If e.DataCol.Name = "新负责人邮箱" Then
    If e.NewValue Is Nothing Then
        e.DataRow("Type") = 2
    Else
        If e.NewValue IsNot Nothing
            e.DataRow("config") = "Group" & chr(11) & "录入" & chr(11) & "PassWord" & chr(11) & "nLQ+3vT/k74Ou6oIlnzGA==" & chr(11) & "Type" & chr(11) & "99"
        End If
    End If
End If

If e.DataCol.Name = "新负责人邮箱" Then
    If e.NewValue Is Nothing Then
        e.DataRow("新负责人邮箱") = Nothing
    Else
        e.DataRow("新负责人邮箱") = e.DataRow("\'" & e.NewValue & "\'")
        MessageBox.show("请新增新负责人邮箱账户","提醒周银河",MessageBoxButtons.OK,MessageBoxIcon.Question)
    End If
End If


图片点击可在新窗口打开查看此主题相关图片如下:添加新负责人邮箱.png
图片点击可在新窗口打开查看

--  作者:Bin
--  发布时间:2014/9/4 10:45:00
--  
e.DataRow("新负责人邮箱") = e.NewValue
--  作者:liujywwy
--  发布时间:2014/9/4 11:34:00
--  
以下是引用Bin在2014-9-4 10:45:00的发言:
e.DataRow("新负责人邮箱") = e.NewValue

在技术支持信息表,我增加了一列“分组”。通过“分组”的下拉选择来决定各用户属于哪个组。

请问一下代码有错吗?运行好像报错。

If e.DataCol.Name = "新负责人邮箱" Then
    If e.NewValue Is Nothing Then
        e.DataRow("Type") = 2
    Else
        If e.NewValue IsNot Nothing
            e.DataRow("config") =  chr(11) & "PassWord" & chr(11) & "nLQ+3vT/k74Ou6oIlnzGA==" & chr(11) & "Type" & chr(11) & "99"
            e.DataRow("分组") = ""
        End If
    End If
End If

If e.DataCol.Name = "新负责人邮箱" Then
    If e.NewValue Is Nothing Then
        e.DataRow("新负责人邮箱") = Nothing
    Else
        e.DataRow("新负责人邮箱") = e.NewValue
        MessageBox.show("请新增新负责人邮箱账户","提醒账号管理人员",MessageBoxButtons.OK,MessageBoxIcon.Question)
    End If
End If

If e.DataCol.Name = "分组" Then
    If e.NewValue Is Nothing Then
        e.DataRow("分组") = Nothing
    Else
        e.DataRow("分组") = e.DataRow("\'" & e.NewValue & "\'")
        If e.DataRow("新负责人邮箱") = Nothing Then
            e.DataRow("config") = "Group" & chr(11) & "e.DataRow("分组")" & chr(11) & "PassWord" & chr(11) & "nLQ+b3vT/k74Ou6oIlnzGA==" & chr(11) & "Type" & chr(11) & "2"
        Else
            e.DataRow("config") = "Group" & chr(11) & "e.DataRow("分组")" & chr(11) & "PassWord" & chr(11) & "nLQ+3vT/k74Ou6oIlnzGA==" & chr(11) & "Type" & chr(11) & "99"
        End If
    End If
End If


图片点击可在新窗口打开查看此主题相关图片如下:错误.png
图片点击可在新窗口打开查看
[此贴子已经被作者于2014-9-4 11:34:36编辑过]

--  作者:Bin
--  发布时间:2014/9/4 11:38:00
--  
 "e.DataRow("分组")"        e.DataRow("分组")