If you have three separate data lets say You have
1. CurrentDate
2. CustID
3. CurrentMonth
Then,
DoId = getDoId(YearofCurrentDate, CustId, CurrentMonth);
Call the getDoId Method
private string getDoId(String YYYY, String C_Id, String Month)
{
String ID = "";
ID = YYYY + C_Id + ("00") + Month;
return ID;
}
So Passing the correct year, custid, month will give you the desired output
Hope this will help you