gr682_bpv 4 年之前
父节点
当前提交
3fe4b7be65

+ 23 - 33
HotelCalifornia/Client.xaml

@@ -15,17 +15,15 @@
             </LinearGradientBrush>
         </Grid.Background>
         <Label Content="Информация о клиентах" Foreground="White" FontSize="35" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="148,54,148,336.6"/>
-        <StackPanel Margin="6,124,547,68.6" Orientation="Vertical">
-            <TextBox Name="nametxt" Margin="10,0,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
-  materialDesign:HintAssist.Hint="Имя клиента"/>
-            <TextBox Name="familiatxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
+        <StackPanel Margin="6,134,547,58.6" Orientation="Vertical">
+            <TextBox Name="familiatxt" Margin="10,0,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
   materialDesign:HintAssist.Hint="Фамилия клиента"/>
+            <TextBox Name="nametxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
+  materialDesign:HintAssist.Hint="Имя клиента"/>
             <TextBox Name="otchestvotxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="25"
   materialDesign:HintAssist.Hint="Отчество клиента"/>
-            <ComboBox Margin="10,10,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White"
-                      Style="{StaticResource MaterialDesignFloatingHintComboBox}"
-                       materialDesign:ColorZoneAssist.Mode="Inverted"
-  materialDesign:HintAssist.Hint="Страна">
+            <ComboBox Margin="10,10,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" Style="{StaticResource MaterialDesignFloatingHintComboBox}"
+             materialDesign:ColorZoneAssist.Mode="Inverted" materialDesign:HintAssist.Hint="Страна">
                 <ComboBoxItem
     Content="Россия" />
                 <ComboBoxItem
@@ -41,37 +39,29 @@
             </ComboBox>
         </StackPanel>
         <StackPanel Margin="0,320,547,43.6" Orientation="Horizontal">
-            <Button
-  Style="{StaticResource MaterialDesignIconButton}" Foreground="White"
-  ToolTip="Добавить" Margin="25,0,0,0">
-                <materialDesign:PackIcon
-    Kind="Add" />
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Добавить" Margin="25,0,0,0">
+                <materialDesign:PackIcon Kind="Add" />
             </Button>
-            <Button
-  Style="{StaticResource MaterialDesignIconButton}" Foreground="White"
-  ToolTip="Редактировать" Margin="25,0,0,0">
-                <materialDesign:PackIcon
-    Kind="Edit" />
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Редактировать" Margin="25,0,0,0">
+                <materialDesign:PackIcon Kind="Edit" />
             </Button>
-            <Button
-  Style="{StaticResource MaterialDesignIconButton}" Foreground="White"
-  ToolTip="Удалить" Margin="25,0,0,0">
-                <materialDesign:PackIcon
-    Kind="Delete" />
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Удалить" Margin="25,0,0,0">
+                <materialDesign:PackIcon Kind="Delete" />
             </Button>
         </StackPanel>
-        <DataGrid HorizontalAlignment="Left" Height="257" Margin="293,124,0,0" VerticalAlignment="Top" Width="497" />
-        <Button
-  Style="{StaticResource MaterialDesignIconButton}"
-  ToolTip="Вернуться к окну выбора функции" Margin="10,10,742,391.6" Click="Back">
-            <materialDesign:PackIcon
-    Kind="Backburger"  Foreground="White"/>
+        <DataGrid IsReadOnly="True" HorizontalAlignment="Left" Height="257" Margin="293,134,0,0" VerticalAlignment="Top" Width="497" />
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Вернуться к окну выбора функции" Margin="10,10,742,391.6" Click="Back">
+            <materialDesign:PackIcon Kind="Backburger"  Foreground="White"/>
+        </Button>
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Выход из приложения" Margin="742,10,10,391.6" Click="Close">
+            <materialDesign:PackIcon Kind="ExitToApp" Foreground="White"/>
         </Button>
-        <Button
+        <Button Name="WindMin"
   Style="{StaticResource MaterialDesignIconButton}"
-  ToolTip="Выход из приложения" Margin="742,10,10,391.6" Click="Close">
-        <materialDesign:PackIcon
-    Kind="ExitToApp" Foreground="White"/>
+  ToolTip="Свернуть окно" Margin="694,10,58,391.6" Click="WindMin_Click">
+            <materialDesign:PackIcon
+    Kind="WindowMinimize" Foreground="White"/>
         </Button>
+        <TextBlock Name="timetxt" HorizontalAlignment="Center" FontFamily="Century Gothic" Margin="561,105,10,0" TextWrapping="Wrap" Foreground="White" FontSize="22" VerticalAlignment="Top" Height="28" Width="229"/>
     </Grid>
 </Window>

+ 15 - 0
HotelCalifornia/Client.xaml.cs

@@ -11,6 +11,7 @@ using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Shapes;
+using System.Windows.Threading;
 
 namespace HotelCalifornia
 {
@@ -22,6 +23,15 @@ namespace HotelCalifornia
         public Client()
         {
             InitializeComponent();
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Tick += new EventHandler(Update_Timer_Tick);
+            timer.Interval = new TimeSpan(0, 0, 1);
+            timer.Start();
+        }
+
+        private void Update_Timer_Tick(object sender, EventArgs e)
+        {
+            timetxt.Text = DateTime.Now.ToString();
         }
 
         //Перетаскивание окна
@@ -59,5 +69,10 @@ namespace HotelCalifornia
                     break;
             }
         }
+
+        private void WindMin_Click(object sender, RoutedEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
     }
 }

+ 17 - 0
HotelCalifornia/HotelCalifornia.csproj

@@ -66,6 +66,12 @@
     <Compile Include="Client.xaml.cs">
       <DependentUpon>Client.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Room.xaml.cs">
+      <DependentUpon>Room.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Staff.xaml.cs">
+      <DependentUpon>Staff.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Variant.xaml.cs">
       <DependentUpon>Variant.xaml</DependentUpon>
     </Compile>
@@ -85,6 +91,14 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="Room.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Staff.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Variant.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -138,6 +152,9 @@
   <ItemGroup>
     <Resource Include="Image\cir2.png" />
   </ItemGroup>
+  <ItemGroup>
+    <Resource Include="Image\room.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets" Condition="Exists('..\packages\MaterialDesignThemes.4.0.0\build\MaterialDesignThemes.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

二进制
HotelCalifornia/Image/room.png


+ 8 - 2
HotelCalifornia/MainWindow.xaml

@@ -26,12 +26,12 @@
             <StackPanel Orientation="Horizontal">
                 <materialDesign:PackIcon Kind="User" Width="30" Height="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                 <TextBox Name="logintxt" Margin="0,0,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="10"
-  materialDesign:HintAssist.Hint="Введите логин" Width="227"/>
+  materialDesign:HintAssist.Hint="Введите логин" Width="227" PreviewKeyDown="logintxt_PreviewKeyDown" TextChanged="logintxt_TextChanged"/>
             </StackPanel>
             <Label Content="Пароль:" Margin="0,10,0,0" Foreground="White" FontSize="18" FontFamily="Century Gothic"/>
             <StackPanel Orientation="Horizontal">
                 <materialDesign:PackIcon Kind="Password" Width="30" Height="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
-                <PasswordBox Name="passwordtxt"   materialDesign:HintAssist.Hint="Введите пароль" Foreground="White" FontSize="18" FontFamily="Century Gothic"  HorizontalAlignment="Center" Margin="0,5,0,0" Width="226" MaxLength="10"/>
+                <PasswordBox Name="passwordtxt" materialDesign:HintAssist.Hint="Введите пароль" Foreground="White" FontSize="18" FontFamily="Century Gothic"  HorizontalAlignment="Center" Margin="0,5,0,0" Width="226" MaxLength="10" PreviewKeyDown="passwordtxt_PreviewKeyDown" PreviewTextInput="passwordtxt_PreviewTextInput"/>
             </StackPanel>
         </StackPanel>
         <Button
@@ -46,5 +46,11 @@
             <materialDesign:PackIcon
     Kind="ExitToApp" Foreground="White"/>
         </Button>
+        <Button Name="WindMin"
+  Style="{StaticResource MaterialDesignIconButton}"
+  ToolTip="Свернуть окно" Margin="594,10,58,342" Click="WindMin_Click">
+            <materialDesign:PackIcon
+    Kind="WindowMinimize" Foreground="White"/>
+        </Button>
     </Grid>
 </Window>

+ 56 - 6
HotelCalifornia/MainWindow.xaml.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
@@ -48,16 +49,65 @@ namespace HotelCalifornia
         //Авторизация пользователя
         private void Vhod(object sender, RoutedEventArgs e)
         {
-            if (logintxt.Text == "" || passwordtxt.Password == "")
+            try
             {
-                MessageBox.Show("Поля не могут быть пустыми!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                if (logintxt.Text == "" || passwordtxt.Password == "")
+                {
+                    MessageBox.Show("Поля не могут быть пустыми!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                }
+                else
+                {
+                    Variant variant = new Variant();
+                    this.Close();
+                    variant.Show();
+                }
             }
-            else
+            catch (Exception ex)
             {
-                Variant variant = new Variant();
-                this.Close();
-                variant.Show();
+                MessageBox.Show("Возникла ошибка! " + ex.ToString(),"Ошибка",MessageBoxButton.OK, MessageBoxImage.Error);
+            }       
+        }
+
+        //Запрет пробела
+        private void logintxt_PreviewKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Space)
+            {
+                e.Handled = true;
+            }
+        }
+
+        //Запрет пробела
+        private void passwordtxt_PreviewKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Space)
+            {
+                e.Handled = true;
+            }
+        }
+
+        //Определенные символы
+        private void logintxt_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if (sender is TextBox textBox)
+            {
+                textBox.Text = new string
+               (textBox.Text.Where(ch => (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')).ToArray());
             }
         }
+
+        //Определенные символы
+        private void passwordtxt_PreviewTextInput(object sender, TextCompositionEventArgs e)
+        {
+            bool a = new Regex("[^A-Z]+").IsMatch(e.Text);
+            bool b = new Regex("[^a-z]+").IsMatch(e.Text);
+            bool c = new Regex("[^0-9]+").IsMatch(e.Text);
+            e.Handled = a && b && c;
+        }
+
+        private void WindMin_Click(object sender, RoutedEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
     }
 }

+ 54 - 0
HotelCalifornia/Room.xaml

@@ -0,0 +1,54 @@
+<Window x:Class="HotelCalifornia.Room"
+        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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+        xmlns:local="clr-namespace:HotelCalifornia"
+        mc:Ignorable="d"
+        Title="Room" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" Icon="image/h1.png">
+    <Grid MouseDown="Grid_MouseDown" >
+        <Grid.Background>
+            <LinearGradientBrush StartPoint="0.1,0" EndPoint="0.9,1">
+                <GradientStop Color="#7E42F5" Offset="1" />
+                <GradientStop Color="#383E7A" Offset="0"/>
+            </LinearGradientBrush>
+        </Grid.Background>
+        <Label Content="Комнаты" Foreground="White" FontSize="35" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="167,46,167,344.6"/>
+        <DataGrid Name="dataroom" IsReadOnly="True" HorizontalAlignment="Left" Height="257" Margin="293,138,0,0" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Top" Width="497" />
+        <StackPanel Margin="6,124,547,175.6" Orientation="Vertical">
+            <TextBox Name="numbertxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="3"
+  materialDesign:HintAssist.Hint="Номер комнаты" PreviewTextInput="numbertxt_PreviewTextInput" PreviewKeyDown="numbertxt_PreviewKeyDown"/>
+            <TextBox Name="telephonetxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="9"
+  materialDesign:HintAssist.Hint="Телефон комнаты" PreviewTextInput="telephonetxt_PreviewTextInput" PreviewKeyDown="telephonetxt_PreviewKeyDown"/>
+            <Label Content="Статус комнаты:" Margin="10,15,0,0" Foreground="White" FontSize="18" FontFamily="Century Gothic"/>
+        </StackPanel>
+        <Label Content="Свободна" Margin="17,274,676,135.6" Foreground="White" FontSize="18" FontFamily="Century Gothic"/>
+        <RadioButton IsChecked="True" Name="yescheck" Foreground="White" HorizontalAlignment="Left" Margin="128,278,0,0" VerticalAlignment="Top" Height="23" Width="19" Background="#FFF3EFFA"/>
+        <Label Content="Да" Margin="146,275,620,139.6" Foreground="White" FontSize="16" FontFamily="Century Gothic"/>
+        <RadioButton Name="nocheck" Foreground="White" HorizontalAlignment="Left" Margin="190,278,0,0" VerticalAlignment="Top" Height="23" Width="19" Background="#FFF3EFFA"/>
+        <Label Content="Нет" Margin="208,275,555,139.6" Foreground="White" FontSize="16" FontFamily="Century Gothic"/>
+        <StackPanel Margin="0,320,547,43.6" Orientation="Horizontal">
+            <Button Name="Add" Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Добавить" Margin="25,0,0,0" Click="Add_Click">
+                <materialDesign:PackIcon Kind="Add" />
+            </Button>
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Редактировать" Margin="25,0,0,0" Click="Update_Click">
+                <materialDesign:PackIcon Kind="Edit" />
+            </Button>
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Удалить" Margin="25,0,0,0" Click="Delete_Click">
+                <materialDesign:PackIcon Kind="Delete" />
+            </Button>
+        </StackPanel>
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Вернуться к окну выбора функции" Margin="10,10,742,391.6" Click="Back">
+            <materialDesign:PackIcon Kind="Backburger"  Foreground="White"/>
+        </Button>
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Выход из приложения" Margin="742,10,10,391.6" Click="Close">
+            <materialDesign:PackIcon Kind="ExitToApp" Foreground="White"/>
+        </Button>
+        <Button Name="WindMin"
+  Style="{StaticResource MaterialDesignIconButton}" ToolTip="Свернуть окно" Margin="694,10,58,391.6" Click="WindMin_Click">
+            <materialDesign:PackIcon Kind="WindowMinimize" Foreground="White"/>
+        </Button>
+        <TextBlock Name="timetxt" HorizontalAlignment="Center" FontFamily="Century Gothic" Margin="561,105,10,0" TextWrapping="Wrap" Foreground="White" FontSize="22" VerticalAlignment="Top" Height="28" Width="229"/>
+    </Grid>
+</Window>

+ 159 - 0
HotelCalifornia/Room.xaml.cs

@@ -0,0 +1,159 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+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;
+using System.Windows.Threading;
+using System.Data;
+using System.Data.SqlClient;
+
+namespace HotelCalifornia
+{
+    /// <summary>
+    /// Логика взаимодействия для Room.xaml
+    /// </summary>
+    public partial class Room : Window
+    {
+        public Room()
+        {
+            InitializeComponent();
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Tick += new EventHandler(Update_Timer_Tick);
+            timer.Interval = new TimeSpan(0, 0, 1);
+            timer.Start();
+        }
+
+        //Строка подключения
+        SqlConnection con = new SqlConnection("");
+
+        private void Update_Timer_Tick(object sender, EventArgs e)
+        {
+            timetxt.Text = DateTime.Now.ToString();
+        }
+
+        //Перетаскивание окна
+        private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            DragMove();
+        }
+
+        //Возвращение к предыдущему окну
+        private void Back(object sender, RoutedEventArgs e)
+        {
+            MessageBoxResult result = MessageBox.Show("Вы хотите вернуться к предыдущему окну?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            switch (result)
+            {
+                case MessageBoxResult.Yes:
+                    Variant variant = new Variant();
+                    this.Close();
+                    variant.Show();
+                    break;
+                case MessageBoxResult.No:
+                    break;
+            }
+        }
+
+        //Закрытие окна
+        private void Close(object sender, RoutedEventArgs e)
+        {
+            MessageBoxResult result = MessageBox.Show("Вы хотите выйти из приложения?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            switch (result)
+            {
+                case MessageBoxResult.Yes:
+                    Application.Current.Shutdown();
+                    break;
+                case MessageBoxResult.No:
+                    break;
+            }
+        }
+
+        //Для ввода только цифр
+        private void numbertxt_PreviewTextInput(object sender, TextCompositionEventArgs e)
+        {
+            e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
+        }
+
+        //Для ввода только цифр
+        private void telephonetxt_PreviewTextInput(object sender, TextCompositionEventArgs e)
+        {
+            e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
+        }
+
+        //Запрет пробела
+        private void numbertxt_PreviewKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Space)
+            {
+                e.Handled = true;
+            }
+        }
+
+        //Запрет пробела
+        private void telephonetxt_PreviewKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.Key == Key.Space)
+            {
+                e.Handled = true;
+            }
+        }
+
+        //Добавление
+        private void Add_Click(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                if (numbertxt.Text == "" || telephonetxt.Text == "")
+                {
+                    MessageBox.Show("Заполните все поля!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Комната добавлена!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("Возникла ошибка! " + ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+
+        }
+
+        private void WindMin_Click(object sender, RoutedEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
+
+        private void Update_Click(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+                if (numbertxt.Text == "" || telephonetxt.Text == "")
+                {
+                    MessageBox.Show("Заполните все поля!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Комната добавлена!", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Information);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show("Возникла ошибка! " + ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+        }
+
+        private void Delete_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+    }
+}

+ 53 - 0
HotelCalifornia/Staff.xaml

@@ -0,0 +1,53 @@
+<Window x:Class="HotelCalifornia.Staff"
+        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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+        xmlns:local="clr-namespace:HotelCalifornia"
+        mc:Ignorable="d"
+        Title="Staff" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" Icon="image/h1.png">
+    <Grid>
+        <Grid.Background>
+            <LinearGradientBrush StartPoint="0.1,0" EndPoint="0.9,1">
+                <GradientStop Color="#7E42F5" Offset="1" />
+                <GradientStop Color="#383E7A" Offset="0"/>
+            </LinearGradientBrush>
+        </Grid.Background>
+        <Label Content="Работники администрации" Foreground="White" FontSize="35" FontFamily="Century Gothic" HorizontalAlignment="Center"  Width="500" Margin="150,19,150,372.6"  />
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Выход из приложения" Margin="742,10,10,391.6" Click="Close">
+            <materialDesign:PackIcon Kind="ExitToApp" Foreground="White"/>
+        </Button>
+        <Button Name="WindMin"
+  Style="{StaticResource MaterialDesignIconButton}" ToolTip="Свернуть окно" Margin="694,10,58,391.6" Click="WindMin_Click">
+            <materialDesign:PackIcon Kind="WindowMinimize" Foreground="White"/>
+        </Button>
+        <Button Style="{StaticResource MaterialDesignIconButton}" ToolTip="Вернуться к окну выбора функции" Margin="10,10,742,391.6" Click="Back">
+            <materialDesign:PackIcon Kind="Backburger"  Foreground="White"/>
+        </Button>
+        <StackPanel Margin="6,124,547,85.6" Orientation="Vertical">
+            <TextBox x:Name="nametxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="10"
+                materialDesign:HintAssist.Hint="Имя работника"/>
+            <TextBox x:Name="familiyatxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
+                materialDesign:HintAssist.Hint="Фамилия работника"/>
+            <TextBox x:Name="otchestvotxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="15"
+                materialDesign:HintAssist.Hint="Отчество работника"/>
+            <TextBox x:Name="logintxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="10"
+                materialDesign:HintAssist.Hint="Логин работника"/>
+            <TextBox x:Name="passwordtxt" Margin="10,15,0,0" FontSize="18" FontFamily="Century Gothic" Foreground="White" MaxLength="10"
+                materialDesign:HintAssist.Hint="Пароль работника"/>
+        </StackPanel>
+        <StackPanel Margin="6,364,547,-0.4" Orientation="Horizontal">
+            <Button x:Name="Add" Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Добавить" Margin="25,0,0,0" Click="Add_Click">
+                <materialDesign:PackIcon Kind="Add" />
+            </Button>
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Редактировать" Margin="25,0,0,0" Click="Update_Click">
+                <materialDesign:PackIcon Kind="Edit" />
+            </Button>
+            <Button Style="{StaticResource MaterialDesignIconButton}" Foreground="White" ToolTip="Удалить" Margin="25,0,0,0" Click="Delete_Click">
+                <materialDesign:PackIcon Kind="Delete" />
+            </Button>
+        </StackPanel>
+        <DataGrid Name="datastaff" IsReadOnly="True" HorizontalAlignment="Left" Height="273" Margin="258,124,0,0" BorderThickness="1" BorderBrush="Black" VerticalAlignment="Top" Width="532" SelectionChanged="datastaff_SelectionChanged" />
+    </Grid>
+</Window>

+ 72 - 0
HotelCalifornia/Staff.xaml.cs

@@ -0,0 +1,72 @@
+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 HotelCalifornia
+{
+    /// <summary>
+    /// Логика взаимодействия для Staff.xaml
+    /// </summary>
+    public partial class Staff : Window
+    {
+        public Staff()
+        {
+            InitializeComponent();
+        }
+
+        private void Close(object sender, RoutedEventArgs e)
+        {
+            Application.Current.Shutdown();
+        }
+
+        private void WindMin_Click(object sender, RoutedEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
+
+        private void Back(object sender, RoutedEventArgs e)
+        {
+            MessageBoxResult result = MessageBox.Show("Вы хотите вернуться к предыдущему окну?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            switch (result)
+            {
+                case MessageBoxResult.Yes:
+                    Variant variant = new Variant();
+                    this.Close();
+                    variant.Show();
+                    break;
+                case MessageBoxResult.No:
+                    break;
+            }
+        }
+
+        private void datastaff_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+
+        }
+
+        private void Add_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void Update_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void Delete_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+    }
+}

+ 10 - 3
HotelCalifornia/Variant.xaml

@@ -21,14 +21,14 @@
         <Label Content="Резервирование" Foreground="White" FontSize="20" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="586,272,33,143.6" Width="181"/>
         <StackPanel Orientation="Horizontal" Margin="0,172,0,159.6" HorizontalAlignment="Center" VerticalAlignment="Center" Width="800" Height="118">
             <Button
-  Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="120,0,0,0">
+  Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="120,0,0,0" Click="RoomGO_Click">
                 <materialDesign:PackIcon
     Kind="Door"
     Height="35"
     Width="35" />
             </Button>
             <Button
-  Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="120,0,0,0">
+  Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="120,0,0,0" Click="StaffGO_Click">
                 <materialDesign:PackIcon
     Kind="Work"
     Height="35"
@@ -44,7 +44,7 @@
             <Button
   Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="120,0,0,0">
                 <materialDesign:PackIcon
-    Kind="BagSuitcase"
+    Kind="Ticket"
     Height="35"
     Width="35" />
             </Button>
@@ -61,5 +61,12 @@
             <materialDesign:PackIcon
     Kind="Backburger"  Foreground="White"/>
         </Button>
+        <TextBlock Name="timetxt" HorizontalAlignment="Center" FontFamily="Century Gothic" Margin="314,118,257,0" TextWrapping="Wrap" Foreground="White" FontSize="22" VerticalAlignment="Top" Height="28" Width="229"/>
+        <Button Name="WindMin"
+  Style="{StaticResource MaterialDesignIconButton}"
+  ToolTip="Свернуть окно" Margin="694,10,58,391.6" Click="WindMin_Click">
+            <materialDesign:PackIcon
+    Kind="WindowMinimize" Foreground="White"/>
+        </Button>
     </Grid>
 </Window>

+ 49 - 0
HotelCalifornia/Variant.xaml.cs

@@ -11,6 +11,7 @@ using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Shapes;
+using System.Windows.Threading;
 
 namespace HotelCalifornia
 {
@@ -22,6 +23,17 @@ namespace HotelCalifornia
         public Variant()
         {
             InitializeComponent();
+            //Таймер на обновление времени
+            DispatcherTimer timer = new DispatcherTimer();
+            timer.Tick += new EventHandler(Update_Timer_Tick);
+            timer.Interval = new TimeSpan(0, 0, 1);
+            timer.Start();
+        }
+
+        //Вывод даты и время в textbox
+        private void Update_Timer_Tick(object sender, EventArgs e)
+        {
+            timetxt.Text = DateTime.Now.ToString();
         }
 
         //Перетаскивание окна
@@ -75,5 +87,42 @@ namespace HotelCalifornia
                     break;
             }
         }
+
+        //Переход к окну комнат
+        private void RoomGO_Click(object sender, RoutedEventArgs e)
+        {
+            MessageBoxResult result = MessageBox.Show("Вы хотите перейти к окну комнат?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            switch (result)
+            {
+                case MessageBoxResult.Yes:
+                    Room room = new Room();
+                    this.Close();
+                    room.Show();
+                    break;
+                case MessageBoxResult.No:
+                    break;
+            }
+        }
+
+        private void WindMin_Click(object sender, RoutedEventArgs e)
+        {
+            this.WindowState = WindowState.Minimized;
+        }
+
+        //Переход к окну работников
+        private void StaffGO_Click(object sender, RoutedEventArgs e)
+        {
+            MessageBoxResult result = MessageBox.Show("Вы хотите перейти к окну комнат?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            switch (result)
+            {
+                case MessageBoxResult.Yes:
+                    Staff staff = new Staff();
+                    this.Close();
+                    staff.Show();
+                    break;
+                case MessageBoxResult.No:
+                    break;
+            }
+        }
     }
 }