/// <summary>
 /// Funkcja odświerzająca DataGridView
 /// </summary>
 public void RefreshDataGridView()
 {
     if (radioButtonStudents.Checked)
     {
         List <int> fieldOfStudyIds = new List <int>();
         List <int> vintageIndexes  = new List <int>();
         if (checkBoxIT.Checked)
         {
             fieldOfStudyIds.Add(1);
         }
         if (checkBoxAIR.Checked)
         {
             fieldOfStudyIds.Add(2);
         }
         if (checkBoxElectronics.Checked)
         {
             fieldOfStudyIds.Add(3);
         }
         if (checkBoxCN.Checked)
         {
             fieldOfStudyIds.Add(4);
         }
         if (checkBoxYear1.Checked)
         {
             vintageIndexes.Add(20);
         }
         if (checkBoxYear2.Checked)
         {
             vintageIndexes.Add(19);
         }
         if (checkBoxYear3.Checked)
         {
             vintageIndexes.Add(18);
         }
         dataGridViewAdmin.DataSource = studentsRepository.GetStudents(fieldOfStudyIds, vintageIndexes);
     }
     else if (radioButtonWorkers.Checked)
     {
         dataGridViewAdmin.DataSource = workersRepository.GetWorkers();
     }
     else if (radioButtonVintages.Checked)
     {
         dataGridViewAdmin.DataSource = studyVintagesRepository.GetStudyVintages();
     }
     else if (radioButtonFieldsOfStudy.Checked)
     {
         dataGridViewAdmin.DataSource = fieldsOfStudyRepository.GetFieldsOfStudies();
     }
     else if (radioButtonSubjects.Checked)
     {
         dataGridViewAdmin.DataSource = subjectsRepository.GetSubjects();
     }
     else if (radioButtonSubjectGroups.Checked)
     {
         dataGridViewAdmin.DataSource = subjectGroupsRepository.GetSubjectGroups();
     }
     else if (radioButtonWorkplaces.Checked)
     {
         dataGridViewAdmin.DataSource = workplacesRepository.GetWorkplaces();
     }
     else if (radioButtonAddresses.Checked)
     {
         dataGridViewAdmin.DataSource = residencePlacesRepository.GetAddresses();
     }
     if (radioButtonAddresses.Checked)
     {
         buttonEditAddress.Enabled   = true;
         buttonDeleteAddress.Enabled = true;
     }
     else
     {
         buttonEditAddress.Enabled   = false;
         buttonDeleteAddress.Enabled = false;
     }
 }