public string IDGenerator() { // Create random ID that look like- '000-000-000'. string id = ""; int num1 = LocalLibrary.GetNumber(); id = id + num1; int num2 = LocalLibrary.GetNumber(); id = id + num2; int num3 = LocalLibrary.GetNumber(); id = id + num3; id = id + "-"; int num4 = LocalLibrary.GetNumber(); id = id + num4; int num5 = LocalLibrary.GetNumber(); id = id + num5; int num6 = LocalLibrary.GetNumber(); id = id + num6; id = id + "-"; int num7 = LocalLibrary.GetNumber(); id = id + num7; int num8 = LocalLibrary.GetNumber(); id = id + num8; int num9 = LocalLibrary.GetNumber(); id = id + num9; return(id); }
public string IDGenerator() { // Create random ID that look like- 'AA-00000000'. string id = ""; // Generates a key. char c1 = LocalLibrary.GetLetter(); id = id + c1; char c2 = LocalLibrary.GetLetter(); id = id + c2; id = id + "-"; // Generates the numbers. int num1 = LocalLibrary.GetNumber(); id = id + num1; int num2 = LocalLibrary.GetNumber(); id = id + num2; int num3 = LocalLibrary.GetNumber(); id = id + num3; int num4 = LocalLibrary.GetNumber(); id = id + num4; int num5 = LocalLibrary.GetNumber(); id = id + num5; int num6 = LocalLibrary.GetNumber(); id = id + num6; int num7 = LocalLibrary.GetNumber(); id = id + num7; int num8 = LocalLibrary.GetNumber(); id = id + num8; return(id); }