Dim Info As String
Info = FileSys.ReadAllText(ApplicationPath & "wz.txt", Encoding.Default) '读取生成的文本文件
info = info.Replace(vbcrlf,vblf) '将回车换行替换为换行
Dim pars() As String = Info.Split(vblf) '将读取的信息拆分为数组Dim r1 As Row = Tables("劳务人员基本信息").AddNew
Dim r1 As Row = Tables("劳务人员基本信息").AddNew
r1("姓名") = pars(0).Trim()
r1("性别") = pars(1).Trim()
r1("民族") = pars(2).Trim()
r1("出生日期") = pars(3).replace("年","-").Replace("月","-").Replace("日","")
r1("住址") = pars(4)
r1("身份证号") = pars(5)
r1("发证机关") = pars(6)
r1("签发日期") = pars(7).SubString(0,10).Replace(".","-")
r1("有效日期") = pars(7).SubString(11).Replace(",","-")
FileSys.CopyFile(ApplicationPath & "zp.bmp", "\\Lenovo-pc\e\民工身份证相片\" & r1("身份证号") & ".bmp",True) '照片复制到Attachments目录
r1("身份证相片") = r1("身份证号") & ".bmp"
Dim r2 As Row = Tables("职工人事档案").AddNew
r2("姓名") = pars(0).Trim()
r2("性别") = pars(1).Trim()
r2("民族") = pars(2).Trim()
r2("出生日期") = pars(3).replace("年","-").Replace("月","-").Replace("日","")
r2("住址") = pars(4)
r2("身份证号") = pars(5)
r2("发证机关") = pars(6)
r2("签发日期") = pars(7).SubString(0,10).Replace(".","-")
r2("有效日期") = pars(7).SubString(11).Replace(",","-")
FileSys.CopyFile(ApplicationPath & "zp.bmp", "\\Lenovo-pc\e\职工身份证相片\" & r2("身份证号") & ".bmp",True) '照片复制到Attachments目录
r2("身份证相片") = r2("身份证号") & ".bmp"