예제 #1
0
        static void PrintAllUsers()
        {
            var sb      = new System.Text.StringBuilder();
            int counter = 1;

            sb.Append(String.Format("{0,-15} {1,-15}\n\n", "User Number", "User Name"));
            foreach (var user in _sql.ReadUsers().ToList())
            {
                sb.Append(String.Format("{0,-15} {1,-15} \n", counter, user.Name));
                counter++;
            }
            Console.WriteLine(sb);
        }
예제 #2
0
 static void PrintAllUsersEF()
 {
     foreach (var u in _sql.ReadUsers())
     {
         Console.WriteLine(u.Name);
     }
 }
예제 #3
0
 static void PrintAllUsersWithEF()
 {
     Console.WriteLine("Available users:");
     foreach (var user in _sql.ReadUsers())
     {
         System.Console.WriteLine(user.Name);
     }
 }
예제 #4
0
 private static void UserLogIn()
 {
     Console.WriteLine("\nUser ID - Username");
     foreach (User u1 in _sql.ReadUsers())
     {
         Console.WriteLine(u1.Id + " - " + u1.Name);
     }
     Console.WriteLine("\nPlease type your User ID");
     u = _sql.SelectUser();
     Console.WriteLine("\nWelcome, " + u.Name + "!");
 }