init
This commit is contained in:
parent
85738972fe
commit
fee8b37eb3
BIN
.vs/Demo/DesignTimeBuild/.dtbcache.v2
Normal file
BIN
.vs/Demo/DesignTimeBuild/.dtbcache.v2
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.vs/Demo/v17/.futdcache.v2
Normal file
BIN
.vs/Demo/v17/.futdcache.v2
Normal file
Binary file not shown.
BIN
.vs/Demo/v17/.suo
Normal file
BIN
.vs/Demo/v17/.suo
Normal file
Binary file not shown.
218
.vs/Demo/v17/DocumentLayout.backup.json
Normal file
218
.vs/Demo/v17/DocumentLayout.backup.json
Normal file
@ -0,0 +1,218 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\Class_Student\\Desktop\\asdsa\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\ui\\mainmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\ui\\mainmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\attendanceusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\attendanceusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\repository\\attendancerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\repository\\attendancerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\attendance.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\attendance.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\group.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\group.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 4,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"Title": "UserRepositoryImpl.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAqwBIAAAAiAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T07:52:34.65Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 11,
|
||||
"Title": "UseCaseGeneratePresence.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"ViewState": "AQIAACAAAAAAAAAAAAAcwDkAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T07:47:40.962Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 10,
|
||||
"Title": "UserUseCase.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAqwA0AAAAtAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:37:33.182Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Program.cs",
|
||||
"RelativeToolTip": "Demo\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:35:54.167Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainMenu.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\UI\\MainMenu.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\UI\\MainMenu.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\UI\\MainMenu.cs",
|
||||
"RelativeToolTip": "Demo\\UI\\MainMenu.cs",
|
||||
"ViewState": "AgIAAKYBAAAAAAAAAADwv8gBAAAJAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:27:41.651Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "AttendanceUseCase.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"ViewState": "AgIAAAsAAAAAAAAAAAA0wDAAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:20:55.348Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "LocalStaticData.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"ViewState": "AgIAAAYAAAAAAAAAAAA6wBwAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:19:48.271Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "AttendanceRepositoryImpl.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"ViewState": "AgIAAB8AAAAAAAAAAAAcwEQAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:20:16.203Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 9,
|
||||
"Title": "Group.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T08:03:41.077Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "Attendance.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:19:26.82Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 8,
|
||||
"Title": "User.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAABAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T09:22:03.491Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"Title": "User.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\Models\\User.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\Models\\User.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\Models\\User.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\Models\\User.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwkAAAAxAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T09:22:09.1Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
213
.vs/Demo/v17/DocumentLayout.json
Normal file
213
.vs/Demo/v17/DocumentLayout.json
Normal file
@ -0,0 +1,213 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\Class_Student\\Desktop\\asdsa\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\ui\\mainmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\ui\\mainmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\attendanceusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\attendanceusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\repository\\attendancerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\repository\\attendancerepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\attendance.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\attendance.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\data\\localdata\\entity\\group.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\data\\localdata\\entity\\group.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|c:\\users\\class_student\\desktop\\asdsa\\demo\\domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{983820F6-FF31-4B3A-8593-831BC3904E80}|Demo\\Demo.csproj|solutionrelative:demo\\domain\\usecase\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 4,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"Title": "UserRepositoryImpl.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\Repository\\UserRepositoryImpl.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAqwBIAAAAiAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T07:52:34.65Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 11,
|
||||
"Title": "UseCaseGeneratePresence.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\UseCaseGeneratePresence.cs",
|
||||
"ViewState": "AQIAACAAAAAAAAAAAAAcwDkAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T07:47:40.962Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 10,
|
||||
"Title": "UserUseCase.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\UserUseCase.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAqwA0AAAAtAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:37:33.182Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "Program.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Program.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Program.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Program.cs",
|
||||
"RelativeToolTip": "Demo\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:35:54.167Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "MainMenu.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\UI\\MainMenu.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\UI\\MainMenu.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\UI\\MainMenu.cs",
|
||||
"RelativeToolTip": "Demo\\UI\\MainMenu.cs",
|
||||
"ViewState": "AgIAAKYBAAAAAAAAAADwv8gBAAAJAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:27:41.651Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "AttendanceUseCase.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\UseCase\\AttendanceUseCase.cs",
|
||||
"ViewState": "AgIAAAsAAAAAAAAAAAA0wDAAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:20:55.348Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "LocalStaticData.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\LocalStaticData.cs",
|
||||
"ViewState": "AgIAAAYAAAAAAAAAAAA6wBwAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:19:48.271Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "AttendanceRepositoryImpl.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\Repository\\AttendanceRepositoryImpl.cs",
|
||||
"ViewState": "AgIAAB8AAAAAAAAAAAAcwEQAAAABAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:20:16.203Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 9,
|
||||
"Title": "Group.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\Group.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwAAAAAAAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T08:03:41.077Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "Attendance.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\Attendance.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-23T07:19:26.82Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 8,
|
||||
"Title": "User.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"RelativeToolTip": "Demo\\Data\\LocalData\\Entity\\User.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAoAAAABAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T09:22:03.491Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 7,
|
||||
"Title": "User.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\Models\\User.cs",
|
||||
"RelativeDocumentMoniker": "Demo\\Domain\\Models\\User.cs",
|
||||
"ToolTip": "C:\\Users\\Class_Student\\Desktop\\asdsa\\Demo\\Domain\\Models\\User.cs",
|
||||
"RelativeToolTip": "Demo\\Domain\\Models\\User.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAADwvwkAAAAxAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-10-24T09:22:09.1Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
BIN
.vs/ProjectEvaluation/demo.metadata.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/demo.metadata.v9.bin
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/demo.projects.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/demo.projects.v9.bin
Normal file
Binary file not shown.
BIN
.vs/ProjectEvaluation/demo.strings.v9.bin
Normal file
BIN
.vs/ProjectEvaluation/demo.strings.v9.bin
Normal file
Binary file not shown.
15
Demo/Data/LocalData/Entity/Attendance.cs
Normal file
15
Demo/Data/LocalData/Entity/Attendance.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace Demo.Data.LocalData.Entity
|
||||
{
|
||||
public class Attendance
|
||||
{
|
||||
public required Guid UserGuid { get; set; }
|
||||
public bool IsPresent { get; set; } = true; // Присутствует или нет
|
||||
public required DateOnly Date { get; set; }
|
||||
public required int LessonNumber { get; set; }
|
||||
|
||||
// Конструктор
|
||||
|
||||
}
|
||||
}
|
@ -22,5 +22,7 @@ namespace Demo.Data.LocalData
|
||||
new User { Guid = Guid.Parse("efcc1473-c116-4244-b3f7-f2341a5c3003"), FIO = "RandomFio4", GroupID = 2 },
|
||||
new User { Guid = Guid.Parse("60640fb3-ace2-4cad-81d5-a0a58bc2dbbd"), FIO = "RandomFio5", GroupID = 3 },
|
||||
};
|
||||
|
||||
// Удален блок с предопределенной посещаемостью
|
||||
}
|
||||
}
|
||||
|
69
Demo/Data/Repository/AttendanceRepositoryImpl.cs
Normal file
69
Demo/Data/Repository/AttendanceRepositoryImpl.cs
Normal file
@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.LocalData.Entity;
|
||||
|
||||
namespace Demo.Data.Repository
|
||||
{
|
||||
public class AttendanceRepositoryImpl
|
||||
{
|
||||
private List<Attendance> _attendances;
|
||||
|
||||
public AttendanceRepositoryImpl()
|
||||
{
|
||||
_attendances = new List<Attendance>();
|
||||
}
|
||||
|
||||
public List<Attendance> GetAllAttendances()
|
||||
{
|
||||
return _attendances;
|
||||
}
|
||||
|
||||
public Attendance GetAttendanceByUserAndDate(Guid userGuid, DateOnly date)
|
||||
{
|
||||
return _attendances.FirstOrDefault(a => a.UserGuid == userGuid && a.Date == date);
|
||||
}
|
||||
|
||||
public void AddAttendance(Attendance attendance)
|
||||
{
|
||||
_attendances.Add(attendance);
|
||||
}
|
||||
|
||||
public bool UpdateAttendance(Attendance attendance)
|
||||
{
|
||||
var existingAttendance = GetAttendanceByUserAndDate(attendance.UserGuid, attendance.Date);
|
||||
if (existingAttendance != null)
|
||||
{
|
||||
existingAttendance.IsPresent = attendance.IsPresent;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool RemoveAttendance(Guid userGuid, DateOnly date)
|
||||
{
|
||||
var attendance = GetAttendanceByUserAndDate(userGuid, date);
|
||||
if (attendance != null)
|
||||
{
|
||||
_attendances.Remove(attendance);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Получение всех посещений по группе и дате
|
||||
public List<Attendance> GetAttendancesByGroupAndDate(int groupId, DateOnly date)
|
||||
{
|
||||
var userGuids = LocalStaticData.Users.Where(u => u.GroupID == groupId).Select(u => u.Guid).ToList();
|
||||
return _attendances.Where(a => userGuids.Contains(a.UserGuid) && a.Date == date).ToList();
|
||||
}
|
||||
|
||||
// Получение всех посещений по группе и диапазону дат
|
||||
public List<Attendance> GetAttendancesByGroupAndDateRange(int groupId, DateOnly startDate, DateOnly endDate)
|
||||
{
|
||||
var userGuids = LocalStaticData.Users.Where(u => u.GroupID == groupId).Select(u => u.Guid).ToList();
|
||||
return _attendances.Where(a => userGuids.Contains(a.UserGuid) && a.Date >= startDate && a.Date <= endDate).ToList();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Domain.Models;
|
||||
|
||||
@ -10,8 +8,18 @@ namespace Demo.Data.Repository
|
||||
{
|
||||
public class UserRepositoryImpl
|
||||
{
|
||||
private List<User> _users = LocalStaticData.Users.Select(it => new User { FIO = it.FIO, Group = new Group(), Guid = it.Guid }).ToList();
|
||||
public UserRepositoryImpl() { _users = LocalStaticData.Users.Select(it => new User { FIO = it.FIO, Group = new Group(), Guid = it.Guid}).ToList(); }
|
||||
private List<User> _users;
|
||||
|
||||
public UserRepositoryImpl()
|
||||
{
|
||||
_users = LocalStaticData.Users.Select(it => new User
|
||||
{
|
||||
FIO = it.FIO,
|
||||
GroupID = it.GroupID,
|
||||
Group=new Group(),
|
||||
Guid = it.Guid
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public List<User> GetAllUsers()
|
||||
{
|
||||
@ -20,7 +28,8 @@ namespace Demo.Data.Repository
|
||||
|
||||
public User GetByGuid(Guid id)
|
||||
{
|
||||
return _users.FirstOrDefault(static u => u.Guid ==u.Guid);
|
||||
// Исправлено на правильное сравнение
|
||||
return _users.FirstOrDefault(u => u.Guid == id);
|
||||
}
|
||||
|
||||
public void AddUser(User user)
|
||||
@ -34,12 +43,12 @@ namespace Demo.Data.Repository
|
||||
if (existingUser != null)
|
||||
{
|
||||
existingUser.FIO = user.FIO; // Обновите остальные поля, если необходимо
|
||||
existingUser.Group = user.Group; // Обновление группы (если нужно)
|
||||
return true; // Успешное обновление
|
||||
}
|
||||
return false; // Пользователь не найден
|
||||
}
|
||||
|
||||
|
||||
public void RemoveUser(Guid userGuid)
|
||||
{
|
||||
var user = _users.FirstOrDefault(u => u.Guid == userGuid);
|
||||
@ -60,9 +69,15 @@ namespace Demo.Data.Repository
|
||||
return false; // Пользователь не найден
|
||||
}
|
||||
|
||||
public User FindUserByGuid(Guid userGuid) // Реализуем метод
|
||||
public User FindUserByGuid(Guid userGuid)
|
||||
{
|
||||
return _users.FirstOrDefault(u => u.Guid == userGuid);
|
||||
}
|
||||
|
||||
// Метод для получения пользователей по ID группы
|
||||
public List<User> GetUsersByGroupId(int groupId)
|
||||
{
|
||||
return _users.Where(u => u.Group.Id == groupId).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
49
Demo/Domain/UseCase/AttendanceUseCase.cs
Normal file
49
Demo/Domain/UseCase/AttendanceUseCase.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Demo.Data.LocalData.Entity;
|
||||
using Demo.Data.Repository;
|
||||
|
||||
namespace Demo.Domain.UseCase
|
||||
{
|
||||
public class AttendanceUseCase
|
||||
{
|
||||
private readonly AttendanceRepositoryImpl _attendanceRepository;
|
||||
|
||||
public AttendanceUseCase(AttendanceRepositoryImpl attendanceRepository)
|
||||
{
|
||||
_attendanceRepository = attendanceRepository ?? throw new ArgumentNullException(nameof(attendanceRepository));
|
||||
}
|
||||
|
||||
public List<Attendance> GetAllAttendances()
|
||||
{
|
||||
return _attendanceRepository.GetAllAttendances() ?? new List<Attendance>();
|
||||
}
|
||||
|
||||
public void AddAttendance(Attendance attendance)
|
||||
{
|
||||
if (attendance == null) throw new ArgumentNullException(nameof(attendance));
|
||||
_attendanceRepository.AddAttendance(attendance);
|
||||
}
|
||||
|
||||
public bool UpdateAttendance(Attendance attendance)
|
||||
{
|
||||
if (attendance == null) throw new ArgumentNullException(nameof(attendance));
|
||||
return _attendanceRepository.UpdateAttendance(attendance);
|
||||
}
|
||||
|
||||
public bool RemoveAttendance(Guid userGuid, DateOnly date)
|
||||
{
|
||||
return _attendanceRepository.RemoveAttendance(userGuid, date);
|
||||
}
|
||||
|
||||
public List<Attendance> GetAttendancesByGroupAndDate(int groupId, DateOnly date)
|
||||
{
|
||||
return _attendanceRepository.GetAttendancesByGroupAndDate(groupId, date);
|
||||
}
|
||||
|
||||
public List<Attendance> GetAttendancesByGroupAndDateRange(int groupId, DateOnly startDate, DateOnly endDate)
|
||||
{
|
||||
return _attendanceRepository.GetAttendancesByGroupAndDateRange(groupId, startDate, endDate);
|
||||
}
|
||||
}
|
||||
}
|
57
Demo/Domain/UseCase/UseCaseGeneratePresence.cs
Normal file
57
Demo/Domain/UseCase/UseCaseGeneratePresence.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Demo.Data.LocalData;
|
||||
using Demo.Data.LocalData.Entity;
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Domain.Models;
|
||||
|
||||
namespace Demo.Domain.UseCase
|
||||
{
|
||||
public class UseCaseGeneratePresence
|
||||
{
|
||||
private readonly AttendanceRepositoryImpl _attendanceRepo;
|
||||
|
||||
// Конструктор с параметрами для инъекции зависимостей
|
||||
public UseCaseGeneratePresence(AttendanceRepositoryImpl attendanceRepo)
|
||||
{
|
||||
_attendanceRepo = attendanceRepo ?? throw new ArgumentNullException(nameof(attendanceRepo));
|
||||
}
|
||||
|
||||
// Генерация посещаемости на текущий день
|
||||
public void GeneratePresenceForDay(int firstLessonNumber, int lastLessonNumber, int groupId, DateOnly currentDate)
|
||||
{
|
||||
// Получаем пользователей группы из статических данных
|
||||
var users = LocalStaticData.Users.Where(u => u.GroupID == groupId).ToList();
|
||||
if (users.Count == 0)
|
||||
{
|
||||
Console.WriteLine($"Не найдено пользователей для группы с ID {groupId}");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int lessonNumber = firstLessonNumber; lessonNumber <= lastLessonNumber; lessonNumber++)
|
||||
{
|
||||
foreach (var user in users)
|
||||
{
|
||||
var attendance = new Attendance
|
||||
{
|
||||
UserGuid = user.Guid,
|
||||
Date = currentDate,
|
||||
LessonNumber = lessonNumber,
|
||||
IsPresent = true // По умолчанию отмечаем всех как присутствующих
|
||||
};
|
||||
_attendanceRepo.AddAttendance(attendance); // Добавляем запись посещаемости в репозиторий
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Генерация посещаемости на неделю
|
||||
public void GeneratePresenceForWeek(int firstLessonNumber, int lastLessonNumber, int groupId, DateOnly startDate)
|
||||
{
|
||||
for (int i = 0; i < 7; i++) // Генерируем посещаемость на каждый день недели
|
||||
{
|
||||
var currentDate = startDate.AddDays(i);
|
||||
GeneratePresenceForDay(firstLessonNumber, lastLessonNumber, groupId, currentDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -42,8 +42,8 @@ namespace Demo.Domain.UseCase
|
||||
var user = _userRepository.GetByGuid(id);
|
||||
return new UserModel
|
||||
{
|
||||
FIO = user.FIO,
|
||||
Guid = user.Guid,
|
||||
FIO = user?.FIO, // Проверка на null
|
||||
Guid = user?.Guid ?? Guid.Empty, // Возврат Guid.Empty, если user null
|
||||
};
|
||||
}
|
||||
|
||||
@ -57,8 +57,8 @@ namespace Demo.Domain.UseCase
|
||||
var user = FindUserByGuid(userGuid);
|
||||
return new UserModel
|
||||
{
|
||||
FIO = user.FIO,
|
||||
Guid = user.Guid,
|
||||
FIO = user?.FIO, // Проверка на null
|
||||
Guid = user?.Guid ?? Guid.Empty, // Возврат Guid.Empty, если user null
|
||||
};
|
||||
}
|
||||
|
||||
@ -67,11 +67,15 @@ namespace Demo.Domain.UseCase
|
||||
return _userRepository.UpdateUser(user);
|
||||
}
|
||||
|
||||
// Новый метод для поиска группы по ID
|
||||
public Group GetGroupById(int id)
|
||||
{
|
||||
return _groupRepo.GetGroupById(id);
|
||||
}
|
||||
|
||||
internal bool RemoveUser(Guid userGuid)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class UserModel
|
||||
|
@ -1,21 +1,23 @@
|
||||
using Demo.Data.Repository;
|
||||
using Demo.Domain.UseCase;
|
||||
using Demo.UI;
|
||||
using System;
|
||||
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var groupRepo = new GroupRepositoryImpl();
|
||||
var attendanceRepo = new AttendanceRepositoryImpl();
|
||||
var userRepo = new UserRepositoryImpl();
|
||||
|
||||
var groupUseCase = new GroupUseCase(groupRepo);
|
||||
var attendanceUseCase = new AttendanceUseCase(attendanceRepo);
|
||||
var userUseCase = new UserUseCase(userRepo, groupRepo);
|
||||
var mainMenu = new MainMenu(userUseCase, groupUseCase);
|
||||
var presenceGenerator = new UseCaseGeneratePresence(attendanceRepo);
|
||||
|
||||
// Вывод групп при запуске программы
|
||||
groupRepo.DisplayGroups();
|
||||
var mainMenu = new MainMenu(userUseCase, groupUseCase, attendanceUseCase, presenceGenerator);
|
||||
|
||||
// Отображение главного меню
|
||||
mainMenu.DisplayMenu();
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
using Demo.Domain.UseCase;
|
||||
using Demo.Domain.Models; // Добавьте эту строку
|
||||
using Demo.Data.LocalData.Entity;
|
||||
using Demo.Domain.Models;
|
||||
using Demo.Domain.UseCase;
|
||||
using System;
|
||||
using Demo.Data.Repository;
|
||||
|
||||
namespace Demo.UI
|
||||
{
|
||||
@ -9,11 +9,16 @@ namespace Demo.UI
|
||||
{
|
||||
private readonly UserUseCase _userUseCase;
|
||||
private readonly GroupUseCase _groupUseCase;
|
||||
private readonly AttendanceUseCase _attendanceUseCase;
|
||||
private readonly UseCaseGeneratePresence _presenceGenerator;
|
||||
|
||||
public MainMenu(UserUseCase userUseCase, GroupUseCase groupUseCase)
|
||||
// Конструктор с инициализацией всех необходимых зависимостей
|
||||
public MainMenu(UserUseCase userUseCase, GroupUseCase groupUseCase, AttendanceUseCase attendanceUseCase, UseCaseGeneratePresence presenceGenerator)
|
||||
{
|
||||
_userUseCase = userUseCase;
|
||||
_groupUseCase = groupUseCase;
|
||||
_userUseCase = userUseCase ?? throw new ArgumentNullException(nameof(userUseCase));
|
||||
_groupUseCase = groupUseCase ?? throw new ArgumentNullException(nameof(groupUseCase));
|
||||
_attendanceUseCase = attendanceUseCase ?? throw new ArgumentNullException(nameof(attendanceUseCase));
|
||||
_presenceGenerator = presenceGenerator ?? throw new ArgumentNullException(nameof(presenceGenerator));
|
||||
}
|
||||
|
||||
public void DisplayMenu()
|
||||
@ -28,45 +33,41 @@ namespace Demo.UI
|
||||
Console.WriteLine("5. Показать все группы");
|
||||
Console.WriteLine("6. Добавить группу");
|
||||
Console.WriteLine("7. Обновить группу");
|
||||
Console.WriteLine("8. Удалить группу по ID"); // Добавлено
|
||||
Console.WriteLine("9. Найти группу по ID"); // Добавлено
|
||||
Console.WriteLine("8. Удалить группу по ID");
|
||||
Console.WriteLine("9. Найти группу по ID");
|
||||
Console.WriteLine("10. Показать все посещаемости");
|
||||
Console.WriteLine("11. Добавить посещаемость");
|
||||
Console.WriteLine("12. Обновить посещаемость");
|
||||
Console.WriteLine("13. Удалить посещаемость");
|
||||
Console.WriteLine("14. Генерация посещаемости на день");
|
||||
Console.WriteLine("15. Генерация посещаемости на неделю");
|
||||
Console.WriteLine("16. Показать посещаемость по группе и дате");
|
||||
Console.WriteLine("17. Показать посещаемость по группе за диапазон дат");
|
||||
|
||||
Console.WriteLine("0. Выход");
|
||||
|
||||
var choice = Console.ReadLine();
|
||||
switch (choice)
|
||||
{
|
||||
case "1":
|
||||
ShowAllUsers();
|
||||
break;
|
||||
case "2":
|
||||
RemoveUser();
|
||||
break;
|
||||
case "3":
|
||||
UpdateUser();
|
||||
break;
|
||||
case "4":
|
||||
FindUserByGuid();
|
||||
break;
|
||||
case "5":
|
||||
ShowAllGroups();
|
||||
break;
|
||||
case "6":
|
||||
AddGroup();
|
||||
break;
|
||||
case "7":
|
||||
UpdateGroup();
|
||||
break;
|
||||
case "8": // Обработчик для удаления группы
|
||||
RemoveGroup();
|
||||
break;
|
||||
case "9": // Обработчик для поиска группы по ID
|
||||
FindGroupById();
|
||||
break;
|
||||
case "0":
|
||||
return;
|
||||
default:
|
||||
Console.WriteLine("Неверный ввод. Попробуйте снова.");
|
||||
break;
|
||||
case "1": ShowAllUsers(); break;
|
||||
case "2": RemoveUser(); break;
|
||||
case "3": UpdateUser(); break;
|
||||
case "4": FindUserByGuid(); break;
|
||||
case "5": ShowAllGroups(); break;
|
||||
case "6": AddGroup(); break;
|
||||
case "7": UpdateGroup(); break;
|
||||
case "8": RemoveGroup(); break;
|
||||
case "9": FindGroupById(); break;
|
||||
case "10": ShowAllAttendances(); break;
|
||||
case "11": AddAttendance(); break;
|
||||
case "12": UpdateAttendance(); break;
|
||||
case "13": RemoveAttendance(); break;
|
||||
case "14": GeneratePresenceForDay(); break;
|
||||
case "15": GeneratePresenceForWeek(); break;
|
||||
case "16": ShowAttendancesByGroupAndDate(); break;
|
||||
case "17": ShowAttendancesByGroupAndDateRange(); break;
|
||||
case "0": return;
|
||||
default: Console.WriteLine("Неверный ввод. Попробуйте снова."); break;
|
||||
}
|
||||
|
||||
Console.WriteLine("Нажмите любую клавишу для продолжения...");
|
||||
@ -80,7 +81,7 @@ namespace Demo.UI
|
||||
Console.WriteLine("Все пользователи:");
|
||||
foreach (var user in users)
|
||||
{
|
||||
Console.WriteLine($"ID: {user.Guid}, Name: {user.FIO}");
|
||||
Console.WriteLine($"GUID: {user.Guid}, ФИО: {user.FIO}, Группа ID: {user.GroupID}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,15 +90,8 @@ namespace Demo.UI
|
||||
Console.Write("Введите GUID пользователя для удаления: ");
|
||||
if (Guid.TryParse(Console.ReadLine(), out var userGuid))
|
||||
{
|
||||
var removed = _userUseCase.RemoveUserByGuid(userGuid);
|
||||
if (removed)
|
||||
{
|
||||
Console.WriteLine("Пользователь успешно удален.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Пользователь не найден.");
|
||||
}
|
||||
var removed = _userUseCase.RemoveUser(userGuid);
|
||||
Console.WriteLine(removed ? "Пользователь удалён." : "Пользователь не найден.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -105,27 +99,6 @@ namespace Demo.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveGroup()
|
||||
{
|
||||
Console.Write("Введите ID группы для удаления: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
var removed = _groupUseCase.RemoveGroupById(groupId);
|
||||
if (removed)
|
||||
{
|
||||
Console.WriteLine("Группа успешно удалена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Группа не найдена.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateUser()
|
||||
{
|
||||
Console.Write("Введите GUID пользователя для обновления: ");
|
||||
@ -135,19 +108,10 @@ namespace Demo.UI
|
||||
if (user != null)
|
||||
{
|
||||
Console.Write("Введите новое имя пользователя: ");
|
||||
var newName = Console.ReadLine();
|
||||
user.FIO = newName; // Обновляем имя
|
||||
user.FIO = Console.ReadLine();
|
||||
|
||||
var updated = _userUseCase.UpdateUser(user);
|
||||
|
||||
if (updated)
|
||||
{
|
||||
Console.WriteLine("Пользователь обновлен.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Не удалось обновить пользователя.");
|
||||
}
|
||||
Console.WriteLine(updated ? "Пользователь обновлён." : "Не удалось обновить пользователя.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -163,16 +127,14 @@ namespace Demo.UI
|
||||
private void FindUserByGuid()
|
||||
{
|
||||
Console.Write("Введите GUID пользователя для поиска: ");
|
||||
var userGuid = Guid.Parse(Console.ReadLine() ?? string.Empty);
|
||||
var userModel = _userUseCase.GetUserModelByGuid(userGuid);
|
||||
|
||||
if (userModel != null)
|
||||
if (Guid.TryParse(Console.ReadLine(), out var userGuid))
|
||||
{
|
||||
Console.WriteLine($"Пользователь найден: ID = {userModel.Guid}, Name = {userModel.FIO}");
|
||||
var userModel = _userUseCase.GetUserModelByGuid(userGuid);
|
||||
Console.WriteLine(userModel != null ? $"Пользователь найден: GUID = {userModel.Guid}, ФИО = {userModel.FIO}" : "Пользователь не найден.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Пользователь не найден.");
|
||||
Console.WriteLine("Некорректный GUID.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,15 +144,16 @@ namespace Demo.UI
|
||||
Console.WriteLine("Все группы:");
|
||||
foreach (var group in groups)
|
||||
{
|
||||
Console.WriteLine($"ID: {group.Id}, Name: {group.Name}");
|
||||
Console.WriteLine($"ID: {group.Id}, Название: {group.Name}");
|
||||
}
|
||||
}
|
||||
|
||||
private void AddGroup()
|
||||
{
|
||||
Console.Write("Введите имя новой группы: ");
|
||||
Console.Write("Введите название новой группы: ");
|
||||
var groupName = Console.ReadLine();
|
||||
_groupUseCase.AddGroup(new Group { Name = groupName });
|
||||
var group = new Demo.Domain.Models.Group { Name = groupName };
|
||||
_groupUseCase.AddGroup(group);
|
||||
Console.WriteLine("Группа добавлена.");
|
||||
}
|
||||
|
||||
@ -199,13 +162,13 @@ namespace Demo.UI
|
||||
Console.Write("Введите ID группы для обновления: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
Console.Write("Введите новое имя группы: ");
|
||||
var newGroupName = Console.ReadLine();
|
||||
var updated = _groupUseCase.UpdateGroup(new Group { Id = groupId, Name = newGroupName });
|
||||
|
||||
if (updated)
|
||||
var group = _groupUseCase.GetGroupById(groupId);
|
||||
if (group != null)
|
||||
{
|
||||
Console.WriteLine("Группа обновлена.");
|
||||
Console.Write("Введите новое название группы: ");
|
||||
group.Name = Console.ReadLine();
|
||||
var updated = _groupUseCase.UpdateGroup(group);
|
||||
Console.WriteLine(updated ? "Группа обновлена." : "Не удалось обновить группу.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -218,25 +181,281 @@ namespace Demo.UI
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveGroup()
|
||||
{
|
||||
Console.Write("Введите ID группы для удаления: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
var removed = _groupUseCase.RemoveGroupById(groupId);
|
||||
Console.WriteLine(removed ? "Группа удалена." : "Группа не найдена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void FindGroupById()
|
||||
{
|
||||
Console.Write("Введите ID группы для поиска: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
var group = _groupUseCase.GetGroupById(groupId);
|
||||
if (group != null)
|
||||
{
|
||||
Console.WriteLine($"Группа найдена: ID = {group.Id}, Name = {group.Name}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Группа не найдена.");
|
||||
}
|
||||
Console.WriteLine(group != null ? $"Группа найдена: ID = {group.Id}, Название = {group.Name}" : "Группа не найдена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowAllAttendances()
|
||||
{
|
||||
var attendances = _attendanceUseCase.GetAllAttendances();
|
||||
Console.WriteLine("Все посещаемости:");
|
||||
foreach (var attendance in attendances)
|
||||
{
|
||||
Console.WriteLine($"User ID: {attendance.UserGuid}, Date: {attendance.Date}, Present: {attendance.IsPresent}");
|
||||
}
|
||||
}
|
||||
|
||||
private void AddAttendance()
|
||||
{
|
||||
Console.Write("Введите GUID пользователя: ");
|
||||
if (Guid.TryParse(Console.ReadLine(), out var userGuid))
|
||||
{
|
||||
Console.Write("Введите дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var date))
|
||||
{
|
||||
Console.Write("Введите номер урока: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var lessonNumber))
|
||||
{
|
||||
var attendance = new Attendance { UserGuid = userGuid, Date = date, LessonNumber = lessonNumber, IsPresent = true };
|
||||
_attendanceUseCase.AddAttendance(attendance);
|
||||
Console.WriteLine("Посещаемость добавлена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный номер урока.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный GUID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateAttendance()
|
||||
{
|
||||
Console.Write("Введите GUID пользователя: ");
|
||||
if (Guid.TryParse(Console.ReadLine(), out var userGuid))
|
||||
{
|
||||
Console.Write("Введите дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var date))
|
||||
{
|
||||
Console.Write("Введите статус присутствия (true/false): ");
|
||||
if (bool.TryParse(Console.ReadLine(), out var isPresent))
|
||||
{
|
||||
var attendance = new Attendance { UserGuid = userGuid, Date = date, LessonNumber = 1, IsPresent = isPresent };
|
||||
var updated = _attendanceUseCase.UpdateAttendance(attendance);
|
||||
Console.WriteLine(updated ? "Посещаемость обновлена." : "Запись о посещаемости не найдена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный статус присутствия.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный GUID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveAttendance()
|
||||
{
|
||||
Console.Write("Введите GUID пользователя: ");
|
||||
if (Guid.TryParse(Console.ReadLine(), out var userGuid))
|
||||
{
|
||||
Console.Write("Введите дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var date))
|
||||
{
|
||||
var removed = _attendanceUseCase.RemoveAttendance(userGuid, date);
|
||||
Console.WriteLine(removed ? "Посещаемость удалена." : "Запись о посещаемости не найдена.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный GUID.");
|
||||
}
|
||||
}
|
||||
|
||||
private void GeneratePresenceForDay()
|
||||
{
|
||||
Console.Write("Введите ID группы: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
Console.Write("Введите номер первого занятия: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var firstLesson))
|
||||
{
|
||||
Console.Write("Введите номер последнего занятия: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var lastLesson))
|
||||
{
|
||||
var currentDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
_presenceGenerator.GeneratePresenceForDay(firstLesson, lastLesson, groupId, currentDate);
|
||||
Console.WriteLine("Посещаемость на текущий день сгенерирована.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный номер последнего занятия.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный номер первого занятия.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID группы.");
|
||||
}
|
||||
}
|
||||
|
||||
private void GeneratePresenceForWeek()
|
||||
{
|
||||
Console.Write("Введите ID группы: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
Console.Write("Введите номер первого занятия: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var firstLesson))
|
||||
{
|
||||
Console.Write("Введите номер последнего занятия: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var lastLesson))
|
||||
{
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
_presenceGenerator.GeneratePresenceForWeek(firstLesson, lastLesson, groupId, startDate);
|
||||
Console.WriteLine("Посещаемость на неделю сгенерирована.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный номер последнего занятия.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный номер первого занятия.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID группы.");
|
||||
}
|
||||
}
|
||||
private void ShowAttendancesByGroupAndDate()
|
||||
{
|
||||
Console.Write("Введите ID группы: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
Console.Write("Введите дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var date))
|
||||
{
|
||||
var attendances = _attendanceUseCase.GetAttendancesByGroupAndDate(groupId, date);
|
||||
if (attendances.Any())
|
||||
{
|
||||
// Построение таблицы
|
||||
Console.WriteLine($"\nПосещаемость для группы {groupId} на дату {date:yyyy-MM-dd}:\n");
|
||||
|
||||
// Заголовок таблицы
|
||||
Console.WriteLine("+------------------------------------------+-----------+");
|
||||
Console.WriteLine($"| {"UserGuid",-40} | {"IsPresent",-9} |");
|
||||
Console.WriteLine("+------------------------------------------+-----------+");
|
||||
|
||||
// Данные таблицы
|
||||
foreach (var attendance in attendances)
|
||||
{
|
||||
Console.WriteLine($"| {attendance.UserGuid,-40} | {attendance.IsPresent,-9} |");
|
||||
Console.WriteLine("+------------------------------------------+-----------+");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"\nНет данных о посещаемости для группы {groupId} на дату {date:yyyy-MM-dd}.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID группы.");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowAttendancesByGroupAndDateRange()
|
||||
{
|
||||
Console.Write("Введите ID группы: ");
|
||||
if (int.TryParse(Console.ReadLine(), out var groupId))
|
||||
{
|
||||
Console.Write("Введите начальную дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var startDate))
|
||||
{
|
||||
Console.Write("Введите конечную дату (гггг-мм-дд): ");
|
||||
if (DateOnly.TryParse(Console.ReadLine(), out var endDate))
|
||||
{
|
||||
var attendances = _attendanceUseCase.GetAttendancesByGroupAndDateRange(groupId, startDate, endDate);
|
||||
if (attendances.Any())
|
||||
{
|
||||
// Построение таблицы
|
||||
Console.WriteLine($"\nПосещаемость для группы {groupId} с {startDate:yyyy-MM-dd} по {endDate:yyyy-MM-dd}:\n");
|
||||
|
||||
// Заголовок таблицы
|
||||
Console.WriteLine("+------------+------------------------------------------+-----------+");
|
||||
Console.WriteLine($"| {"Date",-10} | {"UserGuid",-40} | {"IsPresent",-9} |");
|
||||
Console.WriteLine("+------------+------------------------------------------+-----------+");
|
||||
|
||||
// Данные таблицы
|
||||
foreach (var attendance in attendances)
|
||||
{
|
||||
Console.WriteLine($"| {attendance.Date,-10} | {attendance.UserGuid,-40} | {attendance.IsPresent,-9} |");
|
||||
Console.WriteLine("+------------+------------------------------------------+-----------+");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"\nНет данных о посещаемости для группы {groupId} за период с {startDate:yyyy-MM-dd} по {endDate:yyyy-MM-dd}.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная конечная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная начальная дата.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректный ID группы.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Humanizer.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Humanizer.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.CSharp.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.Workspaces.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.Workspaces.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.CodeAnalysis.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Design.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.Design.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.EntityFrameworkCore.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Caching.Memory.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.DependencyModel.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.DependencyModel.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Logging.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Options.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Microsoft.Extensions.Primitives.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Mono.TextTemplating.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/Npgsql.dll
Normal file
BIN
Demo/bin/Debug/net8.0/Npgsql.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.CodeDom.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.CodeDom.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.AttributedModel.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.AttributedModel.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Convention.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Hosting.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.Runtime.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.Composition.TypedParts.dll
Normal file
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
BIN
Demo/bin/Debug/net8.0/System.IO.Pipelines.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/cs/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/cs/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/de/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/de/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/es/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/es/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/fr/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/fr/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/it/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/it/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/ja/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/ja/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/ko/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/ko/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/pl/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/pl/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/pt-BR/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/pt-BR/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/ru/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/ru/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Demo/bin/Debug/net8.0/tr/Microsoft.CodeAnalysis.resources.dll
Normal file
BIN
Demo/bin/Debug/net8.0/tr/Microsoft.CodeAnalysis.resources.dll
Normal file
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user