Advertisement
Czempina

Untitled

Oct 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.54 KB | None | 0 0
  1. using System;
  2. using StudentManager.Operations;
  3.  
  4. namespace StudentManager
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             SelectOperation SelectOperation = new SelectOperation();
  11.             ShowStudents ShowStudents = new ShowStudents();
  12.             AddStudent AddStudent = new AddStudent();
  13.  
  14.             int operation = SelectOperation.Operation();
  15.  
  16.             switch(operation){
  17.                 case 1:
  18.                     int i = 1;
  19.                     string[] Students = ShowStudents.Students();
  20.                     foreach(string Student in Students)
  21.                     {
  22.                         Console.WriteLine("\t" + i + " " + Student);
  23.                         i++;
  24.                     }
  25.                     operation = SelectOperation.Operation();
  26.                     break;
  27.                 case 2:
  28.                     AddStudent.NewStudent();
  29.                     operation = SelectOperation.Operation();
  30.                     break;
  31.                 case 3:
  32.                     Console.WriteLine("Wybrałeś opcję 3!");
  33.                     break;
  34.                 case 4:
  35.                     Console.WriteLine("Wybrałeś opcję 4!");
  36.                     break;
  37.                 case 5:
  38.                     System.Windows.Application.Exit();
  39.                     break;
  40.                 default:
  41.                     Console.WriteLine("Nie ma takiej komendy!");
  42.                     operation = SelectOperation.Operation();
  43.                     break;
  44.  
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement