PhotoCaptureQuery.xaml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <UserControl x:Class="TeamAAS_VP.Views.Statistics.PhotoCaptureQuery"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Statistics"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  11. lex:LocalizeDictionary.DesignCulture="zh-CN"
  12. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  13. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. HorizontalAlignment="Stretch"
  16. VerticalAlignment="Stretch"
  17. FontFamily="{DynamicResource DefaultFont}"
  18. mc:Ignorable="d"
  19. d:DataContext="{d:DesignInstance Type=vm:PhotoCaptureQueryViewModel}"
  20. d:Height="600"
  21. d:Width="1024"
  22. d:Background="White">
  23. <b:Interaction.Triggers>
  24. <b:EventTrigger EventName="Loaded">
  25. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  26. </b:EventTrigger>
  27. </b:Interaction.Triggers>
  28. <Grid Margin="8">
  29. <Grid.RowDefinitions>
  30. <RowDefinition Height="Auto" />
  31. <RowDefinition Height="Auto" />
  32. <RowDefinition Height="*" />
  33. <RowDefinition Height="Auto" />
  34. </Grid.RowDefinitions>
  35. <!--标题-->
  36. <TextBlock Text="拍照记录查询"
  37. FontSize="20"
  38. FontWeight="Bold"
  39. Margin="0,0,0,12" />
  40. <StackPanel Grid.Row="1"
  41. Orientation="Horizontal"
  42. Margin="0,0,0,8">
  43. <TextBlock Text="产品"
  44. VerticalAlignment="Center"
  45. Margin="0,0,8,0" />
  46. <ComboBox MinWidth="100"
  47. ItemsSource="{Binding AllProduct}"
  48. DisplayMemberPath="Name"
  49. SelectedItem="{Binding SelectedProduct}" />
  50. <TextBlock Text="相机"
  51. VerticalAlignment="Center"
  52. Margin="16,0,8,0" />
  53. <ComboBox MinWidth="100"
  54. ItemsSource="{Binding AllCamera}"
  55. DisplayMemberPath="CameraName"
  56. SelectedItem="{Binding SelectedCamera}" />
  57. <TextBlock Text="产品SN"
  58. VerticalAlignment="Center"
  59. Margin="16,0,8,0" />
  60. <TextBox Width="150"
  61. Text="{Binding ProductSN}" />
  62. <TextBlock Text="开始"
  63. VerticalAlignment="Center"
  64. Margin="16,0,8,0" />
  65. <DatePicker SelectedDate="{Binding StartDate}"
  66. MinWidth="100" />
  67. <TextBlock Text="结束"
  68. VerticalAlignment="Center"
  69. Margin="8,0,8,0" />
  70. <DatePicker SelectedDate="{Binding EndDate}"
  71. MinWidth="100" />
  72. <Button Content="查询"
  73. Command="{Binding SearchCommand}"
  74. Margin="12,0,0,0" />
  75. <Button Content="导出当前页"
  76. Command="{Binding ExportCommand}"
  77. Margin="6,0,0,0" />
  78. </StackPanel>
  79. <DataGrid Grid.Row="2"
  80. ItemsSource="{Binding Results}"
  81. AutoGenerateColumns="False"
  82. CanUserAddRows="False"
  83. IsReadOnly="True">
  84. <DataGrid.Columns>
  85. <DataGridTextColumn Header="CaptureTime"
  86. Binding="{Binding CaptureTime, StringFormat=yyyy-MM-dd HH:mm:ss}" />
  87. <DataGridTextColumn Header="RecipeName"
  88. Binding="{Binding RecipeName}" />
  89. <DataGridTextColumn Header="CameraName"
  90. Binding="{Binding CameraName}" />
  91. <DataGridTextColumn Header="ProductSN"
  92. Binding="{Binding ProductSN}" />
  93. <DataGridTextColumn Header="Result"
  94. Binding="{Binding Result}" />
  95. <DataGridTextColumn Header="ImagePath"
  96. Binding="{Binding ImagePath}" />
  97. </DataGrid.Columns>
  98. </DataGrid>
  99. <StackPanel Grid.Row="3"
  100. Orientation="Horizontal"
  101. HorizontalAlignment="Center"
  102. Margin="0,8,0,0">
  103. <Button Content="上一页"
  104. Command="{Binding PrevPageCommand}"
  105. Margin="4" />
  106. <TextBlock VerticalAlignment="Center"
  107. Margin="4">第</TextBlock>
  108. <TextBox Width="50"
  109. Text="{Binding PageIndex, UpdateSourceTrigger=PropertyChanged}"
  110. HorizontalContentAlignment="Center" />
  111. <TextBlock VerticalAlignment="Center"
  112. Margin="4">页 / 共</TextBlock>
  113. <TextBlock VerticalAlignment="Center"
  114. Text="{Binding TotalCount}"
  115. Margin="4" />
  116. <Button Content="下一页"
  117. Command="{Binding NextPageCommand}"
  118. Margin="4" />
  119. </StackPanel>
  120. <Button Margin="16"
  121. HorizontalAlignment="Left"
  122. VerticalAlignment="Center"
  123. Grid.RowSpan="3"
  124. Command="{x:Static materialDesign:Transitioner.MovePreviousCommand}"
  125. Style="{StaticResource MaterialDesignFloatingActionMiniButton}">
  126. <materialDesign:PackIcon Kind="StepBackward" />
  127. </Button>
  128. <Button Margin="16"
  129. HorizontalAlignment="Right"
  130. VerticalAlignment="Center"
  131. Grid.RowSpan="3"
  132. Command="{x:Static materialDesign:Transitioner.MoveNextCommand}"
  133. Style="{StaticResource MaterialDesignFloatingActionSecondaryButton}">
  134. <materialDesign:PackIcon Kind="StepForward" />
  135. </Button>
  136. </Grid>
  137. </UserControl>