以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]支piao号自动增加 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=104260) |
-- 作者:yancheng -- 发布时间:2017/7/26 11:58:00 -- [求助]支piao号自动增加 如下图。支票前缀和,后缀不固定多少位。 关于后缀如输入:0001或01; 如果让它自动根据:张数的值 ,想加;我现在如:前缀:999 ,后缀001;生成的值 是:9991,9992,9993;如何变成:999001,999002,999003 代码如下: Dim zhbh As WinForm.DropDownBox = e.Form.Controls("帐户编号") Dim zplx As WinForm.ComboBox = e.Form.Controls("支票类型") Dim djrq As WinForm.DateTimePicker = e.Form.Controls("登记日期") Dim yxq As WinForm.NumericComboBox = e.Form.Controls("有效期") Dim zs As Integer = e.Form.Controls("张数").Value Dim zpqz As String = e.Form.Controls("支票前缀").Value Dim zphm As String = e.Form.Controls("支票号码").Value msgbox(zpqz & zphm) For i As Integer = 0 To zs-1 zphm= CInt(zphm) + i Dim r As Row = Tables("支票管理").AddNew r("帐户编号") = zhbh.Value r("当前状态") = "空白" r("支票号码") = CInt(zpqz & zphm) r("登记日期") = djrq.Value r("有效期") = yxq.Value r("支票类型") = zplx.Value |
-- 作者:有点甜 -- 发布时间:2017/7/26 13:20:00 -- zphm= cstr(CInt(zphm) + i).padleft(zphm.length,"0") |