Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.25 KB | None | 0 0
  1.  public void Usun ()
  2.         {
  3.             Console.WriteLine("Co chcesz usunac?\n\n");
  4.             Console.WriteLine("[1]Bank \n");
  5.            
  6.             Console.WriteLine("[2] Firme\n");
  7.  
  8.             Console.WriteLine("Wybor:");
  9.             switch (Console.Read())
  10.             {
  11.                 case 1:
  12.                     {
  13.                         Console.WriteLine("Podaj nazwe banku ktory chcesz usunac\n");
  14.                         string nazwa = Console.ReadLine();
  15.                         Bank b = (Bank)Banki[nazwa];
  16.                         b.SetStatus(false);
  17.                         Banki[nazwa] =(Bank) b;
  18.  
  19.  
  20.  
  21.  
  22.                     }
  23.                     break;
  24.  
  25.                
  26.                 case 2:
  27.                     {
  28.                        
  29.                         Console.WriteLine("\nPodaj krs firmy ktora chcesz usunac:");
  30.                         string krs = Console.ReadLine();
  31.  
  32.                         Firma f = (Firma)Firmy[krs];
  33.                         f.SetStatus(false);
  34.                         Firmy[krs]= (Firma) f;
  35.  
  36.  
  37.  
  38.                     }
  39.                     break;
  40.                 default:
  41.                     Console.WriteLine("Brak podanej opcji");
  42.                     break;
  43.             }
  44.  
  45.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement