Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
不管怎么删除行,肯定不重号。可能思路上有点走弯路,不过解决了
dim b as new list(of string)
dim d,f as integer
b= datatables("出库").getuniquevalues("[出库日期]='"& e.datarow("出库日期")&"'","出库单编号")
f=0
if b.count >0 then
for each c as string in b
d=cint(c.substring(11,4))
f=math.max(f,d)
next
end if
f=f+1
e.datarow("出库单编号") ="CK" +cstr(format(e.datarow("出库日期"),"yyyyMMdd"))+"-"+format(f,"0000")
谢谢,抽空研究研究!