From 85f1ed3e2b41c69e4a94c89dfa81fe826d7963e4 Mon Sep 17 00:00:00 2001 From: maksim Date: Tue, 26 Nov 2024 14:12:47 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D1=8C=D1=82?= =?UTF-8?q?=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BA=D1=82=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.xaml | 67 +++++++++++++++++++ App.xaml.cs | 14 ++++ AssemblyInfo.cs | 10 +++ EmployeeManager.csproj | 11 +++ EmployeeManager.sln | 25 +++++++ Model/DataWorker.cs | 12 ++++ Model/Employee.cs | 20 ++++++ Model/PhysicalPerson.cs | 21 ++++++ Model/Salary.cs | 20 ++++++ Model/Vacation.cs | 18 +++++ View/MainWindow.xaml | 26 +++++++ View/MainWindow.xaml.cs | 24 +++++++ View/MessageWindow.xaml | 24 +++++++ View/MessageWindow.xaml.cs | 27 ++++++++ View/PhysicalPerson/WorkInPhysicalPerson.xaml | 12 ++++ .../WorkInPhysicalPerson.xaml.cs | 27 ++++++++ ViewModel/DataManageViewModel.cs | 12 ++++ 17 files changed, 370 insertions(+) create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 AssemblyInfo.cs create mode 100644 EmployeeManager.csproj create mode 100644 EmployeeManager.sln create mode 100644 Model/DataWorker.cs create mode 100644 Model/Employee.cs create mode 100644 Model/PhysicalPerson.cs create mode 100644 Model/Salary.cs create mode 100644 Model/Vacation.cs create mode 100644 View/MainWindow.xaml create mode 100644 View/MainWindow.xaml.cs create mode 100644 View/MessageWindow.xaml create mode 100644 View/MessageWindow.xaml.cs create mode 100644 View/PhysicalPerson/WorkInPhysicalPerson.xaml create mode 100644 View/PhysicalPerson/WorkInPhysicalPerson.xaml.cs create mode 100644 ViewModel/DataManageViewModel.cs diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..96272f2 --- /dev/null +++ b/App.xaml @@ -0,0 +1,67 @@ + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..7fb4234 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace EmployeeManager +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/EmployeeManager.csproj b/EmployeeManager.csproj new file mode 100644 index 0000000..e3e33e3 --- /dev/null +++ b/EmployeeManager.csproj @@ -0,0 +1,11 @@ + + + + WinExe + net8.0-windows + enable + enable + true + + + diff --git a/EmployeeManager.sln b/EmployeeManager.sln new file mode 100644 index 0000000..1d88f55 --- /dev/null +++ b/EmployeeManager.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34622.214 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmployeeManager", "EmployeeManager.csproj", "{4671A58C-0DCE-443B-A338-AAE9198CD597}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4671A58C-0DCE-443B-A338-AAE9198CD597}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4671A58C-0DCE-443B-A338-AAE9198CD597}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4671A58C-0DCE-443B-A338-AAE9198CD597}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4671A58C-0DCE-443B-A338-AAE9198CD597}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A5DE7B09-EB5B-43F3-A0DA-C3AB51703916} + EndGlobalSection +EndGlobal diff --git a/Model/DataWorker.cs b/Model/DataWorker.cs new file mode 100644 index 0000000..a8c900e --- /dev/null +++ b/Model/DataWorker.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EmployeeManager.Model +{ + public static class DataWorker + { + } +} diff --git a/Model/Employee.cs b/Model/Employee.cs new file mode 100644 index 0000000..836cb4e --- /dev/null +++ b/Model/Employee.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace EmployeeManager.Model +{ + public class Employee + { + public int Id { get; set; } + public string NameJob { get; set; } + public DateTime StartJob { get; set; } + public DateTime EndJob { get; set; } + public string PartTimeJob { get; set; } + public float Bid { get; set; } + public int PhisicalPersonsId { get; set; } + public virtual PhysicalPerson PhisicalPersons { get; set; } + public List Salarys { get; set; } + public List Vacations { get; set; } + + } +} diff --git a/Model/PhysicalPerson.cs b/Model/PhysicalPerson.cs new file mode 100644 index 0000000..4fd1425 --- /dev/null +++ b/Model/PhysicalPerson.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EmployeeManager.Model +{ + public class PhysicalPerson + { + public int Id { get; set; } + public string Name { get; set; } + public string Surname { get; set; } + public string Patronomic { get; set; } + public DateTime Birthday { get; set; } + public string Gender { get; set; } + public string Address { get; set; } + public string Telephone { get; set; } + public List Employees { get; set; } + } +} diff --git a/Model/Salary.cs b/Model/Salary.cs new file mode 100644 index 0000000..45ef52e --- /dev/null +++ b/Model/Salary.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EmployeeManager.Model +{ + public class Salary + { + public int Id { get; set; } + public int CountHours { get; set; } + public float PriceHour { get; set; } + public float Premium { get; set; } + public DateTime Date { get; set; } + public bool Passed { get; set; } + public int EmployeeId { get; set; } + public virtual Employee Employee { get; set; } + } +} diff --git a/Model/Vacation.cs b/Model/Vacation.cs new file mode 100644 index 0000000..ad82e86 --- /dev/null +++ b/Model/Vacation.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EmployeeManager.Model +{ + public class Vacation + { + public int Id { get; set; } + public DateTime StartData { get; set; } + public DateTime EndData { get; set; } + public bool Passed { get; set; } + public int EmployeeId { get; set; } + public virtual Employee Employee { get; set; } + } +} diff --git a/View/MainWindow.xaml b/View/MainWindow.xaml new file mode 100644 index 0000000..5c2f229 --- /dev/null +++ b/View/MainWindow.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + +