Advertisement
Guest User

better?

a guest
Feb 12th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. int authlevel = Convert.ToInt32(Console.ReadLine()); //input 1,2,3 according to auth level
  2.            
  3.             string user_to_database = ("Add user to local Database\n");
  4.             string Financial_Calculator = ("Go to calculater\n");
  5.             string Price_list_access = ("Go to price List\n");
  6.             string user_system_settings = ("Go to Settings\n");  
  7.            
  8.             switch(authlevel) //switch statement uses number inserted into int authlevel readline ^
  9.             {
  10.                 case 1:
  11.                     Console.WriteLine("System Admin");
  12.                     Console.WriteLine(user_to_database + Financial_Calculator + Price_list_access + user_system_settings);
  13.                     Console.ReadKey(true);
  14.                     break;
  15.                    
  16.                    
  17.                 case 2:
  18.                     Console.WriteLine("Finincial Manager");
  19.                     Console.WriteLine(Financial_Calculator + Price_list_access + user_to_database);
  20.                     Console.ReadKey(true);
  21.                     break;
  22.                    
  23.                 case 3:
  24.                     Console.WriteLine("Sales Person");
  25.                     Console.WriteLine(Financial_Calculator + Price_list_access + "not setting access");
  26.                     Console.ReadKey(true);
  27.                     break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement