使用C sharp自动增加字母数字值 [英] auto increment alpha numeric values using C sharp

查看:108
本文介绍了使用C sharp自动增加字母数字值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能解释一下我如何自动增加价值,如LG / SALES / 1000,LG / SALES / 1001,LG / SALES / 1002 ............. LG / SALES / 1030



i我带有标签的表格当我加载表格时标签将填充字母数字,然后它将存储到平方。



2.之后当我加载表格时,最大值来自数据库,它会增加



我的表名是销售额列名是sales_invoice(自动递增值)。

Can you explain me how to auto increment the value like LG/SALES/1000,LG/SALES/1001, LG/SALES/1002.............LG/SALES/1030

i Had a Form With a label When I Load The Form The label will be fill with Alphanumeric number, THEN it will be stored into sq.

2.after that when i load the form max value comes from database and it will be incremented

my table name is sales and column name is sales_invoice(auto incremented values).

推荐答案

使用拆分/字符string.split < a href =http://msdn.microsoft.com/en-us/library/system.string.split%28v=vs.110%29.aspx> [ ^ ]。br />
取最后一个值,即数字和增量1。
Split on the / character using string.split[^].
Take the last value i.e. the number and the increment it by 1.


这篇关于使用C sharp自动增加字母数字值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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