This commit is contained in:
parent
a5a4e43a49
commit
3eca2dd8f1
@ -1,4 +1,7 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using Zurnal.RemaDateBase.DateDao;
|
using Zurnal.RemaDateBase.DateDao;
|
||||||
|
|
||||||
public class GroupAttendanceService
|
public class GroupAttendanceService
|
||||||
@ -7,13 +10,13 @@ public class GroupAttendanceService
|
|||||||
|
|
||||||
public void DisplayGroupInfo()
|
public void DisplayGroupInfo()
|
||||||
{
|
{
|
||||||
Console.WriteLine( $"Группа: {GroupName}");
|
Console.WriteLine($"Группа: {GroupName}");
|
||||||
Console.WriteLine( $"Количество студентов: {Count()}");
|
Console.WriteLine($"Количество студентов: {Count()}");
|
||||||
|
|
||||||
var totalClasses = new AttendanceCounter(attendances).CountAttendances(UserGuid);
|
var totalClasses = new AttendanceCounter(attendances).CountAttendances(userGuid);
|
||||||
Console.WriteLine($"Количество проведенных занятий: {totalClasses}");
|
Console.WriteLine($"Количество проведенных занятий: {totalClasses}");
|
||||||
|
|
||||||
var overallAttendancePercentage = CalculateAttendancePercentage();
|
var overallAttendancePercentage = CalculateAttendancePercentage(attendances, userGuid);
|
||||||
Console.WriteLine($"Общий процент посещаемости: {overallAttendancePercentage:F2}%");
|
Console.WriteLine($"Общий процент посещаемости: {overallAttendancePercentage:F2}%");
|
||||||
Console.WriteLine("Список студентов:");
|
Console.WriteLine("Список студентов:");
|
||||||
|
|
||||||
@ -24,8 +27,8 @@ public class GroupAttendanceService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AttendanceCounter
|
public class AttendanceCounter
|
||||||
{
|
{
|
||||||
private List<PresnceDao> _attendances;
|
private List<PresnceDao> _attendances;
|
||||||
|
|
||||||
public AttendanceCounter(List<PresnceDao> attendances)
|
public AttendanceCounter(List<PresnceDao> attendances)
|
||||||
|
Loading…
Reference in New Issue
Block a user