Next, I'll give you a piece of code. It has a full annotation inside.
Using System;
Namespace Baselayer
{
///
The document number, which produces the DJ000002 number, such as: the entry parameter is "DJ000003" and returns "
///
public class Sheetnumber
{
///
The document number, which produces the DJ000002 number, such as: the entry parameter is "DJ000003" and returns "
///
///Original value
/// Next value
public string Nextnumber (string basenumber)
{
String newnumber = "";//New value
int innumber = 1;//rounding
int placevalue;//bit value
char[] No = Basenumber.tochararray ();
for (int i=basenumber.length-1;i>=0;i--)
{
if (no[i]== ' 9 ' && innumber==1)
{
Innumber=1;
Newnumber= "0" +newnumber;
}
Else
if (innumber==1 && no[i]>= ' 0 ' && no[i]< ' 9 ')
{
Placevalue=int32.parse (No[i]. ToString ());
Placevalue= (Innumber+placevalue);
innumber=0;
Newnumber=placevalue.tostring () +newnumber;
}
Else
{
innumber=0;
Newnumber=no[i]+newnumber;
}
}
if (Basenumber==newnumber)
Newnumber= "0000000001";
return newnumber;
}
}
}
Ok. If you ever have to append your own document number. This piece of code should probably fulfill your requirements, right? '