Compare commits

...

39 Commits
main ... Devi

Author SHA1 Message Date
Userok
d9aecd0d86 2024-11-11 14:42:39 +03:00
Userok
23b7c0caff 2024-11-11 14:41:23 +03:00
Userok
016a872d76 2024-11-11 14:41:12 +03:00
Userok
116f981a8f 2024-11-11 11:31:26 +03:00
Userok
f5681a2bef 2024-11-08 09:59:01 +03:00
Userok
6cd68fd8f8 2024-11-07 14:31:00 +03:00
Userok
cefc9b3a85 2024-11-07 13:34:43 +03:00
Userok
979f0a84e8 2024-11-06 12:41:04 +03:00
Userok
4f7ef7ffb2 2024-11-06 10:13:11 +03:00
Userok
e86bec8a7f 2024-11-02 13:59:07 +03:00
Userok
34ff2ea057 2024-11-02 13:40:07 +03:00
Userok
6882444548 2024-11-02 12:09:33 +03:00
Userok
9031163ee8 2024-11-02 12:07:18 +03:00
Userok
fc4f46d1b7 Vozmozno eto rabotaet 2024-11-02 10:59:27 +03:00
Userok
023f6a3f3f 2024-11-02 10:50:36 +03:00
Userok
d8b97b4d47 2024-11-01 12:41:07 +03:00
Userok
d72fa80379 2024-11-01 10:52:05 +03:00
Userok
10d049c46b Pravki 2024-11-01 10:49:39 +03:00
Userok
faeb43b8c2 2024-11-01 09:57:09 +03:00
Userok
f21c9eea74 2024-10-31 14:37:45 +03:00
Userok
bbb179fc02 2024-10-30 10:34:52 +03:00
Userok
d8c07ebb08 2024-10-30 10:17:34 +03:00
Userok
fffc809c12 2024-10-30 10:10:40 +03:00
Userok
3eca2dd8f1 2024-10-28 15:03:35 +03:00
Userok
a5a4e43a49 Da 2024-10-28 14:03:52 +03:00
Userok
3e6c03caf4 Pravo 2024-10-28 14:03:42 +03:00
Userok
afe10ed3b0 2024-10-28 14:01:59 +03:00
Userok
e715ee085d Pravki 2024-10-28 11:22:33 +03:00
Userok
7ee7b5a156 2024-10-25 12:40:13 +03:00
Userok
ac0c8401da Pravki 2024-10-25 12:20:05 +03:00
Userok
1b2b3fc51b 2024-10-25 10:59:32 +03:00
Userok
3c2a052a46 2024-10-24 14:43:25 +03:00
Userok
0b0ba67c4d 2024-10-24 13:03:51 +03:00
Userok
65d85df515 2024-10-23 11:39:09 +03:00
Userok
1c0fbe9da6 2024-10-23 11:30:26 +03:00
Userok
6e9a746334 Dev 2024-10-23 11:27:57 +03:00
Userok
bfb33e00c7 2024-10-23 11:22:19 +03:00
Userok
a450c1761e Pravka 2024-10-23 11:14:10 +03:00
Userok
fdfa48d9b9 One 2024-10-21 15:07:01 +03:00
177 changed files with 1349391 additions and 617 deletions

View File

@ -2,9 +2,15 @@
"ExpandedNodes": [ "ExpandedNodes": [
"", "",
"\\Zurnal", "\\Zurnal",
"\\Zurnal\\Date",
"\\Zurnal\\Date\\Repository",
"\\Zurnal\\Domain", "\\Zurnal\\Domain",
"\\Zurnal\\Domain\\UseCase" "\\Zurnal\\Domain\\UseCase",
"\\Zurnal\\Presence",
"\\Zurnal\\RemaDateBase",
"\\Zurnal\\RemaDateBase\\DateDao",
"\\Zurnal\\RemaDateBase\\Interfase",
"\\Zurnal\\UI"
], ],
"SelectedNode": "\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"PreviewInSolutionExplorer": false "PreviewInSolutionExplorer": false
} }

Binary file not shown.

View File

@ -1,48 +1,7 @@
{ {
"Version": 1, "Version": 1,
"WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\", "WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\",
"Documents": [ "Documents": [],
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\domain\\usecase\\usecasepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\domain\\usecase\\usecasepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\presence\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\presence\\usecasegeneratepresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\ui\\meinmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\ui\\meinmenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\ui\\userconsole.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\ui\\userconsole.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\date\\repository\\grouprepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\date\\repository\\grouprepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\date\\localdate\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\date\\localdate\\entity\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\date\\localdate\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\date\\localdate\\localstaticdata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\date\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{29C97C84-2606-4D99-8BF5-4B4674F44541}|Zurnal\\Zurnal.csproj|solutionrelative:zurnal\\date\\repository\\userrepositoryimpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [ "DocumentGroupContainers": [
{ {
"Orientation": 0, "Orientation": 0,
@ -50,137 +9,11 @@
"DocumentGroups": [ "DocumentGroups": [
{ {
"DockedWidth": 200, "DockedWidth": 200,
"SelectedChildIndex": 0, "SelectedChildIndex": -1,
"Children": [ "Children": [
{ {
"$type": "Document", "$type": "Bookmark",
"DocumentIndex": 0, "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
"Title": "UseCasePresence.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"RelativeToolTip": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"ViewState": "AgIAAB0AAAAAAAAAAAAwwDcAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:51:23.091Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "UserConsole.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\UserConsole.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\UserConsole.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\UserConsole.cs",
"RelativeToolTip": "Zurnal\\UI\\UserConsole.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACIAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:39:20.727Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "User.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"RelativeToolTip": "Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:10:50.678Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "UseCaseGeneratePresence.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"RelativeDocumentMoniker": "Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"RelativeToolTip": "Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"ViewState": "AgIAABkAAAAAAAAAAAAgwDEAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:49:23.262Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MeinMenu.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\MeinMenu.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\MeinMenu.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\MeinMenu.cs",
"RelativeToolTip": "Zurnal\\UI\\MeinMenu.cs",
"ViewState": "AgIAABAAAAAAAAAAAAAgwAsAAAAuAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:40:32.085Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Program.cs",
"RelativeDocumentMoniker": "Zurnal\\Program.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Program.cs",
"RelativeToolTip": "Zurnal\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:37:14.956Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "GroupRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"RelativeToolTip": "Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"ViewState": "AgIAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:36:36.451Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "UserUseCase.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeToolTip": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ViewState": "AgIAACUAAAAAAAAAAAAAADQAAAA7AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:34:06.789Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "UserRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"RelativeToolTip": "Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAArAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:32:45.245Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "LocalStaticData.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"RelativeToolTip": "Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAACAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:31:32.261Z",
"EditorCaption": ""
} }
] ]
} }

View File

@ -1,48 +1,7 @@
{ {
"Version": 1, "Version": 1,
"WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\", "WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\",
"Documents": [ "Documents": [],
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Domain\\UseCase\\UseCasePresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\UserConsole.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\UI\\UserConsole.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\User.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Date\\LocalDate\\Entity\\User.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Presence\\UseCaseGeneratePresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Presence\\UseCaseGeneratePresence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\MeinMenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\UI\\MeinMenu.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Domain\\UseCase\\UserUseCase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\UserRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Date\\Repository\\UserRepositoryImpl.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\LocalStaticData.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:Zurnal\\Date\\LocalDate\\LocalStaticData.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [ "DocumentGroupContainers": [
{ {
"Orientation": 0, "Orientation": 0,
@ -50,132 +9,11 @@
"DocumentGroups": [ "DocumentGroups": [
{ {
"DockedWidth": 200, "DockedWidth": 200,
"SelectedChildIndex": 1, "SelectedChildIndex": -1,
"Children": [ "Children": [
{ {
"$type": "Bookmark", "$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "UseCasePresence.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"RelativeToolTip": "Zurnal\\Domain\\UseCase\\UseCasePresence.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABYAAAANAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:51:23.091Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "UserConsole.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\UserConsole.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\UserConsole.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\UserConsole.cs",
"RelativeToolTip": "Zurnal\\UI\\UserConsole.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAACIAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:39:20.727Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "User.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"RelativeToolTip": "Zurnal\\Date\\LocalDate\\Entity\\User.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T11:10:50.678Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "UseCaseGeneratePresence.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"RelativeDocumentMoniker": "Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"RelativeToolTip": "Zurnal\\Presence\\UseCaseGeneratePresence.cs",
"ViewState": "AgIAABkAAAAAAAAAAAAgwDEAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:49:23.262Z"
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "MeinMenu.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\MeinMenu.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\MeinMenu.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\MeinMenu.cs",
"RelativeToolTip": "Zurnal\\UI\\MeinMenu.cs",
"ViewState": "AgIAABAAAAAAAAAAAAAgwAsAAAAuAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:40:32.085Z"
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Program.cs",
"RelativeDocumentMoniker": "Zurnal\\Program.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Program.cs",
"RelativeToolTip": "Zurnal\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:37:14.956Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "GroupRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"RelativeToolTip": "Zurnal\\Date\\Repository\\GroupRepositoryImpl.cs",
"ViewState": "AgIAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:36:36.451Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "UserUseCase.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeToolTip": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ViewState": "AgIAACUAAAAAAAAAAAAAADQAAAA7AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:34:06.789Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "UserRepositoryImpl.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"RelativeToolTip": "Zurnal\\Date\\Repository\\UserRepositoryImpl.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAArAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:32:45.245Z"
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "LocalStaticData.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"RelativeToolTip": "Zurnal\\Date\\LocalDate\\LocalStaticData.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABsAAAACAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-21T10:31:32.261Z"
} }
] ]
} }

BIN
.vs/Zurnal1/v17/.suo Normal file

Binary file not shown.

View File

@ -0,0 +1,109 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\ui\\info.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|solutionrelative:zurnal\\ui\\info.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\ui\\conver.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|solutionrelative:zurnal\\ui\\conver.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|solutionrelative:zurnal\\domain\\usecase\\userusecase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\remadatebase\\remoutdatebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|solutionrelative:zurnal\\remadatebase\\remoutdatebase.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|c:\\users\\profi\\source\\repos\\zurnal\\zurnal\\date\\localdate\\entity\\presence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{1A424C41-55D9-4D22-99F5-4C69E68E1E20}|Zurnal1.csproj|solutionrelative:zurnal\\date\\localdate\\entity\\presence.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 1,
"Children": [
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "conver.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\conver.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\conver.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\conver.cs",
"RelativeToolTip": "Zurnal\\UI\\conver.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-28T10:38:09.432Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Info.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\Info.cs",
"RelativeDocumentMoniker": "Zurnal\\UI\\Info.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\UI\\Info.cs",
"RelativeToolTip": "Zurnal\\UI\\Info.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAAAACMAAAAJAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-28T10:38:07.545Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "RemoutDateBase.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\RemoutDateBase.cs",
"RelativeDocumentMoniker": "Zurnal\\RemaDateBase\\RemoutDateBase.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\RemaDateBase\\RemoutDateBase.cs",
"RelativeToolTip": "Zurnal\\RemaDateBase\\RemoutDateBase.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-28T10:26:33.673Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "UserUseCase.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeDocumentMoniker": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"RelativeToolTip": "Zurnal\\Domain\\UseCase\\UserUseCase.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAZAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-28T10:25:57.458Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Presence.cs",
"DocumentMoniker": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\Presence.cs",
"RelativeDocumentMoniker": "Zurnal\\Date\\LocalDate\\Entity\\Presence.cs",
"ToolTip": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Date\\LocalDate\\Entity\\Presence.cs",
"RelativeToolTip": "Zurnal\\Date\\LocalDate\\Entity\\Presence.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-10-28T10:23:14.477Z",
"EditorCaption": ""
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
}
]
}
]
}
]
}

Binary file not shown.

Binary file not shown.

View File

@ -1,10 +1,4 @@
using System; namespace Zurnal.domain.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models
{ {
public class GroupLocalEntity public class GroupLocalEntity
{ {

View File

@ -1,10 +1,4 @@
using System; namespace Zurnal.domain.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models
{ {
internal class PresenceLocalEntity internal class PresenceLocalEntity
{ {

View File

@ -1,10 +1,4 @@
using System; namespace Zurnal.domain.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models
{ {
public class UserLocalEnity : IEquatable<UserLocalEnity> public class UserLocalEnity : IEquatable<UserLocalEnity>
{ {

View File

@ -1,9 +1,4 @@
using Demo.domain.Models; using Zurnal.domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zurnal.Date.LocalDate namespace Zurnal.Date.LocalDate
{ {

View File

@ -1,63 +1,86 @@
using Demo.domain.Models; using System.Diagnostics;
using System.Diagnostics; using Zurnal.RemaDateBase.DateDao;
using Zurnal.Date.LocalDate; using System.Text.RegularExpressions;
using Zurnal.Date.Repository; using Zurnal.domain.Models;
namespace Demo.Data.Repository namespace Zurnal.Data.Repository
{ {
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")] [DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
public class GroupRepositoryImpl : IGroupRepository public class GroupRepositoryImpl : IGroupRepository
{ {
public List<GroupLocalEntity> GetAllGroups() => LocalStaticData.groups; public List<GroupDao> AllGroup => GroupDao.Name.ToList();
public void AddGroup(GroupLocalEntity newGroup) public IEnumerable<GroupDao> GetAllGroups()
{ {
LocalStaticData.groups.Add(newGroup); return GroupDao.Name;
} }
public void UpdateGroupName(int groupId, string newName) public void AddGroup(GroupDao group)
{ {
var group = LocalStaticData.groups.FirstOrDefault(g => g.Id == groupId); if (group == null)
{
throw new ArgumentNullException(nameof(group));
}
GroupDao.Name.Add(group);
}
public void UpdateGroupName(int groupId, string name)
{
var group = GroupDao.Name.FirstOrDefault(g => g.Id == groupId);
if (group != null) if (group != null)
{ {
group.Name = newName; group.GroupName = name;
} }
} }
public bool UpdateGroupById(int groupId, GroupDao updatedGroup)
public GroupLocalEntity GetGroupById(int groupId)
{ {
return LocalStaticData.groups.FirstOrDefault(g => g.Id == groupId); var group = GroupDao.Name.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
group.GroupName = updatedGroup.GroupName;
return true;
}
return false;
} }
private static string GetDebuggerDisplay() private static string GetDebuggerDisplay()
{ {
return $"GroupRepository with {LocalStaticData.groups.Count} groups"; return $"GroupRepository with {GroupDao.Name.Count} groups";
} }
internal void AddGroup(Group group) public bool RemoveGroupById(int groupId)
{ {
throw new NotImplementedException(); var group = GroupDao.Name.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
GroupDao.Name.Remove(group);
return true;
}
return false;
}
public IEnumerable<GroupDao> AllGroups()
{
return GroupDao.Name.Select(g => new GroupDao { GroupName = g.GroupName, Id = g.Id });
}
public void DeleteGroup(int id)
{
var group = GroupDao.Name.FirstOrDefault(g => g.Id == id);
if (group != null)
{
GroupDao.Name.Remove(group);
}
}
public GroupDao FindGroupById(int groupId)
{
return AllGroup.FirstOrDefault(g => g.Id == groupId);
} }
public List<GroupLocalEntity> GetAllGroup() public List<GroupLocalEntity> GetAllGroup()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public bool RemoveGroupById(int groupID)
{
throw new NotImplementedException();
}
public bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup)
{
throw new NotImplementedException();
}
bool IGroupRepository.AddGroup(GroupLocalEntity newGroup)
{
throw new NotImplementedException();
}
} }
} }

View File

@ -1,18 +1,80 @@
using Demo.domain.Models; using Zurnal.domain.Models;
using System; using Zurnal.RemaDateBase.DateDao;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zurnal.Date.Repository
{
internal interface IGroupRepository internal interface IGroupRepository
{ {
List<GroupDao> AllGroup { get; }
public IEnumerable<GroupDao> AllGroups()
{
return AllGroup.Select(g => new GroupDao { GroupName = g.GroupName, Id = g.Id });
}
List<GroupLocalEntity> GetAllGroup(); List<GroupLocalEntity> GetAllGroup();
bool RemoveGroupById(int groupID); public bool RemoveGroupById(int groupId)
bool UpdateGroupById(int groupID, GroupLocalEntity updatedGroup); {
GroupLocalEntity GetGroupById(int groupID); var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
bool AddGroup(GroupLocalEntity newGroup); if (group != null)
{
AllGroup.Remove(group);
return true;
}
return false;
}
public GroupDao FindGroupById(int groupId)
{
return AllGroup.FirstOrDefault(g => g.Id == groupId);
}
public bool UpdateGroupById(int groupId, GroupDao updatedGroup)
{
if (updatedGroup == null) throw new ArgumentNullException(nameof(updatedGroup));
var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
group.GroupName = updatedGroup.GroupName;
return true;
}
return false;
}
public void DeleteGroup(int id)
{
var group = AllGroup.FirstOrDefault(g => g.Id == id);
if (group != null)
{
AllGroup.Remove(group);
}
}
public IEnumerable<GroupDao> GetAllGroups()
{
return AllGroup;
}
public void UpdateGroupName(int groupId, string name)
{
if (name == null) throw new ArgumentNullException(nameof(name));
var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
group.GroupName = name;
}
}
public bool UpdateUser(Guid userGuid, UserDao updatedUser)
{
if (updatedUser == null) throw new ArgumentNullException(nameof(updatedUser));
var user = AllGroup.SelectMany(g => g.Users).FirstOrDefault(u => u.UserGuid == userGuid);
if (user != null)
{
user.FIO = updatedUser.FIO;
user.GroupID = updatedUser.GroupID;
user.Group = updatedUser.Group;
return true;
}
return false;
} }
} }

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Zurnal.RemaDateBase.DateDao;
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
public class PresenceRepositoryIml : IPresenceRepository
{
private readonly List<PresnceDao> _presences = new List<PresnceDao>();
public void AddPresence(PresnceDao presence)
{
_presences.Add(presence);
}
public PresnceDao GetPresenceById(int id)
{
return _presences.Find(p => p.LessonNumber == id);
}
public IEnumerable<PresnceDao> GetAllPresences()
{
return _presences;
}
public void UpdatePresence(PresnceDao presence)
{
var existingPresence = GetPresenceById(presence.LessonNumber);
if (existingPresence != null)
{
existingPresence.UserGuid = presence.UserGuid;
existingPresence.IsAttendensy = presence.IsAttendensy;
existingPresence.Date = presence.Date;
existingPresence.userDao = presence.userDao;
}
}
public void DeletePresence(int id)
{
var presence = GetPresenceById(id);
if (presence != null)
{
_presences.Remove(presence);
}
}
private string GetDebuggerDisplay()
{
return ToString();
}
}

View File

@ -0,0 +1,46 @@
using Zurnal.Date.LocalDate;
using Zurnal.domain.Models;
using Zurnal.RemaDateBase.DateDao;
namespace Zurnal.Date.Repository.SQLRepos
{
public class SQLGroupRepositoryImpl : IGroupRepository
{
private readonly RemoteDateBaseContext _remoteDataBaseContext;
public SQLGroupRepositoryImpl(RemoteDateBaseContext remoteDataBaseContext) {
_remoteDataBaseContext = remoteDataBaseContext;
}
public List<GroupDao> AllGroup => throw new NotImplementedException();
List<GroupDao> IGroupRepository.AllGroup => throw new NotImplementedException();
public bool AddGroup(GroupLocalEntity newGroup)
{
GroupDao groupDao = new GroupDao { GroupName = newGroup.Name };
var result = _remoteDataBaseContext.Group.Add(groupDao);
if (result != null) {
_remoteDataBaseContext.SaveChanges();
return true; }
return false;
}
public List<GroupLocalEntity> GetAllGroup()
{
return _remoteDataBaseContext.Group.Select(group => new GroupLocalEntity{
Id = group.Id,
Name = group.GroupName}
).ToList();
}
public List<GroupLocalEntity> GetAllGroups() => LocalStaticData.groups;
List<GroupLocalEntity> IGroupRepository.GetAllGroup()
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,49 @@
using Zurnal.Date.LocalDate;
using Zurnal.domain.Models;
using Zurnal.RemaDateBase.DateDao;
namespace Zurnal.Date.Repository.SQLRepos
{
public class SQLPresenceRepositoryImpl : IPresenceRepository
{
private readonly RemoteDateBaseContext _remoteDataBaseContext;
public SQLPresenceRepositoryImpl(RemoteDateBaseContext remoteDataBaseContext) {
_remoteDataBaseContext = remoteDataBaseContext;
}
public void AddPresence(PresnceDao presence)
{
var result = _remoteDataBaseContext.Presence.Add(presence);
if (result != null) {
_remoteDataBaseContext.SaveChanges();
}
}
public PresnceDao GetPresenceById(int id)
{
return _remoteDataBaseContext.Presence.Find(id);
}
public IEnumerable<PresnceDao> GetAllPresences()
{
return _remoteDataBaseContext.Presence.ToList();
}
public void UpdatePresence(PresnceDao presence)
{
_remoteDataBaseContext.Presence.Update(presence);
_remoteDataBaseContext.SaveChanges();
}
public void DeletePresence(int id)
{
var presence = GetPresenceById(id);
if (presence != null)
{
_remoteDataBaseContext.Presence.Remove(presence);
_remoteDataBaseContext.SaveChanges();
}
}
}
}

View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Zurnal.Data.Repository;
using Zurnal.domain.Models;
using Zurnal.RemaDateBase.DateDao;
namespace Zurnal.Date.Repository.SQLRepos
{
public class SQLUserRepositoryImpl : IUserRepository
{
private readonly RemoteDateBaseContext _remoteDataBaseContext;
public SQLUserRepositoryImpl(RemoteDateBaseContext remoteDataBaseContext)
{
_remoteDataBaseContext = remoteDataBaseContext;
}
public List<UserDao> GetAllUsers =>
_remoteDataBaseContext.User.Select(user => new UserDao
{
UserGuid = user.UserGuid,
FIO = user.FIO,
GroupID = user.GroupID,
}).ToList();
public bool RemoveUserByGuid(Guid userGuid)
{
var user = _remoteDataBaseContext.User.Find(userGuid);
if (user == null) return false;
_remoteDataBaseContext.User.Remove(user);
_remoteDataBaseContext.SaveChanges();
return true;
}
public UserDao? GetUserByGuid(Guid userGuid)
{
var user = _remoteDataBaseContext.User.Find(userGuid);
if (user == null) return null;
return new UserDao
{
UserGuid = user.UserGuid,
FIO = user.FIO,
GroupID = user.GroupID,
};
}
public UserDao? UpdateUser(UserDao userUpdateLocalEnity)
{
var user = _remoteDataBaseContext.User.Find(userUpdateLocalEnity.UserGuid);
if (user == null) return null;
user.FIO = userUpdateLocalEnity.FIO;
user.GroupID = userUpdateLocalEnity.GroupID;
_remoteDataBaseContext.SaveChanges();
return userUpdateLocalEnity;
}
}
}

View File

@ -1,22 +1,21 @@
using Demo.domain.Models; using Zurnal.domain.Models;
using Zurnal.Date.LocalDate; using Zurnal.Date.LocalDate;
using Zurnal.Date.Repository; using Zurnal.Domain.UseCase;
using Zurnal.RemaDateBase.DateDao;
namespace Demo.Data.Repository namespace Zurnal.Data.Repository
{ {
public class UserRepositoryImpl : IGroupRepository public class UserRepositoryImpl : IUserRepository
{ {
public UserRepositoryImpl() { public UserRepositoryImpl() => GetAllUsers = LocalStaticData.users;
GetAllUsers = LocalStaticData.users;
}
public List<UserLocalEnity> GetAllUsers public List<UserLocalEnity> GetAllUsers { get; set; }
{ get; set; }
public bool RemoveUserByGuid(Guid userGuid) public bool RemoveUserByGuid(Guid userGuid)
{ {
UserLocalEnity? userLocal = GetAllUsers UserLocalEnity? userLocal = GetAllUsers
.Where(x => x.Guid == userGuid).FirstOrDefault(); .Where(x => x.Guid == userGuid)
.FirstOrDefault();
if (userLocal == null) return false; if (userLocal == null) return false;
return GetAllUsers.Remove(userLocal); return GetAllUsers.Remove(userLocal);
@ -38,35 +37,11 @@ namespace Demo.Data.Repository
userLocal.GroupID = userUpdateLocalEnity.GroupID; userLocal.GroupID = userUpdateLocalEnity.GroupID;
return userLocal; return userLocal;
} }
public List<UserLocalEnity> GetAllUsersList() public List<UserLocalEnity> GetAllUsersList()
{ {
return GetAllUsers; return GetAllUsers;
} }
List<GroupLocalEntity> IGroupRepository.GetAllGroup()
{
throw new NotImplementedException();
}
bool IGroupRepository.RemoveGroupById(int groupID)
{
throw new NotImplementedException();
}
bool IGroupRepository.UpdateGroupById(int groupID, GroupLocalEntity updatedGroup)
{
throw new NotImplementedException();
}
GroupLocalEntity IGroupRepository.GetGroupById(int groupID)
{
throw new NotImplementedException();
}
bool IGroupRepository.AddGroup(GroupLocalEntity newGroup)
{
throw new NotImplementedException();
} }
} }
}

View File

@ -1,20 +1,25 @@
using System; using Zurnal.RemaDateBase.DateDao;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models namespace Zurnal.domain.Models
{ {
public class Group public class Group
{ {
public required int Id { get; set; } public required int Id { get; set; }
public required string Name { get; set; } public required string Name { get; set; }
public static implicit operator Group(GroupLocalEntity v) public static implicit operator Group?(GroupLocalEntity? v)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public static implicit operator Guid(Group v)
{
throw new NotImplementedException();
}
public static implicit operator Group?(GroupDao? v)
{
throw new NotImplementedException();
}
} }
} }

View File

@ -1,10 +1,4 @@
using System; namespace Zurnal.domain.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models
{ {
public class Presence public class Presence
{ {

View File

@ -1,13 +1,9 @@
using System; namespace Zurnal.domain.Models
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.domain.Models
{ {
public class User public class User
{ {
internal int Id;
public required string FIO { get; set; } public required string FIO { get; set; }
public Guid Guid { get; set; } public Guid Guid { get; set; }

View File

@ -0,0 +1,7 @@
namespace domain.Models.RequestModels
{
public class GroupAddRequest
{
public string Name { get; set; }
}
}

View File

@ -0,0 +1,4 @@
public class GroupResponse{
public int Id {get; set;}
public string Name {get; set;}
}

View File

@ -1,20 +1,20 @@
using Demo.Data.Repository; using Zurnal.Data.Repository;
using Demo.domain.Models; using Zurnal.domain.Models;
using System; using Zurnal.RemaDateBase.DateDao;
using System.Collections.Generic; namespace Zurnal.Domain.UseCase
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.Domain.UseCase
{ {
public class GroupUseCase public class GroupUseCase : IGroupRepository
{ {
private readonly IGroupRepository _repository;
private List<GroupDao> _groups = new List<GroupDao>();
public List<GroupDao> AllGroup => _groups;
private UserRepositoryImpl _repositoryUserImpl; private UserRepositoryImpl _repositoryUserImpl;
private GroupRepositoryImpl _repositoryGroupImpl; private GroupRepositoryImpl _repositoryGroupImpl;
public List<Group> GetAllGroups() => _repositoryGroupImpl.GetAllGroups()
.Select(it => new Group { Id = it.Id, Name = it.Name }).ToList();
public List<GroupDao> GetAllGroups() => _repositoryGroupImpl.GetAllGroups()
.Select(it => new GroupDao { Id = it.Id, GroupName = it.GroupName }).ToList();
public GroupUseCase(UserRepositoryImpl repositoryImpl, GroupRepositoryImpl repositoryGroupImpl) public GroupUseCase(UserRepositoryImpl repositoryImpl, GroupRepositoryImpl repositoryGroupImpl)
{ {
@ -22,7 +22,7 @@ namespace Demo.Domain.UseCase
_repositoryGroupImpl = repositoryGroupImpl; _repositoryGroupImpl = repositoryGroupImpl;
} }
public void AddGroup(Group group) public void AddGroup(GroupDao group)
{ {
_repositoryGroupImpl.AddGroup(group: group); _repositoryGroupImpl.AddGroup(group: group);
} }
@ -32,5 +32,48 @@ namespace Demo.Domain.UseCase
_repositoryGroupImpl.UpdateGroupName(groupId, newName); _repositoryGroupImpl.UpdateGroupName(groupId, newName);
} }
public IEnumerable<GroupDao> AllGroups()
{
throw new NotImplementedException();
}
public bool RemoveGroupById(int groupID)
{
var group = _repositoryGroupImpl.FindGroupById(groupID);
if (group == null)
{
return false;
}
_repositoryGroupImpl.DeleteGroup(groupID);
return true;
}
IEnumerable<GroupDao> IGroupRepository.GetAllGroups()
{
return _repositoryGroupImpl.GetAllGroups()
.Select(it => new GroupDao { Id = it.Id, GroupName = it.GroupName, Users = it.Users })
.ToList();
}
public GroupDao GetGroupById(int id)
{
return _groups.FirstOrDefault(g => g.Id == id);
}
public List<GroupResponse> getAllGroup(){
return _repository.GetAllGroup().Select(group =>
new GroupResponse {
Id = group.Id,
Name = group.Name
}
).ToList();
}
public List<GroupLocalEntity> GetAllGroup()
{
throw new NotImplementedException();
}
} }
} }

View File

@ -1,54 +1,35 @@
using System; using Zurnal.RemaDateBase.DateDao;
using System.Collections.Generic; using static Zurnal.Presence.UseCaseGeneratePresence;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zurnal.Domain.UseCase namespace Zurnal.Domain.UseCase
{ {
internal class UseCasePresence internal class UseCasePresence
{ {
private Dictionary<string, List<DateTime>> attendanceRecords; private List<PresnceDao> attendanceRecords;
public UseCasePresence() public UseCasePresence(List<PresnceDao> attendanceRecords)
{ {
attendanceRecords = new Dictionary<string, List<DateTime>>(); this.attendanceRecords = attendanceRecords;
} }
public void MarkAttendance(string group, DateTime date) public List<PresnceDao> GetAttendanceByGroup(string groupNumber)
{ {
if (!attendanceRecords.ContainsKey(group)) return attendanceRecords.Where(record => record.userDao.Group.GroupName == groupNumber).ToList();
{
attendanceRecords[group] = new List<DateTime>();
}
attendanceRecords[group].Add(date);
} }
public List<DateTime> GetAttendanceByGroup(string group) public List<PresnceDao> GetAttendanceByGroupAndDate(string groupNumber, DateOnly date)
{ {
if (attendanceRecords.ContainsKey(group)) return attendanceRecords.Where(record => record.userDao.Group.GroupName == groupNumber && record.Date == date).ToList();
{
return attendanceRecords[group];
}
return new List<DateTime>();
} }
public List<DateTime> GetAttendanceByGroupAndDate(string group, DateTime date) public void MarkUserAsAbsent(string groupNumber, int firstLesson, int lastLesson, DateOnly date)
{ {
if (attendanceRecords.ContainsKey(group)) foreach (var lesson in Enumerable.Range(firstLesson, lastLesson - firstLesson + 1))
{ {
return attendanceRecords[group].Where(d => d.Date == date.Date).ToList(); var record = attendanceRecords.FirstOrDefault(r => r.userDao.Group.GroupName == groupNumber && r.LessonNumber == lesson && r.Date == date);
} if (record != null)
return new List<DateTime>();
}
public void MarkUserAsAbsent(string group, DateTime startDate, DateTime endDate)
{ {
if (attendanceRecords.ContainsKey(group)) record.IsAttendensy = false;
{
for (DateTime date = startDate; date <= endDate; date = date.AddDays(1))
{
attendanceRecords[group].Remove(date);
} }
} }
} }

View File

@ -1,57 +1,79 @@
using Demo.Data.Repository; using Zurnal.Data.Repository;
using Demo.domain.Models; using Zurnal.domain.Models;
using System; using Zurnal.RemaDateBase.DateDao;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zurnal.Date.Repository;
namespace Demo.Domain.UseCase namespace Zurnal.Domain.UseCase
{ {
public class UserUseCase public class UserUseCase : IUserRepository
{ {
private UserRepositoryImpl _repositoryUserImpl; private readonly UserRepositoryImpl _repositoryUserImpl;
private readonly IGroupRepository _repositoryGroupImpl; internal IGroupRepository RepositoryGroupImpl { get; }
internal IGroupRepository RepositoryGroupImpl => _repositoryGroupImpl; List<UserLocalEnity> IUserRepository.GetAllUsers => throw new NotImplementedException();
public List<GroupDao> AllGroup => throw new NotImplementedException();
public UserUseCase(UserRepositoryImpl repositoryImpl, GroupRepositoryImpl repositoryGroupImpl) public UserUseCase(UserRepositoryImpl repositoryImpl, GroupRepositoryImpl repositoryGroupImpl)
{ {
_repositoryUserImpl = repositoryImpl; _repositoryUserImpl = repositoryImpl;
_repositoryGroupImpl = (IGroupRepository?)repositoryGroupImpl; RepositoryGroupImpl = (IGroupRepository?)(repositoryGroupImpl ?? throw new ArgumentNullException(nameof(repositoryGroupImpl)));
} }
public List<Group> GetAllGroups() => RepositoryGroupImpl.GetAllGroup() public List<UserDao> GetAllUsers() => _repositoryUserImpl.GetAllUsersList()
.Select(it => new Group { Id = it.Id, Name = it.Name}).ToList(); .Join(RepositoryGroupImpl.AllGroup,
public List<User> GetAllUsers() => _repositoryUserImpl.GetAllUsers
.Join(RepositoryGroupImpl.GetAllGroup(),
user => user.GroupID, user => user.GroupID,
group => group.Id, group => group.Id,
(user, group) => (user, group) =>
new User { FIO = user.FIO, new UserDao { FIO = user.FIO,
Guid = user.Guid, UserGuid = user.Guid,
Group = new Group {Id = group.Id, Name = group.Name } } Group = new GroupDao { Id = group.Id, GroupName = group.GroupName },
GroupID = group.Id }
).ToList(); ).ToList();
public bool RemoveUserByGuid(Guid userGuid) { public bool RemoveUserByGuid(Guid userGuid)
{
return _repositoryUserImpl.RemoveUserByGuid(userGuid); return _repositoryUserImpl.RemoveUserByGuid(userGuid);
} }
public User UpdateUser(User user) {
UserLocalEnity userLocalEnity = new UserLocalEnity { FIO = user.FIO, GroupID = user.Group.Id, Guid = user.Guid }; public IEnumerable<GroupDao> GetAllGroups()
UserLocalEnity? result = _repositoryUserImpl.UpdateUser(userLocalEnity); {
if (result == null) throw new Exception(""); return RepositoryGroupImpl.AllGroup;
Group? group = GetAllGroups().FirstOrDefault(it => it.Id == result!.GroupID);
if (group == null) throw new Exception("Группа не найдена");
return new User { FIO = user.FIO, Guid = user.Guid, Group = group };
} }
public User FindUserByGuid(Guid userGuid) public UserDao FindUserByGuid(Guid userGuid)
{ {
var user = _repositoryUserImpl.GetAllUsersList().FirstOrDefault(u => u.Guid == userGuid); var user = _repositoryUserImpl.GetAllUsersList().FirstOrDefault(u => u.Guid == userGuid);
if (user == null) throw new Exception("Нет такого пользователя"); if (user == null)
var group = RepositoryGroupImpl.GetAllGroup().FirstOrDefault(g => g.Id == user.GroupID); {
return new User { FIO = user.FIO, Guid = user.Guid, Group = group }; Console.WriteLine("Пользователь не найден.");
return null;
}
GroupDao group = RepositoryGroupImpl.AllGroup.FirstOrDefault(g => g.Id == user.GroupID);
if (group == null)
{
Console.WriteLine("Группа не найдена.");
return null;
}
return new UserDao { FIO = user.FIO, UserGuid = user.Guid, Group = group, GroupID = group.Id };
}
public UserLocalEnity? GetUserByGuid(Guid userGuid)
{
throw new NotImplementedException();
}
public UserLocalEnity? UpdateUser(UserLocalEnity userUpdateLocalEnity)
{
throw new NotImplementedException();
}
internal class UserLocalEntity
{
public string FIO { get; set; }
public int GroupID { get; set; }
public Guid Guid { get; set; }
} }
} }
} }

View File

@ -1,17 +1,23 @@
using System; namespace Zurnal.Presence
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zurnal.Presence
{ {
internal class UseCaseGeneratePresence internal class UseCaseGeneratePresence
{ {
internal class AttendanceRecord
{
public int LessonNumber { get; set; }
public required string GroupNumber { get; set; }
public DateTime Date { get; set; }
public bool IsPresent { get; set; }
}
public List<AttendanceRecord> GenerateDailyAttendance(int firstLesson, int lastLesson, string groupNumber, DateTime currentDate) public List<AttendanceRecord> GenerateDailyAttendance(int firstLesson, int lastLesson, string groupNumber, DateTime currentDate)
{ {
List<AttendanceRecord> attendanceRecords = new List<AttendanceRecord>(); List<AttendanceRecord> attendanceRecords = new List<AttendanceRecord>();
var users = Zurnal.RemaDateBase.DateDao.GroupDao.Name
.FirstOrDefault(g => g.GroupName == groupNumber)?.Users;
foreach (var user in users)
{
for (int lesson = firstLesson; lesson <= lastLesson; lesson++) for (int lesson = firstLesson; lesson <= lastLesson; lesson++)
{ {
attendanceRecords.Add(new AttendanceRecord attendanceRecords.Add(new AttendanceRecord
@ -22,6 +28,7 @@ namespace Zurnal.Presence
IsPresent = true IsPresent = true
}); });
} }
}
return attendanceRecords; return attendanceRecords;
} }
@ -39,12 +46,4 @@ namespace Zurnal.Presence
return weeklyAttendanceRecords; return weeklyAttendanceRecords;
} }
} }
internal class AttendanceRecord
{
public int LessonNumber { get; set; }
public string GroupNumber { get; set; }
public DateTime Date { get; set; }
public bool IsPresent { get; set; }
}
} }

View File

@ -1,9 +1,28 @@
using Demo.Data.Repository; using Zurnal.Data.Repository;
using Demo.Domain.UseCase; using Zurnal.Date.Repository.SQLRepos;
using Demo.UI; using Zurnal.Domain.UseCase;
using Zurnal.Presence;
using Zurnal.UI;
GroupRepositoryImpl groupRepositoryImpl = new GroupRepositoryImpl(); class Programka
UserRepositoryImpl userRepositoryImpl = new UserRepositoryImpl(); {
UserUseCase userUseCase = new UserUseCase(userRepositoryImpl, groupRepositoryImpl); static void Main(string[] args)
{
IServiceCollection services = new ServiceCollection();
MainMenuUI mainMenuUI = new MainMenuUI(userUseCase); services
.AddDbContext<RemoteDateBaseContext>()
.AddSingleton<IGroupRepository, SQLGroupRepositoryImpl>()
.AddSingleton<IUserRepository, SQLUserRepositoryImpl>()
.AddSingleton<IPresenceRepository, SQLPresenceRepositoryImpl>()
.AddSingleton<UserUseCase>()
.AddSingleton<GroupUseCase>()
.AddSingleton<UseCaseGeneratePresence>()
.AddSingleton<MainMenuUI>();
var serviceProvider = services.BuildServiceProvider();
MainMenuUI mainMenuUI = serviceProvider.GetService<MainMenuUI>();
mainMenuUI.DisplayMenu();
}
}

View File

@ -0,0 +1,12 @@

namespace Zurnal.RemaDateBase.DateDao
{
public class GroupDao
{
internal static List<GroupDao> Name = new List<GroupDao>();
public int Id { get; set; }
public required string GroupName { get; set; }
public IEnumerable<UserDao> Users { get; set; }
}
}

View File

@ -0,0 +1,12 @@
namespace Zurnal.RemaDateBase.DateDao
{
public class PresnceDao
{
public Guid UserGuid { get; set; }
public bool IsAttendensy { get; set; } = true;
public int LessonNumber { get; set; }
public DateOnly Date { get; set; }
public UserDao userDao { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Zurnal.RemaDateBase.DateDao
{
public class UserAttendance
{
public int UserId { get; set; }
public double Attended { get; set; }
public double Missed { get; set; }
public double AttendanceRate { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Zurnal.RemaDateBase.DateDao
{
public class UserDao
{
public required string FIO { get; set; }
public Guid UserGuid { get; set; }
public GroupDao Group { get; set; }
public required int GroupID { get; set; }
}
}

View File

@ -0,0 +1,84 @@
using Zurnal.domain.Models;
using Zurnal.RemaDateBase.DateDao;
using Group = System.Text.RegularExpressions.Group;
namespace Zurnal.RemaDateBase
{
public interface IGroupRepository
{
List<GroupDao> AllGroup { get; }
public IEnumerable<GroupDao> AllGroups()
{
return AllGroup.Select(g => new GroupDao { GroupName = g.GroupName, Id = g.Id });
}
public bool RemoveGroupById(int groupId)
{
var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
AllGroup.Remove(group);
return true;
}
return false;
}
public GroupDao FindGroupById(int groupId)
{
return AllGroup.FirstOrDefault(g => g.Id == groupId);
}
public bool UpdateGroupById(int groupId, GroupDao updatedGroup)
{
if (updatedGroup == null) throw new ArgumentNullException(nameof(updatedGroup));
var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
group.GroupName = updatedGroup.GroupName;
return true;
}
return false;
}
public void DeleteGroup(int id)
{
var group = AllGroup.FirstOrDefault(g => g.Id == id);
if (group != null)
{
AllGroup.Remove(group);
}
}
public IEnumerable<GroupDao> GetAllGroups()
{
return AllGroup;
}
public void UpdateGroupName(int groupId, string name)
{
if (name == null) throw new ArgumentNullException(nameof(name));
var group = AllGroup.FirstOrDefault(g => g.Id == groupId);
if (group != null)
{
group.GroupName = name;
}
}
public bool UpdateUser(Guid userGuid, UserDao updatedUser)
{
if (updatedUser == null) throw new ArgumentNullException(nameof(updatedUser));
var user = AllGroup.SelectMany(g => g.Users).FirstOrDefault(u => u.UserGuid == userGuid);
if (user != null)
{
user.FIO = updatedUser.FIO;
user.GroupID = updatedUser.GroupID;
user.Group = updatedUser.Group;
return true;
}
return false;
}
}
}

View File

@ -0,0 +1,10 @@
using Zurnal.RemaDateBase.DateDao;
public interface IPresenceRepository
{
void AddPresence(PresnceDao presence);
PresnceDao GetPresenceById(int id);
IEnumerable<PresnceDao> GetAllPresences();
void UpdatePresence(PresnceDao presence);
void DeletePresence(int id);
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using Zurnal.domain.Models;
using Zurnal.RemaDateBase.DateDao;
namespace Zurnal.Data.Repository
{
public interface IUserRepository
{
List<UserDao> GetAllUsers { get; }
bool RemoveUserByGuid(Guid userGuid);
UserDao? GetUserByGuid(Guid userGuid);
UserDao? UpdateUser(UserDao userUpdateLocalEnity);
}
}

View File

@ -0,0 +1,80 @@
using Zurnal.RemaDateBase.DateDao;
public class PresenceRepository : IPresenceRepository
{
private List<PresnceDao> presences = new List<PresnceDao>();
public void AddPresence(PresnceDao presence)
{
presences.Add(new PresnceDao
{
UserGuid = presence.UserGuid,
IsAttendensy = presence.IsAttendensy,
LessonNumber = presence.LessonNumber,
Date = presence.Date,
userDao = new UserDao
{
FIO = presence.userDao.FIO,
UserGuid = presence.userDao.UserGuid,
GroupID = presence.userDao.GroupID,
Group = new GroupDao { Id = presence.userDao.Group.Id, GroupName = presence.userDao.Group.GroupName }
}
});
}
public PresnceDao GetPresenceById(int id)
{
var presence = presences.FirstOrDefault(p => p.LessonNumber == id);
return presence != null ? new PresnceDao
{
UserGuid = presence.UserGuid,
IsAttendensy = presence.IsAttendensy,
LessonNumber = presence.LessonNumber,
Date = presence.Date,
userDao = new UserDao
{
FIO = presence.userDao.FIO,
GroupID = presence.userDao.GroupID,
Group = presence.userDao.Group
}
} : null;
}
public IEnumerable<PresnceDao> GetAllPresences()
{
return presences.Select(p => new PresnceDao
{
UserGuid = p.UserGuid,
IsAttendensy = p.IsAttendensy,
LessonNumber = p.LessonNumber,
Date = p.Date,
userDao = new UserDao
{
FIO = p.userDao.FIO,
GroupID = p.userDao.GroupID,
Group = p.userDao.Group
}
}).ToList();
}
public void UpdatePresence(PresnceDao presence)
{
var existingPresence = presences.FirstOrDefault(p => p.LessonNumber == presence.LessonNumber);
if (existingPresence != null)
{
existingPresence.IsAttendensy = presence.IsAttendensy;
existingPresence.Date = presence.Date;
existingPresence.userDao.FIO = presence.userDao.FIO;
existingPresence.userDao.GroupID = presence.userDao.GroupID;
existingPresence.userDao.Group.GroupName = presence.userDao.Group.GroupName;
}
}
public void DeletePresence(int id)
{
var presence = presences.FirstOrDefault(p => p.LessonNumber == id);
if (presence != null)
{
presences.Remove(presence);
}
}
}

View File

@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore;
using Zurnal.RemaDateBase.DateDao;
public class RemoteDateBaseContext : DbContext
{
public DbSet<GroupDao> Group { get; set; }
public DbSet<UserDao> User { get; set; }
public DbSet<PresnceDao> Presence { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql("Host=45.67.56.214;Port=5421;Username=user16;Password=dZ28IVE5;Database=user16");
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<GroupDao>().HasKey(group => group.Id);
modelBuilder.Entity<GroupDao>().Property(group => group.Id).ValueGeneratedOnAdd();
modelBuilder.Entity<UserDao>().HasKey(user => user.UserGuid);
modelBuilder.Entity<UserDao>().Property(user => user.UserGuid).ValueGeneratedOnAdd();
modelBuilder.Entity<PresnceDao>().HasKey(presence => new
{
presence.UserGuid,
presence.Date,
presence.IsAttendensy,
presence.LessonNumber
});
}
}

33
Zurnal/UI/GroupConsol.cs Normal file
View File

@ -0,0 +1,33 @@
using domain;
using domain.Models.RequestModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zurnal.Domain.UseCase;
using Zurnal.RemaDateBase.DateDao;
namespace UI
{
public class GroupConsol
{
private readonly GroupUseCase _groupUseCase;
public GroupConsol(GroupUseCase groupUseCase) {
_groupUseCase = groupUseCase;
}
public void AddGroup() {
Console.WriteLine("Введите название группы: ");
string groupName = Console.ReadLine();
if (string.IsNullOrWhiteSpace(groupName)) {
Console.WriteLine("Название группы не может быть пустым. Пожалуйста, введите корректное название.");
return;
}
GroupDao groupDao = new GroupDao { GroupName = groupName };
_groupUseCase.AddGroup(groupDao);
}
}
}

View File

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Zurnal.RemaDateBase.DateDao
{
public class GroupInfo
{
public int TotalStudents { get; set; }
public int TotalLessons { get; set; }
public double AttendancePercentage { get; set; }
public List<StudentAttendance> StudentAttendances { get; set; }
public GroupInfo(GroupDao group)
{
TotalStudents = group.Users.Count();
TotalLessons = group.Users.SelectMany(u => u.Group.Users).Count();
AttendancePercentage = CalculateAttendancePercentage(group);
StudentAttendances = GetStudentAttendances(group);
}
private double CalculateAttendancePercentage(GroupDao group)
{
var totalAttendance = group.Users.Sum(u => u.Group.Users.Count(x => x.IsAttendensy));
var totalClasses = group.Users.Count() * group.Users.FirstOrDefault()?.Group.Users.Count() ?? 0;
return totalClasses > 0 ? (double)totalAttendance / totalClasses * 100 : 0;
}
private List<StudentAttendance> GetStudentAttendances(GroupDao group)
{
return group.Users.Select(u => new StudentAttendance
{
FIO = u.FIO,
AttendedLessons = u.Group.Users.Count(x => x.UserGuid == u.UserGuid && x.IsAttendensy),
MissedLessons = u.Group.Users.Count(x => x.UserGuid == u.UserGuid && !x.IsAttendensy),
AttendancePercentage = (u.Group.Users.Count(x => x.UserGuid == u.UserGuid && x.IsAttendensy) / (double)TotalLessons) * 100
}).ToList();
}
}
public class StudentAttendance
{
public string FIO { get; set; }
public int AttendedLessons { get; set; }
public int MissedLessons { get; set; }
public double AttendancePercentage { get; set; }
}
}

94
Zurnal/UI/Info.cs Normal file
View File

@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Zurnal.RemaDateBase.DateDao;
public class GroupAttendanceService
{
private List<PresnceDao> attendances;
public GroupAttendanceService(List<PresnceDao> records)
{
attendances = records;
}
public void DisplayGroupInfo(Guid userGuid, object GroupName, IEnumerable<UserDao> users)
{
Console.WriteLine($"Группа: {GroupName}");
Console.WriteLine($"Количество студентов: {users.Count()}");
var totalClasses = new AttendanceCounter(attendances).CountAttendances(userGuid);
Console.WriteLine($"Количество проведенных занятий: {totalClasses}");
var overallAttendancePercentage = CalculateAttendancePercentage(attendances, userGuid);
Console.WriteLine($"Общий процент посещаемости: {overallAttendancePercentage:F2}%");
Console.WriteLine("Список студентов:");
foreach (var user in users)
{
var attendanceInfo = GetAttendanceInfo(user);
Console.WriteLine($"{user.FIO}: Посещенные занятия: {attendanceInfo.AttendedClasses}, Пропущенные занятия: {attendanceInfo.MissedClasses}, Процент посещаемости: {attendanceInfo.AttendancePercentage:F2}%");
}
}
public class AttendanceCounter
{
private List<PresnceDao> _attendances;
public AttendanceCounter(List<PresnceDao> attendances)
{
_attendances = attendances;
}
public int CountAttendances(Guid userGuid)
{
return _attendances.Count(a => a.UserGuid == userGuid && a.IsAttendensy);
}
}
public static double CalculateAttendancePercentage(List<PresnceDao> attendanceRecords, Guid userGuid)
{
var userRecords = attendanceRecords.Where(record => record.UserGuid == userGuid).ToList();
if (userRecords.Count == 0) return 0;
int totalLessons = userRecords.Count;
int attendedLessons = userRecords.Count(record => record.IsAttendensy);
return (double)attendedLessons / totalLessons * 100;
}
private (int AttendedClasses, int MissedClasses, double AttendancePercentage) GetAttendanceInfo(UserDao user)
{
var attendanceRecords = this.attendances.Where(record => record.UserGuid == user.UserGuid).ToList();
int attendedClasses = attendanceRecords.Count(record => record.IsAttendensy);
int missedClasses = attendanceRecords.Count - attendedClasses;
double attendancePercentage = attendanceRecords.Count == 0 ? 0 : (double)attendedClasses / attendanceRecords.Count * 100;
return (attendedClasses, missedClasses, attendancePercentage);
}
public List<PresnceDao> GetAttendanceByUser(Guid userGuid)
{
return attendances.Where(record => record.UserGuid == userGuid).ToList();
}
public Dictionary<DateOnly, int> GetAttendanceSummary(Guid userGuid)
{
var userAttendance = attendances.Where(record => record.UserGuid == userGuid);
var summary = new Dictionary<DateOnly, int>();
foreach (var record in userAttendance)
{
if (summary.ContainsKey(record.Date))
{
summary[record.Date]++;
}
else
{
summary[record.Date] = 1;
}
}
return summary;
}
}

View File

@ -1,6 +1,5 @@
using Demo.Domain.UseCase; using Zurnal.Domain.UseCase;
namespace Zurnal.UI
namespace Demo.UI
{ {
public class MainMenuUI public class MainMenuUI
{ {
@ -14,7 +13,7 @@ namespace Demo.UI
} }
private void DisplayMenu() public void DisplayMenu()
{ {
while (true) while (true)
{ {
@ -27,9 +26,8 @@ namespace Demo.UI
DisplayMenu(); DisplayMenu();
break; break;
} }
}
} }
} }
} }
}

View File

@ -1,11 +1,7 @@
using Demo.Domain.UseCase; using System.Text;
using System; using Zurnal.Domain.UseCase;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.UI namespace Zurnal.UI
{ {
public class UserConsoleUI public class UserConsoleUI
{ {
@ -27,7 +23,7 @@ namespace Demo.UI
StringBuilder userOutput = new StringBuilder(); StringBuilder userOutput = new StringBuilder();
foreach (var user in _userUseCase.GetAllUsers()) foreach (var user in _userUseCase.GetAllUsers())
{ {
userOutput.AppendLine($"{user.Guid}\t{user.FIO}\t{user.Group.Name}"); userOutput.AppendLine($"{user.UserGuid}\t{user.FIO}\t{user.Group.GroupName}");
} }
Console.WriteLine(userOutput); Console.WriteLine(userOutput);
} }

50
Zurnal/UI/conver.cs Normal file
View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using OfficeOpenXml;
class Conver
{
static void Main()
{
var attendanceData = new Dictionary<string, Dictionary<DateTime, bool>>
{
{ "Студент 1", new Dictionary<DateTime, bool> { { new DateTime(2023, 10, 1), true }, { new DateTime(2023, 10, 2), false } } },
{ "Студент 2", new Dictionary<DateTime, bool> { { new DateTime(2023, 10, 1), true }, { new DateTime(2023, 10, 2), true } } }
};
using (ExcelPackage excel = new ExcelPackage())
{
foreach (var group in attendanceData)
{
var worksheet = excel.Workbook.Worksheets.Add(group.Key);
worksheet.Cells[1, 1].Value = "Студент";
int column = 2;
foreach (var date in group.Value.Keys)
{
worksheet.Cells[1, column].Value = date.ToShortDateString();
column++;
}
int row = 2;
foreach (var student in group.Value)
{
worksheet.Cells[row, 1].Value = student.Key;
column = 2;
foreach (var date in group.Value.Keys)
{
worksheet.Cells[row, column].Value = group.Value[date] ? "Присутствует" : "Отсутствует";
column++;
}
row++;
}
}
FileInfo excelFile = new FileInfo(@"C:\Users\profi\source\Musor\Xcel\Pametka.xlsx");
excel.SaveAs(excelFile);
}
}
}

View File

@ -8,7 +8,14 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.10" />
</ItemGroup> </ItemGroup>
</Project> </Project>

31
Zurnal/Zurnal.sln Normal file
View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zurnal", "Zurnal.csproj", "{E948AFF5-A619-4931-84CF-9FF05938A922}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "presence_api", "presence_api\presence_api.csproj", "{5A659234-F158-48D4-8533-7DC55D57FC04}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E948AFF5-A619-4931-84CF-9FF05938A922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E948AFF5-A619-4931-84CF-9FF05938A922}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E948AFF5-A619-4931-84CF-9FF05938A922}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E948AFF5-A619-4931-84CF-9FF05938A922}.Release|Any CPU.Build.0 = Release|Any CPU
{5A659234-F158-48D4-8533-7DC55D57FC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A659234-F158-48D4-8533-7DC55D57FC04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A659234-F158-48D4-8533-7DC55D57FC04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A659234-F158-48D4-8533-7DC55D57FC04}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {29858519-C2C5-4382-ABD0-DB2D478F861D}
EndGlobalSection
EndGlobal

View File

@ -1,10 +1,9 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Этот код создан программой. // This code was generated by a tool.
// Исполняемая версия:4.0.30319.42000
// //
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае // Changes to this file may cause incorrect behavior and will be lost if
// повторной генерации кода. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -14,10 +13,10 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")] [assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+116f981a8f93a5144173943b21dd780c09089132")]
[assembly: System.Reflection.AssemblyProductAttribute("Zurnal")] [assembly: System.Reflection.AssemblyProductAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")] [assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Создано классом WriteCodeFragment MSBuild. // Generated by the MSBuild WriteCodeFragment class.

View File

@ -1 +1 @@
0cc1957e508d216bc16edfba63c7cd6a92394d06eb6458ec124cc01a0abbb768 eee0f5d9e72542a80cf035b8542e46c98027b49e8625c27144b3d52576e195d1

View File

@ -0,0 +1 @@
363301da55cc0da9a5b5db64cdaad65e5fa588627917582d0f884f0b7608c9c8

View File

@ -0,0 +1,5 @@
c:\Users\profi\source\repos\Zurnal\Zurnal\obj\Debug\net8.0\Zurnal.csproj.AssemblyReference.cache
c:\Users\profi\source\repos\Zurnal\Zurnal\obj\Debug\net8.0\Zurnal.GeneratedMSBuildEditorConfig.editorconfig
c:\Users\profi\source\repos\Zurnal\Zurnal\obj\Debug\net8.0\Zurnal.AssemblyInfoInputs.cache
c:\Users\profi\source\repos\Zurnal\Zurnal\obj\Debug\net8.0\Zurnal.AssemblyInfo.cs
c:\Users\profi\source\repos\Zurnal\Zurnal\obj\Debug\net8.0\Zurnal.csproj.CoreCompileInputs.cache

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")] [assembly: System.Reflection.AssemblyCompanyAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e715ee085d4de2e3aa15fe3c30ca3e1773251242")]
[assembly: System.Reflection.AssemblyProductAttribute("Zurnal")] [assembly: System.Reflection.AssemblyProductAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")] [assembly: System.Reflection.AssemblyTitleAttribute("Zurnal")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
f846bd88e13e8a292b5e7aeb6abe44b315b427ca43c96ddf6db29e9d0ee1cff1 bd6043901ef02a9093eed212b028bc4a4428a7b34f13bfe102043edaf981f5c7

View File

@ -13,8 +13,12 @@
"packagesPath": "C:\\Users\\profi\\.nuget\\packages\\", "packagesPath": "C:\\Users\\profi\\.nuget\\packages\\",
"outputPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\obj\\", "outputPath": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\obj\\",
"projectStyle": "PackageReference", "projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [ "configFilePaths": [
"C:\\Users\\profi\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Users\\profi\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
], ],
"originalTargetFrameworks": [ "originalTargetFrameworks": [
@ -45,9 +49,27 @@
"net8.0": { "net8.0": {
"targetAlias": "net8.0", "targetAlias": "net8.0",
"dependencies": { "dependencies": {
"Microsoft.EntityFrameworkCore": {
"target": "Package",
"version": "[8.0.10, )"
},
"Microsoft.EntityFrameworkCore.Design": {
"include": "Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive",
"suppressParent": "All",
"target": "Package",
"version": "[8.0.10, )"
},
"Microsoft.Extensions.DependencyInjection": {
"target": "Package",
"version": "[8.0.1, )"
},
"Microsoft.Extensions.DependencyInjection.Abstractions": { "Microsoft.Extensions.DependencyInjection.Abstractions": {
"target": "Package", "target": "Package",
"version": "[8.0.2, )" "version": "[8.0.2, )"
},
"Npgsql.EntityFrameworkCore.PostgreSQL": {
"target": "Package",
"version": "[8.0.10, )"
} }
}, },
"imports": [ "imports": [

View File

@ -5,11 +5,19 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool> <RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile> <ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\profi\.nuget\packages\</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\profi\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.11.1</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\profi\.nuget\packages\" /> <SourceRoot Include="C:\Users\profi\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup> </ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore\8.0.10\buildTransitive\net8.0\Microsoft.EntityFrameworkCore.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore\8.0.10\buildTransitive\net8.0\Microsoft.EntityFrameworkCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore.design\8.0.10\build\net8.0\Microsoft.EntityFrameworkCore.Design.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore.design\8.0.10\build\net8.0\Microsoft.EntityFrameworkCore.Design.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_CodeAnalysis_Analyzers Condition=" '$(PkgMicrosoft_CodeAnalysis_Analyzers)' == '' ">C:\Users\profi\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.3</PkgMicrosoft_CodeAnalysis_Analyzers>
</PropertyGroup>
</Project> </Project>

View File

@ -1,2 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" /> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\8.0.2\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\8.0.2\buildTransitive\net6.0\Microsoft.Extensions.Logging.Abstractions.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.options\8.0.2\buildTransitive\net6.0\Microsoft.Extensions.Options.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.options\8.0.2\buildTransitive\net6.0\Microsoft.Extensions.Options.targets')" />
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,47 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "mBpiSzc34gA=", "dgSpecHash": "/Ii72Vl1qzo=",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Zurnal.csproj", "projectFilePath": "C:\\Users\\profi\\source\\repos\\Zurnal\\Zurnal\\Zurnal.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\8.0.2\\microsoft.extensions.dependencyinjection.abstractions.8.0.2.nupkg.sha512" "C:\\Users\\profi\\.nuget\\packages\\humanizer.core\\2.14.1\\humanizer.core.2.14.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.bcl.asyncinterfaces\\6.0.0\\microsoft.bcl.asyncinterfaces.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.codeanalysis.analyzers\\3.3.3\\microsoft.codeanalysis.analyzers.3.3.3.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.codeanalysis.common\\4.5.0\\microsoft.codeanalysis.common.4.5.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.codeanalysis.csharp\\4.5.0\\microsoft.codeanalysis.csharp.4.5.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.codeanalysis.csharp.workspaces\\4.5.0\\microsoft.codeanalysis.csharp.workspaces.4.5.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.codeanalysis.workspaces.common\\4.5.0\\microsoft.codeanalysis.workspaces.common.4.5.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.entityframeworkcore\\8.0.10\\microsoft.entityframeworkcore.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\8.0.10\\microsoft.entityframeworkcore.abstractions.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\8.0.10\\microsoft.entityframeworkcore.analyzers.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.entityframeworkcore.design\\8.0.10\\microsoft.entityframeworkcore.design.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\8.0.10\\microsoft.entityframeworkcore.relational.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\8.0.0\\microsoft.extensions.caching.abstractions.8.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.caching.memory\\8.0.1\\microsoft.extensions.caching.memory.8.0.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\8.0.0\\microsoft.extensions.configuration.abstractions.8.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\8.0.1\\microsoft.extensions.dependencyinjection.8.0.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\8.0.2\\microsoft.extensions.dependencyinjection.abstractions.8.0.2.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.dependencymodel\\8.0.2\\microsoft.extensions.dependencymodel.8.0.2.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.logging\\8.0.1\\microsoft.extensions.logging.8.0.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\8.0.2\\microsoft.extensions.logging.abstractions.8.0.2.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.options\\8.0.2\\microsoft.extensions.options.8.0.2.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\microsoft.extensions.primitives\\8.0.0\\microsoft.extensions.primitives.8.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\mono.texttemplating\\2.2.1\\mono.texttemplating.2.2.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\npgsql\\8.0.5\\npgsql.8.0.5.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\npgsql.entityframeworkcore.postgresql\\8.0.10\\npgsql.entityframeworkcore.postgresql.8.0.10.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.codedom\\4.4.0\\system.codedom.4.4.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.collections.immutable\\6.0.0\\system.collections.immutable.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition\\6.0.0\\system.composition.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition.attributedmodel\\6.0.0\\system.composition.attributedmodel.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition.convention\\6.0.0\\system.composition.convention.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition.hosting\\6.0.0\\system.composition.hosting.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition.runtime\\6.0.0\\system.composition.runtime.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.composition.typedparts\\6.0.0\\system.composition.typedparts.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.io.pipelines\\6.0.3\\system.io.pipelines.6.0.3.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.reflection.metadata\\6.0.1\\system.reflection.metadata.6.0.1.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.text.encoding.codepages\\6.0.0\\system.text.encoding.codepages.6.0.0.nupkg.sha512",
"C:\\Users\\profi\\.nuget\\packages\\system.threading.channels\\6.0.0\\system.threading.channels.6.0.0.nupkg.sha512"
], ],
"logs": [] "logs": []
} }

View File

@ -0,0 +1,32 @@
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Zurnal.Domain.UseCase;
namespace presence_api.Controllers;
[ApiController]
[Route("api/[controller]")]
public class GroupController: ControllerBase {
private readonly GroupUseCase _groupUseCase;
public GroupController(GroupUseCase groupUseCase){
_groupUseCase = groupUseCase;
}
[HttpGet]
public ActionResult<IEnumerable<Group>> getGroups(){
return Ok(_groupUseCase.getAllGroup());
}
}
public class ApiControllerAttribute : ControllerAttribute, IApiBehaviorMetadata
{
}
public interface IApiBehaviorMetadata : IFilterMetadata
{
}
public interface IFilterMetadata
{
}
public class ControllerAttribute : Attribute
{
}

View File

@ -0,0 +1,25 @@
using data.RemoteData;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddDbContext<RemoteDataBaseContext>();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.ConfigurateGroup();
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.MapControllers();
app.Run();

View File

@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62350",
"sslPort": 44364
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5125",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7114;http://localhost:5125",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -0,0 +1,10 @@
using Zurnal.Date.Repository.SQLRepos;
using Zurnal.Domain.UseCase;
public static class ServiceExtensions {
public static void ConfigurateGroup(this IServiceCollection services){
services
.AddScoped<IGroupRepository, SQLGroupRepositoryImpl>()
.AddScoped<GroupUseCase>();
}
}

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Binary file not shown.

View File

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More