Angular 7 Auto increment number | SoloLearn: Learn to code for FREE!

0

Angular 7 Auto increment number

Hi guys My question is i want generete a auto increment number for my purchase order such as, PO_000001 , PO_000002 ... etc Please let me how to generate above way my auto increment number , Thank you

12/30/2019 6:16:44 AM

manoj

1 Answer

New Answer

0

You should practically be generating them in the Database. If you are using SQL Server, Identity Column will do it for you. You can then attach any custom text before and after. Or you can generate it using Guid class as well. [For example, in C# Guid.NewID() will give you a unique id every time which is enough to be a good order#] I wouldn't recommend you doing it on front-end because you wont have a guarantee of unique order numbers that way Let me know what is your backend stack and I may help you find a better solution. Angular Frontend surely is not the right place for order numbers generation