المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Generating a Unique ID.



C# Programming
12-08-2009, 10:00 AM
I want to generate a Unique ID as this. Unique ID Should Look like this "CID-00001,CID-00002,CID-00003.....".

I need a class to generate this. First i need to check the database for the previous ID.

If there is No Data it should generate the ID as "CID-00001" else it get the last ID and increment it by one and store it to the database.
I need the C# code for this.

Thank you.