Добавьте файлы проекта.

This commit is contained in:
maksim 2024-11-26 14:12:47 +04:00
parent b235400ca1
commit 85f1ed3e2b
17 changed files with 370 additions and 0 deletions

67
App.xaml Normal file
View File

@ -0,0 +1,67 @@
<Application x:Class="EmployeeManager.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EmployeeManager"
StartupUri="View/MainWindow.xaml">
<Application.Resources>
<!-- Стиль для закругленных кнопок -->
<Style x:Key="RoundedButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<!-- Тень кнопки -->
<Border Background="{TemplateBinding Background}"
CornerRadius="15"
BorderBrush="Transparent"
BorderThickness="0"
x:Name="ButtonBorder">
<Border.Effect>
<DropShadowEffect Color="Black" BlurRadius="10" ShadowDepth="2" Opacity="0.4" />
</Border.Effect>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
</Grid>
<ControlTemplate.Triggers>
<!-- Анимация цвета при наведении -->
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="ButtonBorder"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#0066CC" Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Storyboard.TargetName="ButtonBorder"
Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)"
To="#004890" Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<!-- Анимация сжатия при нажатии -->
<Trigger Property="IsPressed" Value="True">
<Setter Property="RenderTransform" TargetName="ButtonBorder">
<Setter.Value>
<ScaleTransform ScaleX="0.95" ScaleY="0.95" />
</Setter.Value>
</Setter>
<Setter TargetName="ButtonBorder" Property="Effect">
<Setter.Value>
<DropShadowEffect Color="Black" BlurRadius="15" ShadowDepth="0" Opacity="0.6" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>

14
App.xaml.cs Normal file
View File

@ -0,0 +1,14 @@
using System.Configuration;
using System.Data;
using System.Windows;
namespace EmployeeManager
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

10
AssemblyInfo.cs Normal file
View File

@ -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)
)]

11
EmployeeManager.csproj Normal file
View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>

25
EmployeeManager.sln Normal file
View File

@ -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

12
Model/DataWorker.cs Normal file
View File

@ -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
{
}
}

20
Model/Employee.cs Normal file
View File

@ -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<Salary> Salarys { get; set; }
public List<Vacation> Vacations { get; set; }
}
}

21
Model/PhysicalPerson.cs Normal file
View File

@ -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<Employee> Employees { get; set; }
}
}

20
Model/Salary.cs Normal file
View File

@ -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; }
}
}

18
Model/Vacation.cs Normal file
View File

@ -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; }
}
}

26
View/MainWindow.xaml Normal file
View File

@ -0,0 +1,26 @@
<Window x:Class="EmployeeManager.View.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Отдел кадров УлГТУ" Height="450" Width="800" Background="#0D2D4F">
<Grid>
<!-- Заголовок -->
<TextBlock Text="Отдел кадров УлГТУ"
HorizontalAlignment="Center" VerticalAlignment="Top"
FontSize="24" FontWeight="Bold"
Foreground="#FFFFFF" Margin="0,20,0,0" />
<!-- Центральный StackPanel -->
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,40">
<!-- Кнопка 1 -->
<Button Content="Работа с сотрудниками" Width="200" Height="50" Margin="0,10"
Background="#004890" Foreground="#FFFFFF" FontSize="16"
Style="{StaticResource RoundedButtonStyle}"/>
<!-- Кнопка 2 -->
<Button Content="Работа с физ. лицами" Width="200" Height="50" Margin="0,10"
Background="#004890" Foreground="#FFFFFF" FontSize="16"
Style="{StaticResource RoundedButtonStyle}"/>
</StackPanel>
</Grid>
</Window>

24
View/MainWindow.xaml.cs Normal file
View File

@ -0,0 +1,24 @@
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace EmployeeManager.View
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

24
View/MessageWindow.xaml Normal file
View File

@ -0,0 +1,24 @@
<Window x:Class="EmployeeManager.View.MessageWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Сообщение"
Height="200" Width="400"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen"
Background="#0D2D4F">
<Grid>
<!-- Текст сообщения -->
<TextBlock Text="Ваше сообщение здесь"
HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="16" FontWeight="Bold"
Foreground="#FFFFFF"
Margin="0,0,0,40"/>
<!-- Кнопка "Ок" -->
<Button Content="Ок"
Width="100" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Top"
Margin="0,114,0,0"
Style="{StaticResource RoundedButtonStyle}" />
</Grid>
</Window>

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace EmployeeManager.View
{
/// <summary>
/// Логика взаимодействия для MessageWindow.xaml
/// </summary>
public partial class MessageWindow : Window
{
public MessageWindow()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,12 @@
<Window x:Class="EmployeeManager.View.PhysicalPerson.WorkInPhysicalPerson"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:EmployeeManager.View.PhysicalPerson"
mc:Ignorable="d"
Title="WorkInPhysicalPerson" Height="450" Width="800">
<Grid>
</Grid>
</Window>

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace EmployeeManager.View.PhysicalPerson
{
/// <summary>
/// Логика взаимодействия для WorkInPhysicalPerson.xaml
/// </summary>
public partial class WorkInPhysicalPerson : Window
{
public WorkInPhysicalPerson()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EmployeeManager.ViewModel
{
internal class DataManageViewModel
{
}
}