Foxtable(狐表)用户栏目专家坐堂 → IF问题


  共有2062人关注过本帖树形打印复制链接

主题:IF问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/4/25 10:50:00 [显示全部帖子]

参考代码

 

Select Case e.DataCol.name
    Case "型号","规格"
        Dim dr As DataRow = e.DataRow
        If dr.IsNull("型号") = False AndAlso dr.IsNull("规格") = False Then
            If e.DataTable.Compute("Count([_Identify])","型号 = '" & dr("型号") & "' And 规格 = '" & dr("规格") & "'") > 1 Then
                MessageBox.Show("已经存在相同型号和规格的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
                e.DataRow("c") = Nothing
            Else
                e.DataRow("c") = "正确"
            End If
        End If
End Select


 回到顶部