Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.23 KB | None | 0 0
  1.  public void Przegladaj ()
  2.         {
  3.             WypiszBanki();
  4.  
  5.             Console.WriteLine("podaj nazwe banku którego klientów chcesz przeglądać:");
  6.             string n = Console.ReadLine();
  7.             if (Banki.Contains(n))
  8.             {
  9.                 Bank b = (Bank)Banki[n];
  10.  
  11.                 b.WypiszKlientów();
  12.                 Console.WriteLine("podaj pesel klienta którego konta chcesz przeglądać");
  13.                 string p = Console.ReadLine();
  14.                 if (b.GetOsoby().Contains(p))
  15.                 {
  16.                     Osoba o = b.GetOsoba(p);
  17.  
  18.                     o.WypiszKonta();
  19.  
  20.                     Console.WriteLine("podaj numer konta którego karty chcesz przegladac");
  21.                     int nr = Convert.ToInt32(Console.ReadLine());
  22.  
  23.                     if (o.GetKonta().Contains(nr))
  24.                     {
  25.                         Konto c = o.GetKonto(nr);
  26.                         c.WypiszKarty();
  27.                     }
  28.  
  29.                     else Console.WriteLine("Brak podanego Konta");
  30.                 }
  31.                 else Console.WriteLine("Brak podanej osoby");
  32.             }
  33.             else
  34.             { Console.WriteLine("brak podanego banku");
  35.             }
  36.  
  37.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement