Foxtable(狐表)用户栏目专家坐堂 → 身份证审核


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

主题:身份证审核

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/2/21 18:28:00 [显示全部帖子]

If e.DataCol.Name = "身份证号码" Then '是身份证号码发生变化吗?
    If e.DataRow.IsNull("身份证号码") Then '身份证号码是否为空
        e.DataRow("出生日期") = Nothing '如果为空,则清除出生日期
        e.DataRow("出生地点") = Nothing
        e.DataRow("籍贯") = Nothing
        e.DataRow("国籍") = Nothing
    Else
        If ValidPIN(e.DataRow("身份证号码")) Then
            '否则从身份证号码列中提取出生日期
            e.DataRow("出生日期") = ReadBirthday(e.DataRow("身份证号码"))
            Dim szd As String = e.DataRow("身份证号码").SubString(0,6)
            Dim jg As String = e.DataRow("身份证号码").SubString(0,2)
            Dim gj As String = e.DataRow("身份证号码").SubString(0,1)
            Dim dr As DataRow = DataTables("身份证籍贯编码").Find("籍贯编码 = '" & szd & "'")
            Dim dc As DataRow = DataTables("身份证籍贯编码").Find("籍贯编码 = '" & jg & "'")
            Dim dt As DataRow = DataTables("身份证籍贯编码").Find("籍贯编码 = '" & gj & "'")
            If dr  IsNot Nothing Then
                e.DataRow("出生地点") = dr("哈文名称")
                e.DataRow("籍贯") = dc("哈文名称")
                e.DataRow("国籍") = dt("哈文名称")
               
            End If
        End If
    end if
ElseIf e.DataCol.name = "出生日期" Then
    If e.newvalue <> Nothing Then
        Dim y As Integer = e.NewValue.year
        If format(e.newvalue, "MMdd") <= Format(Date.Today, "MMdd") Then
            e.DataRow("年龄") = Date.Today.Year - y
        Else
            e.DataRow("年龄") = Date.Today.Year - y -1
        End If
    Else
        e.DataRow("年龄") = Nothing
    End If
End If

 回到顶部