database connected

This commit is contained in:
Иван Овсянников 2024-09-05 16:11:39 +03:00
parent a0aeb3383e
commit d9ac0d4f20
155 changed files with 4047 additions and 598 deletions

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

View File

@ -1,26 +1,50 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\",
"WorkspaceRootPath": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\models\\service.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:models\\service.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\addeditwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:addeditwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\addeditwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:addeditwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\utils\\context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:utils\\context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
}
],
"DocumentGroupContainers": [
@ -30,91 +54,136 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"SelectedChildIndex": 5,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ServiceWindow.axaml",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeDocumentMoniker": "ServiceWindow.axaml",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeToolTip": "ServiceWindow.axaml",
"DocumentIndex": 9,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml.cs",
"RelativeDocumentMoniker": "App.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml.cs",
"RelativeToolTip": "App.axaml.cs",
"ViewState": "AgIAAAQAAAAAAAAAAAAUwBEAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:22:19.688Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "App.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml",
"RelativeDocumentMoniker": "App.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml",
"RelativeToolTip": "App.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-04T09:01:06.796Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T09:32:46.205Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeDocumentMoniker": "MainWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeToolTip": "MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-05T10:07:01.685Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeToolTip": "MainWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAC8AAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:07:04.004Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ServiceWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeDocumentMoniker": "ServiceWindow.axaml.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeToolTip": "ServiceWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T09:01:06.344Z",
"EditorCaption": ""
}
]
}
]
},
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"FloatingWindowState": {
"Id": "5d89f0c1-b63e-4cca-bbc9-915882977650",
"Display": 1,
"X": -8,
"Y": 331,
"Width": 1907,
"Height": 727,
"WindowState": 2
},
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeDocumentMoniker": "MainWindow.axaml",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeToolTip": "MainWindow.axaml",
"Title": "ServiceWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeDocumentMoniker": "ServiceWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeToolTip": "ServiceWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-04T07:02:44.184Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T10:22:49.921Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeToolTip": "MainWindow.axaml.cs",
"ViewState": "AgIAAAoAAAAAAAAAAAAgwC8AAAABAAAAAAAAAA==",
"DocumentIndex": 0,
"Title": "ServiceWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeDocumentMoniker": "ServiceWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeToolTip": "ServiceWindow.axaml.cs",
"ViewState": "AgIAACAAAAAAAAAAAAAqwC0AAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T07:02:41.443Z",
"WhenOpened": "2024-09-05T10:22:27.057Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Colors.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeDocumentMoniker": "Colors.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeToolTip": "Colors.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==",
"Title": "AddEditWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml",
"RelativeDocumentMoniker": "AddEditWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml",
"RelativeToolTip": "AddEditWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-05T10:07:17.245Z"
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "AddEditWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml.cs",
"RelativeDocumentMoniker": "AddEditWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml.cs",
"RelativeToolTip": "AddEditWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAKAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T07:42:06.694Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T10:07:17.713Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "Colors.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeDocumentMoniker": "Colors.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeToolTip": "Colors.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:07:30.214Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Context.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Utils\\Context.cs",
"RelativeDocumentMoniker": "Utils\\Context.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Utils\\Context.cs",
"RelativeToolTip": "Utils\\Context.cs",
"ViewState": "AgIAAAEAAAAAAAAAAAAUwAkAAAAbAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:39:51.541Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Service.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Models\\Service.cs",
"RelativeDocumentMoniker": "Models\\Service.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Models\\Service.cs",
"RelativeToolTip": "Models\\Service.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAAAABEAAAATAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T11:00:44.489Z"
}
]
}

View File

@ -1,26 +1,50 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\",
"WorkspaceRootPath": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:servicewindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\profi\\desktop\\xofei\\demoservice\\colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\models\\service.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:models\\service.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\addeditwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:addeditwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\addeditwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:addeditwindow.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:colors.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:mainwindow.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\utils\\context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:utils\\context.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:app.axaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|c:\\users\\prdb\\desktop\\xofei\\demoservice\\app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
"RelativeMoniker": "D:0:0:{4C331754-91EE-4598-950D-54DF0C075B84}|DemoService.csproj|solutionrelative:app.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
}
],
"DocumentGroupContainers": [
@ -30,91 +54,136 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"SelectedChildIndex": 5,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "ServiceWindow.axaml",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeDocumentMoniker": "ServiceWindow.axaml",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeToolTip": "ServiceWindow.axaml",
"DocumentIndex": 9,
"Title": "App.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml.cs",
"RelativeDocumentMoniker": "App.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml.cs",
"RelativeToolTip": "App.axaml.cs",
"ViewState": "AgIAAAQAAAAAAAAAAAAUwBEAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:22:19.688Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "App.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml",
"RelativeDocumentMoniker": "App.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\App.axaml",
"RelativeToolTip": "App.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-04T09:01:06.796Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T09:32:46.205Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeDocumentMoniker": "MainWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeToolTip": "MainWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-05T10:07:01.685Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeToolTip": "MainWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAC8AAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:07:04.004Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ServiceWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeDocumentMoniker": "ServiceWindow.axaml.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeToolTip": "ServiceWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T09:01:06.344Z",
"EditorCaption": ""
}
]
}
]
},
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"FloatingWindowState": {
"Id": "5d89f0c1-b63e-4cca-bbc9-915882977650",
"Display": 1,
"X": -8,
"Y": 331,
"Width": 1907,
"Height": 727,
"WindowState": 2
},
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindow.axaml",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeDocumentMoniker": "MainWindow.axaml",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml",
"RelativeToolTip": "MainWindow.axaml",
"Title": "ServiceWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeDocumentMoniker": "ServiceWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml",
"RelativeToolTip": "ServiceWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-04T07:02:44.184Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T10:22:49.921Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "MainWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeDocumentMoniker": "MainWindow.axaml.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\MainWindow.axaml.cs",
"RelativeToolTip": "MainWindow.axaml.cs",
"ViewState": "AgIAAAoAAAAAAAAAAAAgwC8AAAABAAAAAAAAAA==",
"DocumentIndex": 0,
"Title": "ServiceWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeDocumentMoniker": "ServiceWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\ServiceWindow.axaml.cs",
"RelativeToolTip": "ServiceWindow.axaml.cs",
"ViewState": "AgIAACAAAAAAAAAAAAAqwC0AAAABAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T07:02:41.443Z",
"WhenOpened": "2024-09-05T10:22:27.057Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Colors.cs",
"DocumentMoniker": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeDocumentMoniker": "Colors.cs",
"ToolTip": "C:\\Users\\PROFI\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeToolTip": "Colors.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==",
"Title": "AddEditWindow.axaml",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml",
"RelativeDocumentMoniker": "AddEditWindow.axaml",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml",
"RelativeToolTip": "AddEditWindow.axaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-09-05T10:07:17.245Z"
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "AddEditWindow.axaml.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml.cs",
"RelativeDocumentMoniker": "AddEditWindow.axaml.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\AddEditWindow.axaml.cs",
"RelativeToolTip": "AddEditWindow.axaml.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAKAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-04T07:42:06.694Z",
"EditorCaption": ""
"WhenOpened": "2024-09-05T10:07:17.713Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "Colors.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeDocumentMoniker": "Colors.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Colors.cs",
"RelativeToolTip": "Colors.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:07:30.214Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "Context.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Utils\\Context.cs",
"RelativeDocumentMoniker": "Utils\\Context.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Utils\\Context.cs",
"RelativeToolTip": "Utils\\Context.cs",
"ViewState": "AgIAAAEAAAAAAAAAAAAUwAkAAAAbAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T10:39:51.541Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "Service.cs",
"DocumentMoniker": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Models\\Service.cs",
"RelativeDocumentMoniker": "Models\\Service.cs",
"ToolTip": "C:\\Users\\prdb\\Desktop\\Xofei\\DemoService\\Models\\Service.cs",
"RelativeToolTip": "Models\\Service.cs",
"ViewState": "AgIAAAMAAAAAAAAAAAAAABEAAAATAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-05T11:00:44.489Z"
}
]
}

View File

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

BIN
.vs/slnx.sqlite Normal file

Binary file not shown.

9
AddEditWindow.axaml Normal file
View File

@ -0,0 +1,9 @@
<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="600"
x:Class="DemoService.AddEditWindow"
Title="AddEditWindow">
</Window>

13
AddEditWindow.axaml.cs Normal file
View File

@ -0,0 +1,13 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace DemoService;
public partial class AddEditWindow : Window
{
public AddEditWindow()
{
InitializeComponent();
}
}

View File

@ -1,10 +1,15 @@
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="DemoService.App"
RequestedThemeVariant="Default">
RequestedThemeVariant="Light">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.Styles>
<FluentTheme />
</Application.Styles>
<Application.Resources>
<SolidColorBrush x:Key="PrimaryColor">#ffffff</SolidColorBrush>
<SolidColorBrush x:Key="SecondryColor">#ffffe1</SolidColorBrush>
<SolidColorBrush x:Key="AccentColor">#ff9c1a</SolidColorBrush>
</Application.Resources>
</Application>

View File

@ -0,0 +1,340 @@
using System;
using System.Collections.Generic;
using DemoService.Models;
using Microsoft.EntityFrameworkCore;
namespace DemoService.Context;
public partial class OvsyannikovContext : DbContext
{
public OvsyannikovContext()
{
}
public OvsyannikovContext(DbContextOptions<OvsyannikovContext> options)
: base(options)
{
}
public virtual DbSet<Client> Clients { get; set; }
public virtual DbSet<Clientservice> Clientservices { get; set; }
public virtual DbSet<Documentbyservice> Documentbyservices { get; set; }
public virtual DbSet<Gender> Genders { get; set; }
public virtual DbSet<Manufacturer> Manufacturers { get; set; }
public virtual DbSet<Product> Products { get; set; }
public virtual DbSet<Productphoto> Productphotos { get; set; }
public virtual DbSet<Productsale> Productsales { get; set; }
public virtual DbSet<Service> Services { get; set; }
public virtual DbSet<Servicephoto> Servicephotos { get; set; }
public virtual DbSet<Tag> Tags { 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=5454;Username=ovsyannikov; Database=ovsyannikov;Password=tthZtwFb");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Client>(entity =>
{
entity.HasKey(e => e.Id).HasName("client_pkey");
entity.ToTable("client");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Birthday).HasColumnName("birthday");
entity.Property(e => e.Email)
.HasMaxLength(255)
.HasColumnName("email");
entity.Property(e => e.Firstname)
.HasMaxLength(50)
.HasColumnName("firstname");
entity.Property(e => e.Gendercode)
.HasMaxLength(1)
.HasColumnName("gendercode");
entity.Property(e => e.Lastname)
.HasMaxLength(50)
.HasColumnName("lastname");
entity.Property(e => e.Patronymic)
.HasMaxLength(50)
.HasColumnName("patronymic");
entity.Property(e => e.Phone)
.HasMaxLength(20)
.HasColumnName("phone");
entity.Property(e => e.Photopath)
.HasMaxLength(1000)
.HasColumnName("photopath");
entity.Property(e => e.Registrationdate)
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("registrationdate");
entity.HasOne(d => d.GendercodeNavigation).WithMany(p => p.Clients)
.HasForeignKey(d => d.Gendercode)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_client_gender");
entity.HasMany(d => d.Tags).WithMany(p => p.Clients)
.UsingEntity<Dictionary<string, object>>(
"Tagofclient",
r => r.HasOne<Tag>().WithMany()
.HasForeignKey("Tagid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_tagofclient_tag"),
l => l.HasOne<Client>().WithMany()
.HasForeignKey("Clientid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_tagofclient_client"),
j =>
{
j.HasKey("Clientid", "Tagid").HasName("tagofclient_pkey");
j.ToTable("tagofclient");
j.IndexerProperty<int>("Clientid").HasColumnName("clientid");
j.IndexerProperty<int>("Tagid").HasColumnName("tagid");
});
});
modelBuilder.Entity<Clientservice>(entity =>
{
entity.HasKey(e => e.Id).HasName("clientservice_pkey");
entity.ToTable("clientservice");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Clientid).HasColumnName("clientid");
entity.Property(e => e.Comment).HasColumnName("comment");
entity.Property(e => e.Serviceid).HasColumnName("serviceid");
entity.Property(e => e.Starttime)
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("starttime");
entity.HasOne(d => d.Client).WithMany(p => p.Clientservices)
.HasForeignKey(d => d.Clientid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_clientservice_client");
entity.HasOne(d => d.Service).WithMany(p => p.ClientServices)
.HasForeignKey(d => d.Serviceid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_clientservice_service");
});
modelBuilder.Entity<Documentbyservice>(entity =>
{
entity.HasKey(e => e.Id).HasName("documentbyservice_pkey");
entity.ToTable("documentbyservice");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Clientserviceid).HasColumnName("clientserviceid");
entity.Property(e => e.Documentpath)
.HasMaxLength(1000)
.HasColumnName("documentpath");
entity.HasOne(d => d.Clientservice).WithMany(p => p.Documentbyservices)
.HasForeignKey(d => d.Clientserviceid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_documentbyservice_clientservice");
});
modelBuilder.Entity<Gender>(entity =>
{
entity.HasKey(e => e.Code).HasName("gender_pkey");
entity.ToTable("gender");
entity.Property(e => e.Code)
.HasMaxLength(1)
.ValueGeneratedNever()
.HasColumnName("code");
entity.Property(e => e.Name)
.HasMaxLength(10)
.HasColumnName("name");
});
modelBuilder.Entity<Manufacturer>(entity =>
{
entity.HasKey(e => e.Id).HasName("manufacturer_pkey");
entity.ToTable("manufacturer");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Name)
.HasMaxLength(100)
.HasColumnName("name");
entity.Property(e => e.Startdate).HasColumnName("startdate");
});
modelBuilder.Entity<Product>(entity =>
{
entity.HasKey(e => e.Id).HasName("product_pkey");
entity.ToTable("product");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Cost)
.HasPrecision(19, 4)
.HasColumnName("cost");
entity.Property(e => e.Description).HasColumnName("description");
entity.Property(e => e.Isactive).HasColumnName("isactive");
entity.Property(e => e.Mainimagepath)
.HasMaxLength(1000)
.HasColumnName("mainimagepath");
entity.Property(e => e.Manufacturerid).HasColumnName("manufacturerid");
entity.Property(e => e.Title)
.HasMaxLength(100)
.HasColumnName("title");
entity.HasOne(d => d.Manufacturer).WithMany(p => p.Products)
.HasForeignKey(d => d.Manufacturerid)
.HasConstraintName("fk_product_manufacturer");
entity.HasMany(d => d.Attachedproducts).WithMany(p => p.Mainproducts)
.UsingEntity<Dictionary<string, object>>(
"Attachedproduct",
r => r.HasOne<Product>().WithMany()
.HasForeignKey("Attachedproductid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_attachedproduct_product1"),
l => l.HasOne<Product>().WithMany()
.HasForeignKey("Mainproductid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_attachedproduct_product"),
j =>
{
j.HasKey("Mainproductid", "Attachedproductid").HasName("attachedproduct_pk");
j.ToTable("attachedproduct");
j.IndexerProperty<int>("Mainproductid").HasColumnName("mainproductid");
j.IndexerProperty<int>("Attachedproductid").HasColumnName("attachedproductid");
});
entity.HasMany(d => d.Mainproducts).WithMany(p => p.Attachedproducts)
.UsingEntity<Dictionary<string, object>>(
"Attachedproduct",
r => r.HasOne<Product>().WithMany()
.HasForeignKey("Mainproductid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_attachedproduct_product"),
l => l.HasOne<Product>().WithMany()
.HasForeignKey("Attachedproductid")
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_attachedproduct_product1"),
j =>
{
j.HasKey("Mainproductid", "Attachedproductid").HasName("attachedproduct_pk");
j.ToTable("attachedproduct");
j.IndexerProperty<int>("Mainproductid").HasColumnName("mainproductid");
j.IndexerProperty<int>("Attachedproductid").HasColumnName("attachedproductid");
});
});
modelBuilder.Entity<Productphoto>(entity =>
{
entity.HasKey(e => e.Id).HasName("productphoto_pkey");
entity.ToTable("productphoto");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Photopath)
.HasMaxLength(1000)
.HasColumnName("photopath");
entity.Property(e => e.Productid).HasColumnName("productid");
entity.HasOne(d => d.Product).WithMany(p => p.Productphotos)
.HasForeignKey(d => d.Productid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_productphoto_product");
});
modelBuilder.Entity<Productsale>(entity =>
{
entity.HasKey(e => e.Id).HasName("productsale_pkey");
entity.ToTable("productsale");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Clientserviceid).HasColumnName("clientserviceid");
entity.Property(e => e.Productid).HasColumnName("productid");
entity.Property(e => e.Quantity).HasColumnName("quantity");
entity.Property(e => e.Saledate)
.HasColumnType("timestamp(6) without time zone")
.HasColumnName("saledate");
entity.HasOne(d => d.Clientservice).WithMany(p => p.Productsales)
.HasForeignKey(d => d.Clientserviceid)
.HasConstraintName("fk_productsale_clientservice");
entity.HasOne(d => d.Product).WithMany(p => p.Productsales)
.HasForeignKey(d => d.Productid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_productsale_product");
});
modelBuilder.Entity<Service>(entity =>
{
entity.HasKey(e => e.Id).HasName("service_pkey");
entity.ToTable("service");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Cost)
.HasPrecision(19, 4)
.HasColumnName("cost");
entity.Property(e => e.Description).HasColumnName("description");
entity.Property(e => e.Discount).HasColumnName("discount");
entity.Property(e => e.DurationInSeconds).HasColumnName("durationinseconds");
entity.Property(e => e.MainImagePath)
.HasMaxLength(1000)
.HasColumnName("mainimagepath");
entity.Property(e => e.Title)
.HasMaxLength(100)
.HasColumnName("title");
});
modelBuilder.Entity<Servicephoto>(entity =>
{
entity.HasKey(e => e.Id).HasName("servicephoto_pkey");
entity.ToTable("servicephoto");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Photopath)
.HasMaxLength(1000)
.HasColumnName("photopath");
entity.Property(e => e.Serviceid).HasColumnName("serviceid");
entity.HasOne(d => d.Service).WithMany(p => p.ServicePhotos)
.HasForeignKey(d => d.Serviceid)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("fk_servicephoto_service");
});
modelBuilder.Entity<Tag>(entity =>
{
entity.HasKey(e => e.Id).HasName("tag_pkey");
entity.ToTable("tag");
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Color)
.HasMaxLength(6)
.IsFixedLength()
.HasColumnName("color");
entity.Property(e => e.Title)
.HasMaxLength(30)
.HasColumnName("title");
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}

View File

@ -15,5 +15,12 @@
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.10" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.10" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
</ItemGroup>
</Project>

View File

@ -14,13 +14,13 @@ namespace DemoService
PasswordError.Foreground = Colors.white;
AdminButton.Background = Colors.orange;
}
public void UserLogIn(object sender, RoutedEventArgs args)
private void UserLogIn(object sender, RoutedEventArgs args)
{
ServiceWindow serviceWindow = new(false);
serviceWindow.Show();
Close();
}
public void AdminLogIn(object sender, RoutedEventArgs args)
private void AdminLogIn(object sender, RoutedEventArgs args)
{
if (PasswordCheck(Password.Text))
{
@ -33,7 +33,7 @@ namespace DemoService
PasswordError.Foreground = Colors.red;
}
}
public bool PasswordCheck(string? password)
private bool PasswordCheck(string? password)
{
if (password == adminCode)
{

33
Models/Client.cs Normal file
View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Client
{
public int Id { get; set; }
public string Firstname { get; set; } = null!;
public string Lastname { get; set; } = null!;
public string? Patronymic { get; set; }
public DateOnly? Birthday { get; set; }
public DateTime Registrationdate { get; set; }
public string? Email { get; set; }
public string Phone { get; set; } = null!;
public char Gendercode { get; set; }
public string? Photopath { get; set; }
public virtual ICollection<Clientservice> Clientservices { get; set; } = new List<Clientservice>();
public virtual Gender GendercodeNavigation { get; set; } = null!;
public virtual ICollection<Tag> Tags { get; set; } = new List<Tag>();
}

25
Models/Clientservice.cs Normal file
View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Clientservice
{
public int Id { get; set; }
public int Clientid { get; set; }
public int Serviceid { get; set; }
public DateTime Starttime { get; set; }
public string? Comment { get; set; }
public virtual Client Client { get; set; } = null!;
public virtual ICollection<Documentbyservice> Documentbyservices { get; set; } = new List<Documentbyservice>();
public virtual ICollection<Productsale> Productsales { get; set; } = new List<Productsale>();
public virtual Service Service { get; set; } = null!;
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Documentbyservice
{
public int Id { get; set; }
public int Clientserviceid { get; set; }
public string Documentpath { get; set; } = null!;
public virtual Clientservice Clientservice { get; set; } = null!;
}

13
Models/Gender.cs Normal file
View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Gender
{
public char Code { get; set; }
public string? Name { get; set; }
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
}

15
Models/Manufacturer.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Manufacturer
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public DateOnly? Startdate { get; set; }
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}

31
Models/Product.cs Normal file
View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Product
{
public int Id { get; set; }
public string Title { get; set; } = null!;
public decimal Cost { get; set; }
public string? Description { get; set; }
public string? Mainimagepath { get; set; }
public bool Isactive { get; set; }
public int? Manufacturerid { get; set; }
public virtual Manufacturer? Manufacturer { get; set; }
public virtual ICollection<Productphoto> Productphotos { get; set; } = new List<Productphoto>();
public virtual ICollection<Productsale> Productsales { get; set; } = new List<Productsale>();
public virtual ICollection<Product> Attachedproducts { get; set; } = new List<Product>();
public virtual ICollection<Product> Mainproducts { get; set; } = new List<Product>();
}

15
Models/Productphoto.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Productphoto
{
public int Id { get; set; }
public int Productid { get; set; }
public string Photopath { get; set; } = null!;
public virtual Product Product { get; set; } = null!;
}

21
Models/Productsale.cs Normal file
View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Productsale
{
public int Id { get; set; }
public DateTime Saledate { get; set; }
public int Productid { get; set; }
public int Quantity { get; set; }
public int? Clientserviceid { get; set; }
public virtual Clientservice? Clientservice { get; set; }
public virtual Product Product { get; set; } = null!;
}

25
Models/Service.cs Normal file
View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Service
{
public int Id { get; set; }
public string Title { get; set; } = null!;
public decimal Cost { get; set; }
public int DurationInSeconds { get; set; }
public string? Description { get; set; }
public decimal? Discount { get; set; }
public string? MainImagePath { get; set; }
public virtual ICollection<Clientservice> ClientServices { get; set; } = new List<Clientservice>();
public virtual ICollection<Servicephoto> ServicePhotos { get; set; } = new List<Servicephoto>();
}

15
Models/Servicephoto.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Servicephoto
{
public int Id { get; set; }
public int Serviceid { get; set; }
public string Photopath { get; set; } = null!;
public virtual Service Service { get; set; } = null!;
}

15
Models/Tag.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace DemoService.Models;
public partial class Tag
{
public int Id { get; set; }
public string Title { get; set; } = null!;
public string Color { get; set; } = null!;
public virtual ICollection<Client> Clients { get; set; } = new List<Client>();
}

View File

@ -2,32 +2,64 @@
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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600"
x:Class="DemoService.ServiceWindow"
x:CompileBindings="False"
Title="Сервис «Подай на 16»">
<StackPanel Orientation="Vertical">
<Grid RowDefinitions="Auto"
ColumnDefinitions="* Auto Auto">
<TextBox Grid.Column="0"
Watermark="Поиск"/>
<ComboBox Grid.Column="1">
<ComboBox Grid.Column="1"
SelectedIndex="0">
<ComboBoxItem>Сортировка</ComboBoxItem>
</ComboBox>
<ComboBox Grid.Column="2">
<ComboBox Grid.Column="2"
SelectedIndex="0">
<ComboBoxItem>Фильтрация</ComboBoxItem>
</ComboBox>
</Grid>
<ListBox>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid RowDefinitions="Auto"
ColumnDefinitions="* *">
<StackPanel Grid.Column="1">
<Button Name="AddButton">
Добавить
</Button>
<ScrollViewer>
<ListBox Name="ServicesListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image/>
<StackPanel Orientation="Vertical">
<TextBlock Name="ServiceName"
Text="{Binding Title}"/>
<TextBlock>
<Run Name="PreviousCost"/>
<Run Name="ActualCost"
Text="{Binding Cost}"/>
<Run Text="рублей за"/>
<Run Name="Time"
Text="{Binding DurationInSeconds}"/>
<Run Text="минут"/>
</TextBlock>
<TextBlock>
<Run Text="* скидка"/>
<Run Name="Discount"
Text="{Binding Discount}"/>
</TextBlock>
<StackPanel Name="AdminServicePanel"
Orientation="Horizontal">
<Button Name="EditButton">
Изменить
</Button>
<Button Name="DeleteButton">
Удалить
</Button>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ScrollViewer>
</StackPanel>
</Window>

View File

@ -1,19 +1,46 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using DemoService.Models;
namespace DemoService;
public partial class ServiceWindow : Window
{
private readonly bool Admin;
private readonly bool AdminMode;
public ServiceWindow()
{
InitializeComponent();
ServicesListBox.ItemsSource = Utils.Context.Services;
}
public ServiceWindow(bool admin)
{
InitializeComponent();
Admin = admin;
AdminMode = admin;
if (!admin)
{
AddButton.IsVisible = false;
}
ServicesListBox.ItemsSource = Utils.Context.Services;
foreach (var service in ServicesListBox.ItemsSource)
{
}
}
public void AddButtonClick(object sender, RoutedEventArgs args)
{
AddEditWindow addEditWindow = new();
addEditWindow.Show();
Close();
}
private decimal? CostAfterDiscount(decimal previousCost, decimal? discount)
{
if (discount.HasValue || discount != 0)
{
decimal actualCost = previousCost - previousCost * discount.Value;
return actualCost;
}
return null;
}
}

17
Utils/Context.cs Normal file
View File

@ -0,0 +1,17 @@
using DemoService.Context;
using DemoService.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DemoService.Utils
{
public static class Context
{
public static OvsyannikovContext DbContext { get; set; } = new OvsyannikovContext();
public static List<Service> Services { get; set; } = new List<Service>(DbContext.Services.ToList());
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,6 +6,7 @@
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}

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.

BIN
bin/Debug/net8.0/Npgsql.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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