当我点击按钮时增加价值

当我点击按钮时增加价值

本文介绍了当我点击按钮时增加价值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要插入学生的录取表格.
当我单击该按钮时,不需要增加入场人数..
对于不同的插入,它的值将必须增加...

对于示例第一个表单插入单击,AdmNo为:Adm0001
第二种形式的插入点击,AdmNo为:Adm0002
第三种形式的插入点击,AdmNo为:Adm0003 ......
像这样
任何人都可以帮助我

I want to Insert the admission form of a student.
When i insert this from at that click this admission no is need to be increesed..
For different insertion it values will be mustly increesed...

For Example 1st form insertion click, AdmNo is: Adm0001
2nd form insertion click, AdmNo is: Adm0002
3rd form insertion click, AdmNo is: Adm0003......
Like this.
Any one Pls help me

推荐答案

int AdmnNo = 0;
//Within the click event of the button
string AdmnId = string.Format("Adm{0:0000}",++AdmnNo);
Console.WriteLine (AdmnId);



这篇关于当我点击按钮时增加价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 23:53