Beispiel #1
0
        /// <summary>
        /// Checks the invoice identifier.
        /// </summary>
        /// <returns></returns>
        public static string CheckInvoiceId(List <string> invoiceIds)
        {
            string uniqId = RandomHelpers.GetUniqueOrderInvoiceId();

            if (invoiceIds != null)
            {
againCheck:
                var check = invoiceIds.Contains(uniqId);
                if (check)
                {
                    uniqId = RandomHelpers.GetUniqueOrderInvoiceId();
                    goto againCheck;
                }
                else
                {
                    return(uniqId);
                }
            }
            else
            {
                return(uniqId);
            }
        }