private void StartActivity(int subject) { int teacher = 0; int group = 0; int activity = choiceActivity(); EQUIPMENT equipment = EQUIPMENT.NOTHING; ROOM room = ROOM.CLASSROOM; SUBACTIVITIES subActivities = SUBACTIVITIES.NOTHING; if (activity != 4) { teacher = ChoiceTeacher(subject); if (teacher == -2) { Console.WriteLine("//|Process stop|\\\\"); return; } if (teacher != -1) { group = ChoiseTeacherGroup(subject, teacher); if (group == -2) { Console.WriteLine("//|Process stop|\\\\"); return; } } } switch (activity) { case 1: equipment = ChoiceEQUIPMENT(); room = ChoiceROOM(); subActivities = ChoiceSUBACTIVITIES(); break; case 6: equipment = ChoiceEQUIPMENT(); subActivities = ChoiceSUBACTIVITIES(); break; case 2: case 3: case 4: case 5: case 7: equipment = ChoiceEQUIPMENT(); break; } if (teacher == -1) { int tCount = infoService.GetSubjTeacherCount(subject); int gCount = 0; for (int i = 0; i < tCount; i++) { gCount = infoService.GetTeacherGroupCount(subject, i); for (int j = 0; j < gCount; j++) { service.StartActivity(subject, equipment, subActivities, room, i, j, activity); } } } else if (group == -1) { int gCount = 0; gCount = infoService.GetTeacherGroupCount(subject, teacher); for (int j = 0; j < gCount; j++) { service.StartActivity(subject, equipment, subActivities, room, teacher, j, activity); } } else { service.StartActivity(subject, equipment, subActivities, room, teacher, group, activity); } }