first commit

This commit is contained in:
Larcadex 2025-03-14 17:19:39 +03:00
commit 749ea3d9ad
213 changed files with 7789 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

View File

@ -0,0 +1,343 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\aswag\\source\\repos\\task01\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\addwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\addwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\editwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\editwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\office.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\office.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\user11context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\user11context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\dependent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\dependent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\showwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\showwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\showwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\showwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\editwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\editwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\addwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\addwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\department.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\department.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\profession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\profession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.manifest||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.manifest||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:task01\\Context\\DepartmentHierarchy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 9,
"Children": [
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "User11Context.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\User11Context.cs",
"RelativeDocumentMoniker": "task01\\Context\\User11Context.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\User11Context.cs",
"RelativeToolTip": "task01\\Context\\User11Context.cs",
"ViewState": "AgIAABEAAAAAAAAAAAA9wAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-14T14:16:42.668Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "ShowWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml",
"RelativeDocumentMoniker": "task01\\ShowWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml",
"RelativeToolTip": "task01\\ShowWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:54:19.838Z"
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "AddWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml",
"RelativeDocumentMoniker": "task01\\AddWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml",
"RelativeToolTip": "task01\\AddWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:53:50.779Z"
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml.cs",
"RelativeDocumentMoniker": "task01\\App.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml.cs",
"RelativeToolTip": "task01\\App.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:19:04.701Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "ShowWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\ShowWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml.cs",
"RelativeToolTip": "task01\\ShowWindow.axaml.cs",
"ViewState": "AgIAABsAAAAAAAAAAAAowBQAAAAoAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:54:19.711Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "Dependent.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Dependent.cs",
"RelativeDocumentMoniker": "task01\\Context\\Dependent.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Dependent.cs",
"RelativeToolTip": "task01\\Context\\Dependent.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAA6AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:28:04.485Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Office.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Office.cs",
"RelativeDocumentMoniker": "task01\\Context\\Office.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Office.cs",
"RelativeToolTip": "task01\\Context\\Office.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:29:16.358Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "EditWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\EditWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml.cs",
"RelativeToolTip": "task01\\EditWindow.axaml.cs",
"ViewState": "AgIAABAAAAAAAAAAAAArwCUAAABBAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T19:00:44.508Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Employee.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Employee.cs",
"RelativeDocumentMoniker": "task01\\Context\\Employee.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Employee.cs",
"RelativeToolTip": "task01\\Context\\Employee.cs",
"ViewState": "AgIAAAUAAAAAAAAAAIA2wA8AAAAUAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:16:39.977Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "AddWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\AddWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml.cs",
"RelativeToolTip": "task01\\AddWindow.axaml.cs",
"ViewState": "AgIAABwAAAAAAAAAAAASwDAAAAAxAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:53:50.422Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml.cs",
"RelativeToolTip": "task01\\MainWindow.axaml.cs",
"ViewState": "AgIAAC8AAAAAAAAAAAAIwEkAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:49:27.603Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml",
"RelativeDocumentMoniker": "task01\\MainWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml",
"RelativeToolTip": "task01\\MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:49:27.641Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "EditWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml",
"RelativeDocumentMoniker": "task01\\EditWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml",
"RelativeToolTip": "task01\\EditWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T19:00:44.633Z"
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "Department.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Department.cs",
"RelativeDocumentMoniker": "task01\\Context\\Department.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Department.cs",
"RelativeToolTip": "task01\\Context\\Department.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T19:25:15.024Z"
},
{
"$type": "Document",
"DocumentIndex": 19,
"Title": "DepartmentHierarchy.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs",
"RelativeDocumentMoniker": "task01\\Context\\DepartmentHierarchy.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs",
"RelativeToolTip": "task01\\Context\\DepartmentHierarchy.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:33:27.905Z"
},
{
"$type": "Document",
"DocumentIndex": 14,
"Title": "App.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml",
"RelativeDocumentMoniker": "task01\\App.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml",
"RelativeToolTip": "task01\\App.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T20:25:30.74Z"
},
{
"$type": "Document",
"DocumentIndex": 15,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Program.cs",
"RelativeDocumentMoniker": "task01\\Program.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Program.cs",
"RelativeToolTip": "task01\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:07:59.634Z"
},
{
"$type": "Document",
"DocumentIndex": 16,
"Title": "Profession.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Profession.cs",
"RelativeDocumentMoniker": "task01\\Context\\Profession.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Profession.cs",
"RelativeToolTip": "task01\\Context\\Profession.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAVAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:29:14.711Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
"Title": "task01.csproj",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\task01.csproj",
"RelativeDocumentMoniker": "task01\\task01.csproj",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\task01.csproj",
"RelativeToolTip": "task01\\task01.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAB0AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2025-03-13T18:15:44.221Z"
},
{
"$type": "Document",
"DocumentIndex": 18,
"Title": "app.manifest",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\app.manifest",
"RelativeDocumentMoniker": "task01\\app.manifest",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\app.manifest",
"RelativeToolTip": "task01\\app.manifest",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001203|",
"WhenOpened": "2025-03-13T18:19:08.989Z"
}
]
}
]
}
]
}

View File

@ -0,0 +1,343 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\aswag\\source\\repos\\task01\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\addwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\addwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\editwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\editwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\employee.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\office.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\office.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\user11context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\user11context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\dependent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\dependent.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\showwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\showwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\showwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\showwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\editwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\editwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\addwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\addwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\department.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\department.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\context\\profession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\context\\profession.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|c:\\users\\aswag\\source\\repos\\task01\\task01\\app.manifest||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{B0E70B9F-392A-4494-BC35-412F5DC75538}|task01\\task01.csproj|solutionrelative:task01\\app.manifest||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:task01\\Context\\DepartmentHierarchy.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 9,
"Children": [
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "User11Context.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\User11Context.cs",
"RelativeDocumentMoniker": "task01\\Context\\User11Context.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\User11Context.cs",
"RelativeToolTip": "task01\\Context\\User11Context.cs",
"ViewState": "AgIAABEAAAAAAAAAAAA9wAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-14T14:16:42.668Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "ShowWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml",
"RelativeDocumentMoniker": "task01\\ShowWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml",
"RelativeToolTip": "task01\\ShowWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:54:19.838Z"
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "AddWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml",
"RelativeDocumentMoniker": "task01\\AddWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml",
"RelativeToolTip": "task01\\AddWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:53:50.779Z"
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml.cs",
"RelativeDocumentMoniker": "task01\\App.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml.cs",
"RelativeToolTip": "task01\\App.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:19:04.701Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "ShowWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\ShowWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\ShowWindow.axaml.cs",
"RelativeToolTip": "task01\\ShowWindow.axaml.cs",
"ViewState": "AgIAABsAAAAAAAAAAAAowBQAAAAoAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:54:19.711Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "Dependent.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Dependent.cs",
"RelativeDocumentMoniker": "task01\\Context\\Dependent.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Dependent.cs",
"RelativeToolTip": "task01\\Context\\Dependent.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAA6AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:28:04.485Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Office.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Office.cs",
"RelativeDocumentMoniker": "task01\\Context\\Office.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Office.cs",
"RelativeToolTip": "task01\\Context\\Office.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:29:16.358Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "EditWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\EditWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml.cs",
"RelativeToolTip": "task01\\EditWindow.axaml.cs",
"ViewState": "AgIAABAAAAAAAAAAAAArwCUAAABBAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T19:00:44.508Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Employee.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Employee.cs",
"RelativeDocumentMoniker": "task01\\Context\\Employee.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Employee.cs",
"RelativeToolTip": "task01\\Context\\Employee.cs",
"ViewState": "AgIAAAUAAAAAAAAAAIA2wA8AAAAUAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:16:39.977Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "AddWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\AddWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\AddWindow.axaml.cs",
"RelativeToolTip": "task01\\AddWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAADAAAAAxAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:53:50.422Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "task01\\MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml.cs",
"RelativeToolTip": "task01\\MainWindow.axaml.cs",
"ViewState": "AgIAAC8AAAAAAAAAAAAIwEkAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T17:49:27.603Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml",
"RelativeDocumentMoniker": "task01\\MainWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\MainWindow.axaml",
"RelativeToolTip": "task01\\MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T17:49:27.641Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "EditWindow.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml",
"RelativeDocumentMoniker": "task01\\EditWindow.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\EditWindow.axaml",
"RelativeToolTip": "task01\\EditWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T19:00:44.633Z"
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "Department.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Department.cs",
"RelativeDocumentMoniker": "task01\\Context\\Department.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Department.cs",
"RelativeToolTip": "task01\\Context\\Department.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T19:25:15.024Z"
},
{
"$type": "Document",
"DocumentIndex": 19,
"Title": "DepartmentHierarchy.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs",
"RelativeDocumentMoniker": "task01\\Context\\DepartmentHierarchy.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\DepartmentHierarchy.cs",
"RelativeToolTip": "task01\\Context\\DepartmentHierarchy.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:33:27.905Z"
},
{
"$type": "Document",
"DocumentIndex": 14,
"Title": "App.axaml",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml",
"RelativeDocumentMoniker": "task01\\App.axaml",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\App.axaml",
"RelativeToolTip": "task01\\App.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2025-03-13T20:25:30.74Z"
},
{
"$type": "Document",
"DocumentIndex": 15,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Program.cs",
"RelativeDocumentMoniker": "task01\\Program.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Program.cs",
"RelativeToolTip": "task01\\Program.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T20:07:59.634Z"
},
{
"$type": "Document",
"DocumentIndex": 16,
"Title": "Profession.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Profession.cs",
"RelativeDocumentMoniker": "task01\\Context\\Profession.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\Context\\Profession.cs",
"RelativeToolTip": "task01\\Context\\Profession.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAVAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-13T18:29:14.711Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
"Title": "task01.csproj",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\task01.csproj",
"RelativeDocumentMoniker": "task01\\task01.csproj",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\task01.csproj",
"RelativeToolTip": "task01\\task01.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAB0AAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2025-03-13T18:15:44.221Z"
},
{
"$type": "Document",
"DocumentIndex": 18,
"Title": "app.manifest",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\app.manifest",
"RelativeDocumentMoniker": "task01\\app.manifest",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01\\app.manifest",
"RelativeToolTip": "task01\\app.manifest",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001203|",
"WhenOpened": "2025-03-13T18:19:08.989Z"
}
]
}
]
}
]
}

BIN
ERD.pdf Normal file

Binary file not shown.

22
task01.sln Normal file
View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35527.113 d17.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "task01", "task01\task01.csproj", "{B0E70B9F-392A-4494-BC35-412F5DC75538}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B0E70B9F-392A-4494-BC35-412F5DC75538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0E70B9F-392A-4494-BC35-412F5DC75538}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0E70B9F-392A-4494-BC35-412F5DC75538}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0E70B9F-392A-4494-BC35-412F5DC75538}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\EditWindow.axaml.cs",
"PreviewInSolutionExplorer": false
}

BIN
task01/.vs/slnx.sqlite Normal file

Binary file not shown.

BIN
task01/.vs/task01/v17/.wsuo Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\aswag\\source\\repos\\task01\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": []
}
]
}

View File

@ -0,0 +1,54 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\aswag\\source\\repos\\task01\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\aswag\\source\\repos\\task01\\EditWindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:EditWindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\aswag\\source\\repos\\task01\\task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:task01.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "EditWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\EditWindow.axaml.cs",
"RelativeDocumentMoniker": "EditWindow.axaml.cs",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\EditWindow.axaml.cs",
"RelativeToolTip": "EditWindow.axaml.cs",
"ViewState": "AgIAAA8AAAAAAAAAAAAAAAkAAAAVAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-03-14T14:04:39.922Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "task01.csproj",
"DocumentMoniker": "C:\\Users\\aswag\\source\\repos\\task01\\task01.csproj",
"RelativeDocumentMoniker": "task01.csproj",
"ToolTip": "C:\\Users\\aswag\\source\\repos\\task01\\task01.csproj",
"RelativeToolTip": "task01.csproj",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|",
"WhenOpened": "2025-03-14T14:04:36.751Z",
"EditorCaption": ""
}
]
}
]
}
]
}

89
task01/AddWindow.axaml Normal file
View File

@ -0,0 +1,89 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:task01.Context"
mc:Ignorable="d" Width="800" Height="450"
x:Class="task01.AddWindow"
Title="Добавление сотрудника"
Background="White"
WindowStartupLocation="CenterScreen">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="1" Background="LightGray" Padding="10" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Добавление сотрудника" FontSize="18" FontWeight="Bold" Foreground="Black" HorizontalAlignment="Center"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Имя:" Grid.Row="0" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="NameTextBox" Grid.Row="0" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Фамилия:" Grid.Row="1" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="SurnameTextBox" Grid.Row="1" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Отчество:" Grid.Row="2" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PatronymicTextBox" Grid.Row="2" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Мобильный телефон:" Grid.Row="3" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PhoneTextBox" Grid.Row="3" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="День рождения:" Grid.Row="4" Grid.Column="0" FontSize="15" Foreground="Black"/>
<DatePicker Name="BirthdayDatePicker" Grid.Row="4" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Структурное подразделение:" Grid.Row="5" Grid.Column="0" FontSize="15" Foreground="Black"/>
<ComboBox Name="DepartmentComboBox" Grid.Row="5" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Department">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Должность:" Grid.Row="6" Grid.Column="0" FontSize="15" Foreground="Black"/>
<ComboBox Name="ProfessionComboBox" Grid.Row="6" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Profession">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Электронная почта:" Grid.Row="7" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="EmailTextBox" Grid.Row="7" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Кабинет:" Grid.Row="8" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="OfficeTextBox" Grid.Row="8" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
</Grid>
</StackPanel>
</Border>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10" Margin="0,10,0,0">
<Button Name="SaveButton" Content="Сохранить" Click="SaveButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
<Button Name="BackButton" Content="Назад" Click="BackButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
</StackPanel>
</Grid>
</Window>

114
task01/AddWindow.axaml.cs Normal file
View File

@ -0,0 +1,114 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using System;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using MsBox.Avalonia;
using MsBox.Avalonia.Enums;
using System.Collections.Generic;
using task01.Context;
namespace task01
{
public partial class AddWindow : Window
{
public AddWindow(List<Department> departments, List<Profession> proffesinons)
{
InitializeComponent();
DepartmentComboBox.ItemsSource = departments;
ProfessionComboBox.ItemsSource = proffesinons;
}
private async void SaveButton_Click(object sender, RoutedEventArgs e)
{
var errors = ValidateInput();
if (errors.Any())
{
await ShowError(string.Join(Environment.NewLine, errors));
return;
}
var newEmployee = new Employee
{
Name = NameTextBox.Text,
Phone = PhoneTextBox.Text,
Surname = SurnameTextBox.Text,
Patronymic = PatronymicTextBox.Text,
Birthday = DateOnly.FromDateTime(BirthdayDatePicker.SelectedDate?.DateTime ?? DateTime.Now),
Departmentid = (DepartmentComboBox.SelectedItem as Department).Id,
Proffesionid = (ProfessionComboBox.SelectedItem as Profession).Id,
Email = EmailTextBox.Text,
Office = new Office { Title = OfficeTextBox.Text }
};
using var context = new User11Context();
context.Employees.Add(newEmployee);
context.SaveChanges();
var mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
private async void BackButton_Click(object sender, RoutedEventArgs e)
{
var mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
private List<string> ValidateInput()
{
var errors = new List<string>();
if (string.IsNullOrWhiteSpace(NameTextBox.Text))
{
errors.Add("ÔÈÎ îáÿçàòåëüíî äëÿ çàïîëíåíèÿ.");
}
if (string.IsNullOrWhiteSpace(PhoneTextBox.Text) || !Regex.IsMatch(PhoneTextBox.Text, @"^[+\d()# -]{1,20}$"))
{
errors.Add("Ìîáèëüíûé òåëåôîí äîëæåí ñîäåðæàòü òîëüêî öèôðû è ñèìâîëû \"+(), -, #\" (ìàêñèìóì 20 ñèìâîëîâ).");
}
if (!BirthdayDatePicker.SelectedDate.HasValue)
{
errors.Add("Äåíü ðîæäåíèÿ îáÿçàòåëåí äëÿ çàïîëíåíèÿ.");
}
if (DepartmentComboBox.SelectedItem == null)
{
errors.Add("Ñòðóêòóðíîå ïîäðàçäåëåíèå îáÿçàòåëüíî äëÿ âûáîðà.");
}
if (ProfessionComboBox.SelectedItem == null)
{
errors.Add("Äîëæíîñòü îáÿçàòåëüíà äëÿ âûáîðà.");
}
if (string.IsNullOrWhiteSpace(EmailTextBox.Text) || !Regex.IsMatch(EmailTextBox.Text, @"^[^@\s]+@[^@\s]+\.[^@\s]+$"))
{
errors.Add("Ýëåêòðîííàÿ ïî÷òà îáÿçàòåëüíà äëÿ çàïîëíåíèÿ è äîëæíà áûòü â ôîðìàòå x@x.x.");
}
if (string.IsNullOrWhiteSpace(OfficeTextBox.Text) || OfficeTextBox.Text.Length > 10)
{
errors.Add("Êàáèíåò îáÿçàòåëåí äëÿ çàïîëíåíèÿ (ìàêñèìóì 10 ñèìâîëîâ).");
}
return errors;
}
private async Task ShowError(string message)
{
var box = MessageBoxManager
.GetMessageBoxStandard("Îøèáêà", message, ButtonEnum.Ok);
await box.ShowAsync();
}
}
}

10
task01/App.axaml Normal file
View File

@ -0,0 +1,10 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="task01.App"
RequestedThemeVariant="Light">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.Styles>
<FluentTheme />
</Application.Styles>
</Application>

24
task01/App.axaml.cs Normal file
View File

@ -0,0 +1,24 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace task01
{
public partial class App : Application
{
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}
base.OnFrameworkInitializationCompleted();
}
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class DayStatus
{
public int Id { get; set; }
public string Day { get; set; } = null!;
public virtual ICollection<EmployeeStatus> EmployeeStatuses { get; set; } = new List<EmployeeStatus>();
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class Department
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public string? Description { get; set; }
public int? Supervisorid { get; set; }
public virtual ICollection<Employee> Employees { get; set; } = new List<Employee>();
public virtual Employee? Supervisor { get; set; }
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class Dependent
{
public int Firstid { get; set; }
public int Secondid { get; set; }
public virtual Department First { get; set; } = null!;
public virtual Department Second { get; set; } = null!;
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class Employee
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public string Surname { get; set; } = null!;
public string? Patronymic { get; set; }
public DateOnly? Birthday { get; set; }
public string Phone { get; set; } = null!;
public string Email { get; set; } = null!;
public int Departmentid { get; set; }
public int Proffesionid { get; set; }
public int Officeid { get; set; }
public virtual Department Department { get; set; } = null!;
public virtual ICollection<Department> Departments { get; set; } = new List<Department>();
public virtual ICollection<EmployeeStatus> EmployeeStatuses { get; set; } = new List<EmployeeStatus>();
public virtual Office Office { get; set; } = null!;
public virtual Profession Proffesion { get; set; } = null!;
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class EmployeeStatus
{
public int Id { get; set; }
public DateOnly Day { get; set; }
public int Employeeid { get; set; }
public int? Statusid { get; set; }
public int? Eventid { get; set; }
public virtual Employee Employee { get; set; } = null!;
public virtual DayStatus? Status { get; set; }
}

13
task01/Context/Office.cs Normal file
View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class Office
{
public int Id { get; set; }
public string Title { get; set; } = null!;
public virtual ICollection<Employee> Employees { get; set; } = new List<Employee>();
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace task01.Context;
public partial class Profession
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual ICollection<Employee> Employees { get; set; } = new List<Employee>();
}

View File

@ -0,0 +1,183 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace task01.Context;
public partial class User11Context : DbContext
{
public User11Context()
{
}
public User11Context(DbContextOptions<User11Context> options)
: base(options)
{
}
public virtual DbSet<DayStatus> DayStatuses { get; set; }
public virtual DbSet<Department> Departments { get; set; }
public virtual DbSet<Dependent> Dependents { get; set; }
public virtual DbSet<Employee> Employees { get; set; }
public virtual DbSet<EmployeeStatus> EmployeeStatuses { get; set; }
public virtual DbSet<Office> Offices { get; set; }
public virtual DbSet<Profession> Professions { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
=> optionsBuilder.UseNpgsql("Host=45.67.56.214;Port=5421;Database=user11;Username=user11;password=JSZHJyg1");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<DayStatus>(entity =>
{
entity.HasKey(e => e.Id).HasName("daystatus_pk");
entity.ToTable("day_status", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Day)
.HasColumnType("character varying")
.HasColumnName("day");
});
modelBuilder.Entity<Department>(entity =>
{
entity.HasKey(e => e.Id).HasName("departments_pk");
entity.ToTable("departments", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Description)
.HasColumnType("character varying")
.HasColumnName("description");
entity.Property(e => e.Name)
.HasColumnType("character varying")
.HasColumnName("name");
entity.Property(e => e.Supervisorid).HasColumnName("supervisorid");
entity.HasOne(d => d.Supervisor).WithMany(p => p.Departments)
.HasForeignKey(d => d.Supervisorid)
.HasConstraintName("departments_employee_fk");
});
modelBuilder.Entity<Dependent>(entity =>
{
entity
.HasNoKey()
.ToTable("dependent", "task1");
entity.Property(e => e.Firstid).HasColumnName("firstid");
entity.Property(e => e.Secondid).HasColumnName("secondid");
entity.HasOne(d => d.First).WithMany()
.HasForeignKey(d => d.Firstid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("dependent_departments_fk");
entity.HasOne(d => d.Second).WithMany()
.HasForeignKey(d => d.Secondid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("dependent_departments_fk_1");
});
modelBuilder.Entity<Employee>(entity =>
{
entity.HasKey(e => e.Id).HasName("employee_pk");
entity.ToTable("employee", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Birthday).HasColumnName("birthday");
entity.Property(e => e.Departmentid).HasColumnName("departmentid");
entity.Property(e => e.Email)
.HasColumnType("character varying")
.HasColumnName("email");
entity.Property(e => e.Name)
.HasColumnType("character varying")
.HasColumnName("name");
entity.Property(e => e.Officeid).HasColumnName("officeid");
entity.Property(e => e.Patronymic)
.HasColumnType("character varying")
.HasColumnName("patronymic");
entity.Property(e => e.Phone)
.HasColumnType("character varying")
.HasColumnName("phone");
entity.Property(e => e.Proffesionid).HasColumnName("proffesionid");
entity.Property(e => e.Surname)
.HasColumnType("character varying")
.HasColumnName("surname");
entity.HasOne(d => d.Department).WithMany(p => p.Employees)
.HasForeignKey(d => d.Departmentid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("employee_departments_fk");
entity.HasOne(d => d.Office).WithMany(p => p.Employees)
.HasForeignKey(d => d.Officeid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("employee_kabinet_fk");
entity.HasOne(d => d.Proffesion).WithMany(p => p.Employees)
.HasForeignKey(d => d.Proffesionid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("employee_post_fk");
});
modelBuilder.Entity<EmployeeStatus>(entity =>
{
entity.HasKey(e => e.Id).HasName("employeestatus_pk");
entity.ToTable("employee_status", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Day).HasColumnName("day");
entity.Property(e => e.Employeeid).HasColumnName("employeeid");
entity.Property(e => e.Eventid).HasColumnName("eventid");
entity.Property(e => e.Statusid).HasColumnName("statusid");
entity.HasOne(d => d.Employee).WithMany(p => p.EmployeeStatuses)
.HasForeignKey(d => d.Employeeid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("employeestatus_employee_fk");
entity.HasOne(d => d.Status).WithMany(p => p.EmployeeStatuses)
.HasForeignKey(d => d.Statusid)
.HasConstraintName("employeestatus_daystatus_fk");
});
modelBuilder.Entity<Office>(entity =>
{
entity.HasKey(e => e.Id).HasName("kabinet_pk");
entity.ToTable("office", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Title)
.HasColumnType("character varying")
.HasColumnName("title");
});
modelBuilder.Entity<Profession>(entity =>
{
entity.HasKey(e => e.Id).HasName("post_pk");
entity.ToTable("profession", "task1");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Name)
.HasColumnType("character varying")
.HasColumnName("name");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

91
task01/EditWindow.axaml Normal file
View File

@ -0,0 +1,91 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:task01.Context"
mc:Ignorable="d" Width="800" Height="450"
Name="EditEmployeeWindow"
x:Class="task01.EditWindow"
Title="Редактирование сотрудника"
Background="White"
WindowStartupLocation="CenterScreen">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="1" Background="LightGray" Padding="10" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Редактирование сотрудника" FontSize="18" FontWeight="Bold" Foreground="Black" HorizontalAlignment="Center"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Имя:" Grid.Row="0" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="NameTextBox" Grid.Row="0" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Фамилия:" Grid.Row="1" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="SurnameTextBox" Grid.Row="1" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Отчество:" Grid.Row="2" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PatronymicTextBox" Grid.Row="2" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Мобильный телефон:" Grid.Row="3" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PhoneTextBox" Grid.Row="3" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="День рождения:" Grid.Row="4" Grid.Column="0" FontSize="15" Foreground="Black"/>
<DatePicker Name="BirthdayDatePicker" Grid.Row="4" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Структурное подразделение:" Grid.Row="5" Grid.Column="0" FontSize="15" Foreground="Black"/>
<ComboBox Name="DepartmentComboBox" Grid.Row="5" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Department">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Должность:" Grid.Row="6" Grid.Column="0" FontSize="15" Foreground="Black"/>
<ComboBox Name="ProfessionComboBox" Grid.Row="6" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="local:Profession">
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Электронная почта:" Grid.Row="7" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="EmailTextBox" Grid.Row="7" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Кабинет:" Grid.Row="8" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="OfficeTextBox" Grid.Row="8" Grid.Column="1" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
</Grid>
</StackPanel>
</Border>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10" Margin="0,10,0,0">
<Button Name="SaveButton" Content="Сохранить" Click="SaveButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
<Button Name="BackButton" Content="Назад" Click="BackButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
<Button Name="DeleteButton" Content="Удалить" Click="DeleteButton_Click" Background="#FF6B6B" Foreground="White" Padding="10,5" CornerRadius="5"/>
</StackPanel>
</Grid>
</Window>

147
task01/EditWindow.axaml.cs Normal file
View File

@ -0,0 +1,147 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Interactivity;
using MsBox.Avalonia.Enums;
using MsBox.Avalonia;
using task01.Context;
namespace task01;
public partial class EditWindow : Window
{
private Employee _employee;
private List<Department> _departments;
private List<Profession> _professions;
public EditWindow(Employee employee, List<Department> departments, List<Profession> professions)
{
InitializeComponent();
this._employee = employee;
this._departments = departments;
this._professions = professions;
LoadData();
}
private void LoadData()
{
NameTextBox.Text = _employee.Name;
SurnameTextBox.Text = _employee.Surname;
PatronymicTextBox.Text = _employee.Patronymic;
PhoneTextBox.Text = _employee.Phone;
BirthdayDatePicker.SelectedDate = _employee.Birthday.HasValue ? new DateTimeOffset(_employee.Birthday.Value.ToDateTime(TimeOnly.MinValue)) : (DateTimeOffset?)null;
DepartmentComboBox.ItemsSource = _departments;
DepartmentComboBox.SelectedItem = _departments.FirstOrDefault(d => d.Id == _employee.Departmentid);
ProfessionComboBox.ItemsSource = _professions;
ProfessionComboBox.SelectedItem = _professions.FirstOrDefault(p => p.Id == _employee.Proffesionid);
EmailTextBox.Text = _employee.Email;
OfficeTextBox.Text = _employee.Office.Title;
}
private void BackButton_Click(object sender, RoutedEventArgs e)
{
var showWindow = new ShowWindow(_employee, _departments, _professions);
showWindow.Show();
Close();
}
private async void SaveButton_Click(object sender, RoutedEventArgs e)
{
var errors = ValidateInput();
if (errors.Any())
{
await ShowError(string.Join(Environment.NewLine, errors));
return;
}
_employee.Name = NameTextBox.Text;
_employee.Phone = PhoneTextBox.Text;
if (BirthdayDatePicker.SelectedDate.HasValue)
{
_employee.Birthday = DateOnly.FromDateTime(BirthdayDatePicker.SelectedDate.Value.DateTime);
}
else
{
_employee.Birthday = null;
}
_employee.Departmentid = (DepartmentComboBox.SelectedItem as Department).Id;
_employee.Proffesionid = (ProfessionComboBox.SelectedItem as Profession).Id;
_employee.Email = EmailTextBox.Text;
_employee.Office.Title = OfficeTextBox.Text;
using var context = new User11Context();
context.Employees.Update(_employee);
context.SaveChanges();
var mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
private void DeleteButton_Click(object sender, RoutedEventArgs e)
{
using var context = new User11Context();
context.Employees.Remove(_employee);
context.SaveChanges();
var mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
private List<string> ValidateInput()
{
var errors = new List<string>();
if (string.IsNullOrWhiteSpace(NameTextBox.Text))
{
errors.Add("ÔÈÎ îáÿçàòåëüíî äëÿ çàïîëíåíèÿ.");
}
if (string.IsNullOrWhiteSpace(PhoneTextBox.Text) || !Regex.IsMatch(PhoneTextBox.Text, @"^[+\d()# -]{1,20}$"))
{
errors.Add("Ìîáèëüíûé òåëåôîí äîëæåí ñîäåðæàòü òîëüêî öèôðû è ñèìâîëû \"+(), -, #\" (ìàêñèìóì 20 ñèìâîëîâ).");
}
if (!BirthdayDatePicker.SelectedDate.HasValue)
{
errors.Add("Äåíü ðîæäåíèÿ îáÿçàòåëåí äëÿ çàïîëíåíèÿ.");
}
if (DepartmentComboBox.SelectedItem == null)
{
errors.Add("Ñòðóêòóðíîå ïîäðàçäåëåíèå îáÿçàòåëüíî äëÿ âûáîðà.");
}
if (ProfessionComboBox.SelectedItem == null)
{
errors.Add("Äîëæíîñòü îáÿçàòåëüíà äëÿ âûáîðà.");
}
if (string.IsNullOrWhiteSpace(EmailTextBox.Text) || !Regex.IsMatch(EmailTextBox.Text, @"^[^@\s]+@[^@\s]+\.[^@\s]+$"))
{
errors.Add("Ýëåêòðîííàÿ ïî÷òà îáÿçàòåëüíà äëÿ çàïîëíåíèÿ è äîëæíà áûòü â ôîðìàòå x@x.x.");
}
if (string.IsNullOrWhiteSpace(OfficeTextBox.Text) || OfficeTextBox.Text.Length > 10)
{
errors.Add("Êàáèíåò îáÿçàòåëåí äëÿ çàïîëíåíèÿ (ìàêñèìóì 10 ñèìâîëîâ).");
}
return errors;
}
private async Task ShowError(string message)
{
var box = MessageBoxManager
.GetMessageBoxStandard("Îøèáêà", message, ButtonEnum.Ok);
await box.ShowAsync();
}
}

67
task01/MainWindow.axaml Normal file
View File

@ -0,0 +1,67 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="task01.MainWindow"
x:CompileBindings="False"
Title="Организационная структура"
Width="1000" Height="600"
WindowStartupLocation="CenterScreen"
Background="White">
<Grid Margin="20" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions >
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.05*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<ListBox Name="DepartmentsListBox" Grid.Row="1" Grid.Column="0" SelectionChanged="DepartmentsListBox_SelectionChanged" Background="LightGray">
<ListBox.ItemTemplate>
<DataTemplate>
<Border Padding="10" Background="#E1F4C8">
<TextBlock Text="{Binding Name}" FontSize="15" Foreground="Black"/>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox Name="EmployeesListBox" Grid.Row="1" Grid.Column="2" SelectionChanged="EmployeesListBox_SelectionChanged" Background="LightGray" >
<ListBox.ItemTemplate>
<DataTemplate>
<Border Padding="10" Background="#E1F4C8">
<StackPanel Spacing="5">
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding Department.Name}" FontSize="12" Foreground="Black"/>
<TextBlock Text="{Binding Proffesion.Name}" FontSize="12" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding Name}" FontSize="15" Foreground="Black"/>
<TextBlock Text="{Binding Surname}" FontSize="15" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding Phone}" FontSize="12" Foreground="Black"/>
<TextBlock Text="{Binding Email}" FontSize="12" Foreground="Black"/>
</StackPanel>
<TextBlock Text="{Binding Office.Title}" FontSize="12" Foreground="Black"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Button Name="AddButton" Content="+" Click="AddButton_Click" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,0,-10" Background="#E1F4C8" Foreground="White" CornerRadius="-1"/>
</Grid>
</Window>

View File

@ -0,0 +1,74 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Shapes;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using Avalonia.Media;
using Microsoft.EntityFrameworkCore;
using MsBox.Avalonia.Enums;
using MsBox.Avalonia;
using System;
using System.Collections.Generic;
using System.Linq;
using task01.Context;
namespace task01
{
public partial class MainWindow : Window
{
private List<Department> _departments;
private List<Employee> _employees;
private List<Profession> _professions;
public MainWindow()
{
InitializeComponent();
LoadData();
}
private void LoadData()
{
using var context = new User11Context();
_departments = context.Departments.ToList();
_employees = context.Employees.Include(e => e.Office).Include(e => e.Proffesion).ToList();
_professions = context.Professions.ToList();
DepartmentsListBox.ItemsSource = _departments;
}
private void DepartmentsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (DepartmentsListBox.SelectedItem is Department selectedDepartment)
{
LoadEmployeeDepartment(selectedDepartment);
}
}
private void LoadEmployeeDepartment(Department department)
{
if (department == null) return;
var departmentEmployees = _employees.Where(e => e.Departmentid == department.Id).ToList();
EmployeesListBox.ItemsSource = departmentEmployees;
}
private void EmployeesListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (EmployeesListBox.SelectedItem is Employee selectedEmployee)
{
var showWindow = new ShowWindow(selectedEmployee, _departments, _professions);
showWindow.Show();
LoadData();
Close();
}
}
private void AddButton_Click(object sender, RoutedEventArgs e)
{
var AddWindow = new AddWindow(_departments, _professions);
AddWindow.Show();
Close();
}
}
}

22
task01/Program.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using Avalonia;
namespace task01
{
internal class Program
{
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[STAThread]
public static void Main(string[] args) => BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace();
}
}

78
task01/ShowWindow.axaml Normal file
View File

@ -0,0 +1,78 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:task01.Context"
mc:Ignorable="d" Width="800" Height="450"
Name="ShowEmployeeName"
x:Class="task01.ShowWindow"
Title="Информация о сотруднике"
Background="White"
WindowStartupLocation="CenterScreen">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="1" Background="LightGray" Padding="10" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Информация о сотруднике" FontSize="18" FontWeight="Bold" Foreground="Black" HorizontalAlignment="Center"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Имя:" Grid.Row="0" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="NameTextBox" Grid.Row="0" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black" />
<TextBlock Text="Фамилия:" Grid.Row="1" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="SurnameTextBox" Grid.Row="1" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Отчество:" Grid.Row="2" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PatronymicTextBox" Grid.Row="2" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Мобильный телефон:" Grid.Row="3" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="PhoneTextBox" Grid.Row="3" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="День рождения:" Grid.Row="4" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="BirthdayTextBox" Grid.Row="4" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Структурное подразделение:" Grid.Row="5" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="DepartmentTextBox" Grid.Row="5" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Должность:" Grid.Row="6" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="ProfessionTextBox" Grid.Row="6" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Электронная почта:" Grid.Row="7" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="EmailTextBox" Grid.Row="7" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
<TextBlock Text="Кабинет:" Grid.Row="8" Grid.Column="0" FontSize="15" Foreground="Black"/>
<TextBox Name="OfficeTextBox" Grid.Row="8" Grid.Column="1" IsReadOnly="True" Background="#E1F4C8" Padding="5" Margin="5,0,0,0" Foreground="Black"/>
</Grid>
</StackPanel>
</Border>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Spacing="10" Margin="0,10,0,0">
<Button Name="EditButton" Content="Редактировать" Click="EditButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
<Button Name="BackButton" Content="Назад" Click="BackButton_Click" Background="#E1F4C8" Foreground="Black" Padding="10,5" CornerRadius="5"/>
</StackPanel>
</Grid>
</Window>

View File

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Interactivity;
using task01.Context;
namespace task01;
public partial class ShowWindow : Window
{
private Employee _employee;
private List<Department> _departments;
private List<Profession> _professions;
public ShowWindow(Employee employee, List<Department> departments, List<Profession> professions)
{
InitializeComponent();
this._employee = employee;
this._departments = departments;
this._professions = professions;
LoadData();
}
private void LoadData()
{
NameTextBox.Text = _employee.Name;
SurnameTextBox.Text = _employee.Surname;
PatronymicTextBox.Text = _employee.Patronymic;
PhoneTextBox.Text = _employee.Phone;
BirthdayTextBox.Text = _employee.Birthday.ToString();
ProfessionTextBox.Text = _employee.Proffesion?.Name ?? "Íå óêàçàíî";
DepartmentTextBox.Text = _departments
.FirstOrDefault(d => d.Id == _employee.Departmentid)?.Name ?? "Íå óêàçàíî";
EmailTextBox.Text = _employee.Email;
OfficeTextBox.Text = _employee.Office?.Title ?? "Íå óêàçàíî";
}
private void EditButton_Click(object sender, RoutedEventArgs e)
{
var editWindow = new EditWindow(_employee, _departments, _professions);
editWindow.Show();
Close();
}
private void BackButton_Click(object sender, RoutedEventArgs e)
{
var mainWindow = new MainWindow();
mainWindow.Show();
Close();
}
}

18
task01/app.manifest Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- This manifest is used on Windows only.
Don't remove it as it might cause problems with window transparency and embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="task01.Desktop"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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