如何通过添加年份来自动生成数量 [英] How to make the Number of automatic generation by adding the Year

查看:72
本文介绍了如何通过添加年份来自动生成数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过添加年份,数字来自动生成数字.

1/2010、2/2010/3/2010等

How to make the Number of automatic generation by adding the Year, Number.

1/2010, 2/2010/ 3/2010, etc

推荐答案

请详细说明您的问题.


创建一个增加数字很容易,只需将Number ++用作变量,然后在其后附加"/"和年份即可.

这是相当简单的东西,请查看一些VB.Net入门网站,甚至包括MS网站.
Creating an increasing number is easy, just Number++ a variable, then append the "/" and the year to it.

This is fairly simple stuff, check out some VB.Net starter sites, even the MS one.


问题仍然不清楚.但是据我了解,我可以建议:
如果它是多用户应用程序,则必须使用单独的表(例如ref_Reg)引用来保留最后使用的注册ID(例如reg_RegId).对于ref_Reg表中的下一个注册增量ref_RegId并选择它,将ID与/和Year串联在一起.

如果ref_Reg表中的现有值为2,则将其增加到3并选择一个字符串(例如字符串refRegId)
C#中的
Still the question is not clear.But from what I understood I can suggest :
If its a multiuser application , then you have to use a separate table (say ref_Reg ) reference to keep the last taken registration id ( say reg_RegId) . For the next registration increment ref_RegId in ref_Reg Table and select it, Concatenate the Id with / and the Year.

If the existing value in ref_Reg Table is 2 , then increment it to 3 and select into a string (say string refRegId )
string NewId =refRegId +" / " + DateTime.Now.Year; 



希望这对您有帮助:)

in C#

Hoping this will help you :)


这篇关于如何通过添加年份来自动生成数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆