Переглянути джерело

Разработа метод поиска

Danila Alekseev 2 роки тому
батько
коміт
fadd642507
4 змінених файлів з 58 додано та 3 видалено
  1. BIN
      LR1/Images/Loopa.png
  2. 1 0
      LR1/LR1.csproj
  3. 36 3
      LR1/Workers.xaml
  4. 21 0
      LR1/Workers.xaml.cs

BIN
LR1/Images/Loopa.png


+ 1 - 0
LR1/LR1.csproj

@@ -195,6 +195,7 @@
       <DependentUpon>TitleWorkers.edmx</DependentUpon>
       <LastGenOutput>TitleWorkers.cs</LastGenOutput>
     </Content>
+    <Resource Include="Images\Loopa.png" />
   </ItemGroup>
   <ItemGroup>
     <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />

+ 36 - 3
LR1/Workers.xaml

@@ -15,7 +15,40 @@
     </Page.Resources>

 
     <Grid Background="{DynamicResource BackgroundStyle}">
-        <Menu Margin="0,10,0,0" Height="35" VerticalAlignment="Top" HorizontalAlignment="Center" Width="760">
+        <Border Name="BorderFind" Height="150" Width="350" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10" BorderBrush="#FF082E05" BorderThickness="2" CornerRadius="7" Visibility="Hidden">
+            <Border.Background>
+                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
+                    <GradientStop Color="#FF72F0D9" Offset="1"/>
+                    <GradientStop Color="#FF8FE297" Offset="0"/>
+                </LinearGradientBrush>
+            </Border.Background>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                    <ColumnDefinition/>
+                </Grid.ColumnDefinitions>
+                <Grid.RowDefinitions>
+                    <RowDefinition/>
+                    <RowDefinition/>
+                    <RowDefinition/>
+                </Grid.RowDefinitions>
+                <TextBlock x:Name="Find" Text="Поиск" FontSize="22" Height="30" Width="80" FontWeight="Bold" Grid.Column="1"/>
+                <TextBlock Name="TextBlockSurname" Text="Фамилия" FontSize="18" Height="25" Width="80" Grid.Row="1" HorizontalAlignment="Right" Margin="10"/>
+                <TextBlock Name ="TextBlockTitle" Text="Должность" FontSize="18" Height="25" Width="100" Grid.Row="2" HorizontalAlignment="Right" Margin="5"/>
+                <TextBox Name="TextBoxSurname" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Height="30" Width="180" HorizontalAlignment="Left" TextChanged="TextBoxSurname_TextChanged"/>
+                <ComboBox Name="ComboBoxTitle" ItemsSource="{Binding Source={StaticResource ListTitle}}" DisplayMemberPath="Title1" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Height="30" Width="180" HorizontalAlignment="Left" SelectionChanged="ComboBoxTitle_SelectionChanged"/>
+                <Button Name="ButtonFindSurname" ToolTip="Поиск по фамилии" IsEnabled="False" Grid.Column="2" Grid.Row="1" Height="35" Width="35" HorizontalAlignment="Right" Margin="10,0" Click="ButtonFindSurname_Click">
+                    <Image Source="Images\Loopa.png" />
+                </Button>
+                <Button Name="ButtonFindTitle" ToolTip="Поиск по должности" IsEnabled="False" Grid.Column="2" Grid.Row="2" Height="35" Width="35" HorizontalAlignment="Right" Margin="10,0" Click="ButtonFindTitle_Click">
+                    <Image Source="Images\Loopa.png" />
+                </Button>
+            </Grid>
+
+        </Border>
+
+        <Menu Margin="17,10,0,0" Height="35" VerticalAlignment="Top" HorizontalAlignment="Left" Width="400">
             <Menu.Background>
                 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                     <GradientStop Color="#FFD9D6D6" Offset="1"/>
@@ -35,7 +68,7 @@
             <MenuItem Header="Отчет" FontSize="14"/>
         </Menu>
 
-        <ToolBar HorizontalAlignment="Center" Height="35" Margin="0,50,0,0" VerticalAlignment="Top" Width="760">
+        <ToolBar HorizontalAlignment="Left" Height="35" Margin="15,50,0,0" VerticalAlignment="Top" Width="400">
             <Button x:Name="Undo" Command="Undo" ToolTip="Отменить редактирование/создание" Height="27" Width="30">
                 <Image Source="Images\Undo.png" Style="{DynamicResource ImageStyle}"/>
             </Button>
@@ -56,7 +89,7 @@
             </Button>
 
         </ToolBar>
-        <DataGrid Margin="25,129,25,25" Name="DataGridEmployee" ItemsSource="{Binding}" AutoGenerateColumns="False" HorizontalAlignment="Left" 
+        <DataGrid Margin="25,170,25,10" Name="DataGridEmployee" ItemsSource="{Binding}" AutoGenerateColumns="False" HorizontalAlignment="Left" 
                   MaxWidth="1000" MaxHeight="295" RowBackground="#FFE6D3EF" AlternatingRowBackground="#FC96CFD4" BorderBrush="#FF1F33EB"
                   BorderThickness="3" IsReadOnly="True" RowHeight="25" Cursor="Hand" CanUserAddRows="False" CanUserDeleteRows="False">
             <DataGrid.RowValidationErrorTemplate>

+ 21 - 0
LR1/Workers.xaml.cs

@@ -143,6 +143,7 @@ namespace LR1
             MessageBox.Show("Поиск");
             isDirty = false;
             isLoaded = true;
+            BorderFind.Visibility = System.Windows.Visibility.Visible;
         }
 
         private void SaveCommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
@@ -181,5 +182,25 @@ namespace LR1
             ListEmployee.Clear();
             GetEmployees();
         }
+
+        private void TextBoxSurname_TextChanged(object sender, TextChangedEventArgs e)
+        {
+
+        }
+
+        private void ComboBoxTitle_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+
+        }
+
+        private void ButtonFindSurname_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void ButtonFindTitle_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
     }
 }