添加项目文件。
This commit is contained in:
148
SamplePreSystem.UI/Views/QueryManager/SampleQueryView.xaml
Normal file
148
SamplePreSystem.UI/Views/QueryManager/SampleQueryView.xaml
Normal file
@@ -0,0 +1,148 @@
|
||||
<UserControl
|
||||
x:Class="SamplePre.UIWpf.QueryManager.SampleQueryView"
|
||||
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:local="clr-namespace:SamplePre.UIWpf.QueryManager"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="White"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Margin="10,0" Orientation="Horizontal">
|
||||
|
||||
<TextBlock VerticalAlignment="Center" Text="时间:" />
|
||||
<DatePicker
|
||||
Width="140"
|
||||
Height="40"
|
||||
Margin="10,0"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectedDate="{Binding StartDate}" />
|
||||
<TextBlock VerticalAlignment="Center" Text="—" />
|
||||
<DatePicker
|
||||
Width="140"
|
||||
Height="40"
|
||||
Margin="10,0"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
SelectedDate="{Binding EndDate}" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="20,0"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
x:Name="btnFindSample"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="3"
|
||||
Command="{Binding GetDataCommand}"
|
||||
Content="查 询" />
|
||||
<Button
|
||||
x:Name="btnExport"
|
||||
Width="100"
|
||||
Height="30"
|
||||
Margin="3"
|
||||
Command="{Binding ExportExcelCommand}"
|
||||
Content="导 出" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
VerticalAlignment="Center"
|
||||
Background="#E6E6E6">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
Padding="6"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="样品列表" />
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid
|
||||
x:Name="dg_sample"
|
||||
Grid.Row="1"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="True"
|
||||
FrozenColumnCount="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding SampleList}"
|
||||
SelectedItem="{Binding SelectSample}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding qrcode}"
|
||||
Header="二维码" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding item_name}"
|
||||
Header="样品名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding standrad_id}"
|
||||
Header="标准ID" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding standrad}"
|
||||
Header="标准名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding input_user}"
|
||||
Header="录入人员" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding input_date}"
|
||||
Header="录入日期" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding bach_no}"
|
||||
Header="批号" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,34 @@
|
||||
using SamplePreSystem.UI.ViewModel.QueryManager;
|
||||
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.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace SamplePre.UIWpf.QueryManager
|
||||
{
|
||||
/// <summary>
|
||||
/// SampleQueryView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SampleQueryView : UserControl
|
||||
{
|
||||
public SampleQueryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = new SampleQueryViewModel();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user