diff --git a/.idea/.idea.demko_term/.idea/avalonia.xml b/.idea/.idea.demko_term/.idea/avalonia.xml
index 1c14728..5ce0194 100644
--- a/.idea/.idea.demko_term/.idea/avalonia.xml
+++ b/.idea/.idea.demko_term/.idea/avalonia.xml
@@ -7,9 +7,11 @@
+
+
diff --git a/.idea/.idea.demko_term/.idea/vcs.xml b/.idea/.idea.demko_term/.idea/vcs.xml
index 5aa9f83..50dac60 100644
--- a/.idea/.idea.demko_term/.idea/vcs.xml
+++ b/.idea/.idea.demko_term/.idea/vcs.xml
@@ -1,6 +1,7 @@
+
\ No newline at end of file
diff --git a/demko_term/AcceptStatementWindow.axaml b/demko_term/AcceptStatementWindow.axaml
index c2c73e5..74aa885 100644
--- a/demko_term/AcceptStatementWindow.axaml
+++ b/demko_term/AcceptStatementWindow.axaml
@@ -14,7 +14,7 @@
-
+
diff --git a/demko_term/CreateApplicantWindow.axaml.cs b/demko_term/CreateApplicantWindow.axaml.cs
index 7e9623b..6b94506 100644
--- a/demko_term/CreateApplicantWindow.axaml.cs
+++ b/demko_term/CreateApplicantWindow.axaml.cs
@@ -1,3 +1,4 @@
+using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
@@ -8,14 +9,22 @@ namespace demko_term;
public partial class CreateApplicantWindow : Window
{
+
+ public string code_prew;
+
public CreateApplicantWindow()
{
+
InitializeComponent();
+ using var context = new DemoCourseworkContext();
+
+ code_prew = context.Applicants.Select(a => a.Code).Max().ToString();
+ CodeTextBox.Text = code_prew;
}
public void CreateApplicant_OnClick(object? sender, RoutedEventArgs e)
{
- using var ctx = new DemoCourseworkContext();
+ using var context = new DemoCourseworkContext();
if (string.IsNullOrWhiteSpace(FirstNameTextBox.Text) ||
string.IsNullOrWhiteSpace(LastNameTextBox.Text) ||
@@ -43,8 +52,8 @@ public partial class CreateApplicantWindow : Window
Address = AddressTextBox.Text
};
- ctx.Applicants.Add(newApplicant);
- ctx.SaveChanges();
+ context.Applicants.Add(newApplicant);
+ context.SaveChanges();
Close();
}
diff --git a/demko_term/FormPersonalFileWindow.axaml b/demko_term/FormPersonalFileWindow.axaml
new file mode 100644
index 0000000..8c15333
--- /dev/null
+++ b/demko_term/FormPersonalFileWindow.axaml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demko_term/FormPersonalFileWindow.axaml.cs b/demko_term/FormPersonalFileWindow.axaml.cs
new file mode 100644
index 0000000..595eef3
--- /dev/null
+++ b/demko_term/FormPersonalFileWindow.axaml.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Interactivity;
+using demko_term.Models;
+using Microsoft.EntityFrameworkCore;
+
+namespace demko_term;
+
+public partial class FormPersonalFileWindow : Window
+{
+
+ private ObservableCollection statements = new();
+ private List dataSourceStatements;
+
+ public FormPersonalFileWindow()
+ {
+ InitializeComponent();
+ using var context = new DemoCourseworkContext();
+
+ PersonalNumberComboBox.ItemsSource = context.Statements.Select(s => s.PersonalNumber).ToList();
+ DisplayStatements();
+ }
+
+ public class StatementPresenter : Statement
+ {
+ public string ApplicantCode { get; set; }
+
+ public string ApplicantSpecialty { get; set; }
+
+ public bool? PassportBool { get; set; }
+
+ public bool? DiplomaBool { get; set; }
+
+ public string Passport => PassportBool.HasValue ? (PassportBool.Value ? "Да" : "Нет") : "";
+
+ public string Diploma => DiplomaBool.HasValue ? (DiplomaBool.Value ? "Да" : "Нет") : "";
+ }
+
+ public void LoadData()
+ {
+ using var context = new DemoCourseworkContext();
+ dataSourceStatements = context.Statements
+ .Include(s => s.ApplicantCodeNavigation)
+ .Include(s => s.ApplicantSpecialityNavigation)
+ .Select(s => new StatementPresenter
+ {
+ Id = s.Id,
+ PersonalNumber = s.PersonalNumber,
+ SubmissionDate = s.SubmissionDate,
+ SubmissionTime = s.SubmissionTime,
+ ApplicantCode = s.ApplicantCodeNavigation.Code.ToString(),
+ ApplicantSpecialty = s.ApplicantSpecialityNavigation.Code.ToString(),
+ PassportBool = s.Passport,
+ DiplomaBool = s.Diploma,
+ Points = s.Points,
+ }).ToList();
+ }
+
+ private void DisplayStatements()
+ {
+ LoadData();
+
+ var temp = dataSourceStatements;
+
+ if (PersonalNumberComboBox.SelectedItem is string selectedPersonalNumber)
+ {
+ temp = temp.Where(it => it.PersonalNumber == selectedPersonalNumber).ToList();
+ }
+
+ statements.Clear();
+ foreach (var item in temp)
+ {
+ statements.Add(item);
+ }
+
+ StatementListBox.ItemsSource = statements;
+ }
+
+ public void PersonalNumberComboBox_OnSelectionChanged(object? sender, RoutedEventArgs e)
+ {
+ DisplayStatements();
+ }
+
+ private void ViewApplicantButton_OnClick(object? sender, RoutedEventArgs e)
+ {
+ ViewApplicantWindow viewApplicantWindow = new ViewApplicantWindow();
+ viewApplicantWindow.ShowDialog(this);
+ }
+}
\ No newline at end of file
diff --git a/demko_term/ViewApplicantWindow.axaml b/demko_term/ViewApplicantWindow.axaml
new file mode 100644
index 0000000..c1d28ff
--- /dev/null
+++ b/demko_term/ViewApplicantWindow.axaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demko_term/ViewApplicantWindow.axaml.cs b/demko_term/ViewApplicantWindow.axaml.cs
new file mode 100644
index 0000000..50316c0
--- /dev/null
+++ b/demko_term/ViewApplicantWindow.axaml.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Interactivity;
+using demko_term.Models;
+using Microsoft.EntityFrameworkCore;
+
+namespace demko_term;
+
+public partial class ViewApplicantWindow : Window
+{
+
+ private List dataSourceApplicants;
+
+ public ViewApplicantWindow()
+ {
+ InitializeComponent();
+ using var context = new DemoCourseworkContext();
+ DisplayApplicant();
+ }
+
+ public void LoadData()
+ {
+ using var context = new DemoCourseworkContext();
+ dataSourceApplicants = context.Applicants
+ .Select(a => new Applicant
+ {
+ Id = a.Id,
+ Firstname = a.Firstname,
+ Lastname = a.Lastname,
+ Patronymic = a.Patronymic,
+ Code = a.Code,
+ Date = a.Date,
+ Address = a.Address,
+ Email = a.Email,
+ Phone = a.Phone
+ }).ToList();
+ }
+
+ public void DisplayApplicant()
+ {
+ LoadData();
+
+ var temp = dataSourceApplicants;
+
+ ApplicantListBox.ItemsSource = temp;
+ }
+
+ private async void CreateApplicantWindowButton_OnClick(object? sender, RoutedEventArgs e)
+ {
+ CreateApplicantWindow сreateApplicantWindow = new CreateApplicantWindow();
+ await сreateApplicantWindow.ShowDialog(this);
+
+ DisplayApplicant();
+ }
+}
\ No newline at end of file
diff --git a/demko_term/WorkerWindow.axaml.cs b/demko_term/WorkerWindow.axaml.cs
index cff6ad0..d15d2d9 100644
--- a/demko_term/WorkerWindow.axaml.cs
+++ b/demko_term/WorkerWindow.axaml.cs
@@ -39,7 +39,7 @@ public partial class WorkerWindow : Window
private void FormPersonalFile_OnClick(object? sender, RoutedEventArgs e)
{
- BlankWindow formOrderWindow = new BlankWindow();
+ FormPersonalFileWindow formOrderWindow = new FormPersonalFileWindow();
formOrderWindow.ShowDialog(this);
}
}
\ No newline at end of file
diff --git a/demko_term/bin/Debug/net8.0/demko_term.dll b/demko_term/bin/Debug/net8.0/demko_term.dll
index 1ce4f29..950a5ce 100644
Binary files a/demko_term/bin/Debug/net8.0/demko_term.dll and b/demko_term/bin/Debug/net8.0/demko_term.dll differ
diff --git a/demko_term/bin/Debug/net8.0/demko_term.pdb b/demko_term/bin/Debug/net8.0/demko_term.pdb
index 2e3a089..8d683ad 100644
Binary files a/demko_term/bin/Debug/net8.0/demko_term.pdb and b/demko_term/bin/Debug/net8.0/demko_term.pdb differ
diff --git a/demko_term/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache b/demko_term/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
index 3aaff2a..f9573bc 100644
--- a/demko_term/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
+++ b/demko_term/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache
@@ -1 +1 @@
-f36369443af68cb831707dc4dcb9ba39651db7a48ec94e878458b605c18ff106
+e7fa30969dd006409f4ac9a4dd7dad76663440a0b950763228c136cad725fc6f
diff --git a/demko_term/obj/Debug/net8.0/Avalonia/demko_term.dll b/demko_term/obj/Debug/net8.0/Avalonia/demko_term.dll
index 1ce4f29..950a5ce 100644
Binary files a/demko_term/obj/Debug/net8.0/Avalonia/demko_term.dll and b/demko_term/obj/Debug/net8.0/Avalonia/demko_term.dll differ
diff --git a/demko_term/obj/Debug/net8.0/Avalonia/demko_term.pdb b/demko_term/obj/Debug/net8.0/Avalonia/demko_term.pdb
index 2e3a089..8d683ad 100644
Binary files a/demko_term/obj/Debug/net8.0/Avalonia/demko_term.pdb and b/demko_term/obj/Debug/net8.0/Avalonia/demko_term.pdb differ
diff --git a/demko_term/obj/Debug/net8.0/Avalonia/resources b/demko_term/obj/Debug/net8.0/Avalonia/resources
index 71a02e4..9435038 100644
Binary files a/demko_term/obj/Debug/net8.0/Avalonia/resources and b/demko_term/obj/Debug/net8.0/Avalonia/resources differ
diff --git a/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfo.cs b/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfo.cs
index d87777c..8ae1e85 100644
--- a/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfo.cs
+++ b/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("demko_term")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e077c54b141f4457ab3b6d4c49d4696817ef5147")]
[assembly: System.Reflection.AssemblyProductAttribute("demko_term")]
[assembly: System.Reflection.AssemblyTitleAttribute("demko_term")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfoInputs.cache b/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfoInputs.cache
index 2278b53..cfff520 100644
--- a/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfoInputs.cache
+++ b/demko_term/obj/Debug/net8.0/demko_term.AssemblyInfoInputs.cache
@@ -1 +1 @@
-77e022cf4a0aa3182e1f3ddf38fe3685a30c3fd9903b3a342b3eb739fb5bca28
+c8339bf00dc15d968378e3a1f1367ef7e592cda2aa47631998adb04dc3e9d282
diff --git a/demko_term/obj/Debug/net8.0/demko_term.GeneratedMSBuildEditorConfig.editorconfig b/demko_term/obj/Debug/net8.0/demko_term.GeneratedMSBuildEditorConfig.editorconfig
index e8f5421..8671bd7 100644
--- a/demko_term/obj/Debug/net8.0/demko_term.GeneratedMSBuildEditorConfig.editorconfig
+++ b/demko_term/obj/Debug/net8.0/demko_term.GeneratedMSBuildEditorConfig.editorconfig
@@ -31,6 +31,9 @@ build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
[/Users/feitanportor/dev/C\#/demko_term/demko_term/CreateApplicantWindow.axaml]
build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
+[/Users/feitanportor/dev/C\#/demko_term/demko_term/FormPersonalFileWindow.axaml]
+build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
+
[/Users/feitanportor/dev/C\#/demko_term/demko_term/HistoryWindow.axaml]
build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
@@ -40,6 +43,9 @@ build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
[/Users/feitanportor/dev/C\#/demko_term/demko_term/ManagerWindow.axaml]
build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
+[/Users/feitanportor/dev/C\#/demko_term/demko_term/ViewApplicantWindow.axaml]
+build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
+
[/Users/feitanportor/dev/C\#/demko_term/demko_term/VolunteerWindow.axaml]
build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml
diff --git a/demko_term/obj/Debug/net8.0/demko_term.csproj.CoreCompileInputs.cache b/demko_term/obj/Debug/net8.0/demko_term.csproj.CoreCompileInputs.cache
index a1c889c..26d036b 100644
--- a/demko_term/obj/Debug/net8.0/demko_term.csproj.CoreCompileInputs.cache
+++ b/demko_term/obj/Debug/net8.0/demko_term.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-020631c5db98a9be0b9ecb53d57bcc1b55727af1c32fd2176669379d4e4987b4
+b8a0f15a7e4a89eeaa7b8089565dd47aa2489c08fd0cfd45dd9e501eeb4b4756
diff --git a/demko_term/obj/Debug/net8.0/demko_term.dll b/demko_term/obj/Debug/net8.0/demko_term.dll
index 36ad71b..9025442 100644
Binary files a/demko_term/obj/Debug/net8.0/demko_term.dll and b/demko_term/obj/Debug/net8.0/demko_term.dll differ
diff --git a/demko_term/obj/Debug/net8.0/demko_term.pdb b/demko_term/obj/Debug/net8.0/demko_term.pdb
index 543af10..10e51d0 100644
Binary files a/demko_term/obj/Debug/net8.0/demko_term.pdb and b/demko_term/obj/Debug/net8.0/demko_term.pdb differ
diff --git a/demko_term/obj/Debug/net8.0/ref/demko_term.dll b/demko_term/obj/Debug/net8.0/ref/demko_term.dll
index 83fbcec..22847b1 100644
Binary files a/demko_term/obj/Debug/net8.0/ref/demko_term.dll and b/demko_term/obj/Debug/net8.0/ref/demko_term.dll differ
diff --git a/demko_term/obj/Debug/net8.0/refint/Avalonia/demko_term.dll b/demko_term/obj/Debug/net8.0/refint/Avalonia/demko_term.dll
index 83fbcec..22847b1 100644
Binary files a/demko_term/obj/Debug/net8.0/refint/Avalonia/demko_term.dll and b/demko_term/obj/Debug/net8.0/refint/Avalonia/demko_term.dll differ
diff --git a/demko_term/obj/Debug/net8.0/refint/demko_term.dll b/demko_term/obj/Debug/net8.0/refint/demko_term.dll
index f23f73a..1554d95 100644
Binary files a/demko_term/obj/Debug/net8.0/refint/demko_term.dll and b/demko_term/obj/Debug/net8.0/refint/demko_term.dll differ