-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudent.cs
More file actions
45 lines (40 loc) · 1.14 KB
/
Copy pathStudent.cs
File metadata and controls
45 lines (40 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.ComponentModel.DataAnnotations;
namespace WinFormsApp1
{
public class Student
{
[Required]
public string FullName { get; set; } = string.Empty;
public string Cluster { get; set; } = string.Empty;
public int Group { get; set; }
public string Region { get; set; } = string.Empty;
public string Cohort { get; set; } = string.Empty;
public string Tag { get; set; } = string.Empty;
public Dictionary<string, WorkStatus> Results { get; set; }
public int GetRatio()
{
if (Results == null)
{
return 0;
}
return Results.Count(pair => pair.Value == WorkStatus.Зачтено);
}
public string? GetFullGroup()
{
if (Tag == null || Group == 0)
{
return null;
}
return $"{Tag}/{Group:D2}";
}
}
public enum WorkStatus
{
Зачтено,
Не_зачтено,
Не_сдано,
На_проверке,
Не_доступно,
Недоступно
}
}