Ver Fonte

add discipline VM

anschek há 5 meses atrás
pai
commit
f7974ba2d7
16 ficheiros alterados com 118 adições e 38 exclusões
  1. BIN
      EducationDepartment/.vs/EducationDepartment/DesignTimeBuild/.dtbcache.v2
  2. BIN
      EducationDepartment/.vs/EducationDepartment/FileContentIndex/0acaada5-87bf-4d75-953e-24c2a9177bbd.vsidx
  3. BIN
      EducationDepartment/.vs/EducationDepartment/FileContentIndex/87de840c-e54b-450b-93fe-1d8f3371c091.vsidx
  4. BIN
      EducationDepartment/.vs/EducationDepartment/FileContentIndex/af4ae96b-0d50-4403-a49c-a5ba2174cb61.vsidx
  5. 0 0
      EducationDepartment/.vs/EducationDepartment/FileContentIndex/ef3ceb6e-217e-438a-a436-7d67b51b2053.vsidx
  6. BIN
      EducationDepartment/.vs/EducationDepartment/v17/.futdcache.v2
  7. BIN
      EducationDepartment/.vs/EducationDepartment/v17/.suo
  8. 78 36
      EducationDepartment/.vs/EducationDepartment/v17/DocumentLayout.json
  9. BIN
      EducationDepartment/.vs/ProjectEvaluation/educationdepartment.metadata.v8.bin
  10. BIN
      EducationDepartment/.vs/ProjectEvaluation/educationdepartment.projects.v8.bin
  11. BIN
      EducationDepartment/.vs/ProjectEvaluation/educationdepartment.strings.v8.bin
  12. 27 0
      EducationDepartment/EducationDepartment/ViewModels/DisciplineViewModel.cs
  13. 11 0
      EducationDepartment/EducationDepartment/ViewModels/MainWindowViewModel.cs
  14. BIN
      EducationDepartment/EducationDepartment/bin/Debug/net7.0/EducationDepartment.dll
  15. 1 1
      EducationDepartment/EducationDepartment/obj/Debug/net7.0/EducationDepartment.AssemblyInfo.cs
  16. 1 1
      EducationDepartment/EducationDepartment/obj/Debug/net7.0/EducationDepartment.AssemblyInfoInputs.cache

BIN
EducationDepartment/.vs/EducationDepartment/DesignTimeBuild/.dtbcache.v2


BIN
EducationDepartment/.vs/EducationDepartment/FileContentIndex/0acaada5-87bf-4d75-953e-24c2a9177bbd.vsidx


BIN
EducationDepartment/.vs/EducationDepartment/FileContentIndex/87de840c-e54b-450b-93fe-1d8f3371c091.vsidx


BIN
EducationDepartment/.vs/EducationDepartment/FileContentIndex/af4ae96b-0d50-4403-a49c-a5ba2174cb61.vsidx


+ 0 - 0
EducationDepartment/.vs/EducationDepartment/FileContentIndex/acf80ab4-823f-4eb8-88ca-17c32a6d9493.vsidx → EducationDepartment/.vs/EducationDepartment/FileContentIndex/ef3ceb6e-217e-438a-a436-7d67b51b2053.vsidx


BIN
EducationDepartment/.vs/EducationDepartment/v17/.futdcache.v2


BIN
EducationDepartment/.vs/EducationDepartment/v17/.suo


+ 78 - 36
EducationDepartment/.vs/EducationDepartment/v17/DocumentLayout.json

@@ -3,20 +3,28 @@
   "WorkspaceRootPath": "D:\\Educational\\EducationDepartment\\",
   "Documents": [
     {
-      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\views\\profilestudent.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
-      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\views\\profilestudent.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
+      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\viewmodels\\disciplineviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\viewmodels\\disciplineviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
-      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\views\\timetable.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
-      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\views\\timetable.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
+      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\models\\teachersdiscipline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\models\\teachersdiscipline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
       "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
       "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\viewmodels\\mainwindowviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
     },
     {
-      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\views\\authorizationpage.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
-      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\views\\authorizationpage.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
+      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\models\\discipline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\models\\discipline.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\viewmodels\\timetableviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
+      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\viewmodels\\timetableviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
+    },
+    {
+      "AbsoluteMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|d:\\educational\\educationdepartment\\educationdepartment\\views\\profilestudent.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}",
+      "RelativeMoniker": "D:0:0:{DA6E3BB7-64F8-4697-BB4C-75B5E9D9B592}|EducationDepartment\\EducationDepartment.csproj|solutionrelative:educationdepartment\\views\\profilestudent.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}"
     }
   ],
   "DocumentGroupContainers": [
@@ -25,43 +33,33 @@
       "VerticalTabListWidth": 256,
       "DocumentGroups": [
         {
-          "DockedWidth": 200,
-          "SelectedChildIndex": 2,
+          "DockedWidth": 358,
+          "SelectedChildIndex": 1,
           "Children": [
             {
               "$type": "Document",
               "DocumentIndex": 1,
-              "Title": "TimeTable.axaml",
-              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\TimeTable.axaml",
-              "RelativeDocumentMoniker": "EducationDepartment\\Views\\TimeTable.axaml",
-              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\TimeTable.axaml",
-              "RelativeToolTip": "EducationDepartment\\Views\\TimeTable.axaml",
-              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
-              "WhenOpened": "2024-05-27T14:25:53.265Z",
-              "EditorCaption": ""
-            },
-            {
-              "$type": "Document",
-              "DocumentIndex": 3,
-              "Title": "AuthorizationPage.axaml",
-              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\AuthorizationPage.axaml",
-              "RelativeDocumentMoniker": "EducationDepartment\\Views\\AuthorizationPage.axaml",
-              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\AuthorizationPage.axaml",
-              "RelativeToolTip": "EducationDepartment\\Views\\AuthorizationPage.axaml",
-              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
-              "WhenOpened": "2024-05-27T14:19:16.489Z",
+              "Title": "Teachersdiscipline.cs",
+              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Models\\Teachersdiscipline.cs",
+              "RelativeDocumentMoniker": "EducationDepartment\\Models\\Teachersdiscipline.cs",
+              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Models\\Teachersdiscipline.cs",
+              "RelativeToolTip": "EducationDepartment\\Models\\Teachersdiscipline.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAAAAAA0AAAAoAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-05-27T15:11:55.789Z",
               "EditorCaption": ""
             },
             {
               "$type": "Document",
               "DocumentIndex": 0,
-              "Title": "ProfileStudent.axaml",
-              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\ProfileStudent.axaml",
-              "RelativeDocumentMoniker": "EducationDepartment\\Views\\ProfileStudent.axaml",
-              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\ProfileStudent.axaml",
-              "RelativeToolTip": "EducationDepartment\\Views\\ProfileStudent.axaml",
-              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
-              "WhenOpened": "2024-05-27T14:17:15.773Z",
+              "Title": "DisciplineViewModel.cs",
+              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\ViewModels\\DisciplineViewModel.cs",
+              "RelativeDocumentMoniker": "EducationDepartment\\ViewModels\\DisciplineViewModel.cs",
+              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\ViewModels\\DisciplineViewModel.cs",
+              "RelativeToolTip": "EducationDepartment\\ViewModels\\DisciplineViewModel.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAAAAABIAAAAQAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-05-27T14:55:41.124Z",
               "EditorCaption": ""
             },
             {
@@ -72,9 +70,53 @@
               "RelativeDocumentMoniker": "EducationDepartment\\ViewModels\\MainWindowViewModel.cs",
               "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\ViewModels\\MainWindowViewModel.cs",
               "RelativeToolTip": "EducationDepartment\\ViewModels\\MainWindowViewModel.cs",
-              "ViewState": "AQIAAB8AAAAAAAAAAAAcwDsAAAAhAAAA",
+              "ViewState": "AQIAACcAAAAAAAAAAAAmwEgAAAA+AAAA",
               "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
-              "WhenOpened": "2024-05-27T14:13:50.126Z",
+              "WhenOpened": "2024-05-27T14:41:59.883Z",
+              "EditorCaption": ""
+            }
+          ]
+        },
+        {
+          "DockedWidth": 185,
+          "SelectedChildIndex": 1,
+          "Children": [
+            {
+              "$type": "Document",
+              "DocumentIndex": 4,
+              "Title": "TimetableViewModel.cs",
+              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\ViewModels\\TimetableViewModel.cs",
+              "RelativeDocumentMoniker": "EducationDepartment\\ViewModels\\TimetableViewModel.cs",
+              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\ViewModels\\TimetableViewModel.cs",
+              "RelativeToolTip": "EducationDepartment\\ViewModels\\TimetableViewModel.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAAAAAA8AAABkAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-05-27T15:03:51.34Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 3,
+              "Title": "Discipline.cs",
+              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Models\\Discipline.cs",
+              "RelativeDocumentMoniker": "EducationDepartment\\Models\\Discipline.cs",
+              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Models\\Discipline.cs",
+              "RelativeToolTip": "EducationDepartment\\Models\\Discipline.cs",
+              "ViewState": "AQIAAAAAAAAAAAAAAAAAABEAAABGAAAA",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
+              "WhenOpened": "2024-05-27T15:06:28.859Z",
+              "EditorCaption": ""
+            },
+            {
+              "$type": "Document",
+              "DocumentIndex": 5,
+              "Title": "ProfileStudent.axaml",
+              "DocumentMoniker": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\ProfileStudent.axaml",
+              "RelativeDocumentMoniker": "EducationDepartment\\Views\\ProfileStudent.axaml",
+              "ToolTip": "D:\\Educational\\EducationDepartment\\EducationDepartment\\Views\\ProfileStudent.axaml",
+              "RelativeToolTip": "EducationDepartment\\Views\\ProfileStudent.axaml",
+              "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
+              "WhenOpened": "2024-05-27T14:42:44.818Z",
               "EditorCaption": ""
             }
           ]

BIN
EducationDepartment/.vs/ProjectEvaluation/educationdepartment.metadata.v8.bin


BIN
EducationDepartment/.vs/ProjectEvaluation/educationdepartment.projects.v8.bin


BIN
EducationDepartment/.vs/ProjectEvaluation/educationdepartment.strings.v8.bin


+ 27 - 0
EducationDepartment/EducationDepartment/ViewModels/DisciplineViewModel.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using EducationDepartment.Models;
+using Microsoft.EntityFrameworkCore;
+using ReactiveUI;
+
+namespace EducationDepartment.ViewModels
+{
+	public class DisciplineViewModel : ReactiveObject
+	{
+        Schekaleva31pContext connect;
+        public DisciplineViewModel(Schekaleva31pContext dbConnect) => connect = dbConnect;
+        List<Discipline>? disciplines;
+        public List<Discipline>? Disciplines { get; set; }
+        public void NewDiscipline(string option, string value)
+        {
+            if (option == "ïðåïîäàâàòåëü")
+              //  Disciplines = connect.Teachersdisciplines.Include(x=> x.Teacher).Select(x=> x.Discipline).Where(x=> x.Teachersdisciplines)
+            else if (option == "ãðóïïà")
+                Disciplines = connect.Timetables.Include(x => x.GroupDiscipline.TeacherDiscipline.Teacher.User)
+                .Include(x => x.GroupDiscipline.TeacherDiscipline.Discipline).Include(x => x.GroupDiscipline.Group)
+                .Where(x => x.GroupDiscipline.Group.Name == value && x.ClassDate == lessonDate).ToList();
+            else Disciplines = null;
+        }
+    }
+}

+ 11 - 0
EducationDepartment/EducationDepartment/ViewModels/MainWindowViewModel.cs

@@ -64,6 +64,17 @@ namespace EducationDepartment.ViewModels
             TimetableVM.NewTimetable(Option, OptionValue, DateOnly.FromDateTime(DateTime.Parse(LessonDate)));
             if (TimetableVM.Timetable == null) Message = "Занятий в этот день нет";
             //else загрузить страницу с расписанием
+        }
+        //disciplines
+        DisciplineViewModel disciplineVM;
+        public DisciplineViewModel DisciplineVM { get => disciplineVM; set => this.RaiseAndSetIfChanged(ref disciplineVM, value); }
+        public void LoadDisciplinePage()
+        {
+            DisciplineVM = new DisciplineViewModel(dbConnect);
+        }
+        public void GetDisciplines()
+        {
+
         }
         public void WriteStudents()
         {

BIN
EducationDepartment/EducationDepartment/bin/Debug/net7.0/EducationDepartment.dll


+ 1 - 1
EducationDepartment/EducationDepartment/obj/Debug/net7.0/EducationDepartment.AssemblyInfo.cs

@@ -14,7 +14,7 @@ using System.Reflection;
 [assembly: System.Reflection.AssemblyCompanyAttribute("EducationDepartment")]
 [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
 [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b78f1485785481f75c6ebf426e40ecc0020f1bfe")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5756f20a90f6fdb61ba914014d4e0eb05180f96a")]
 [assembly: System.Reflection.AssemblyProductAttribute("EducationDepartment")]
 [assembly: System.Reflection.AssemblyTitleAttribute("EducationDepartment")]
 [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

+ 1 - 1
EducationDepartment/EducationDepartment/obj/Debug/net7.0/EducationDepartment.AssemblyInfoInputs.cache

@@ -1 +1 @@
-616a516c38d3bc496b28a37a5a8ee95cb1bcdde2103bc093db2a995d7f283a21
+6f322b7aa97266a6fa51d137a4c6d6beab99ee6986e3fd616df67ff5832407d2