QuerySaleGoodsView.xaml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <UserControl x:Class="Muchinfo.MTPClient.Sale.Views.QuerySaleGoodsView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:dataGrid="clr-namespace:Muchinfo.WPF.Controls.DataGrid;assembly=Client.WPF.Controls"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  8. DataContext="{Binding QuerySaleGoods,
  9. Source={StaticResource Locator}}"
  10. FontSize="{DynamicResource MuchinfoFontSize_M}"
  11. mc:Ignorable="d">
  12. <UserControl.Resources>
  13. <DataTemplate x:Key="OperationDataTemplate">
  14. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  15. <Button Width="52"
  16. Height="22"
  17. Margin="3"
  18. Command="{Binding Path=DataContext.DetailCommand,
  19. RelativeSource={RelativeSource Mode=FindAncestor,
  20. AncestorLevel=3,
  21. AncestorType={x:Type Grid}}}"
  22. Content="{x:Static resource:Client_Resource.Content_SaleApply}"
  23. IsEnabled="{Binding IsSale}"
  24. Style="{DynamicResource ButtonWithBorderStyle}" />
  25. </StackPanel>
  26. </DataTemplate>
  27. </UserControl.Resources>
  28. <Grid>
  29. <dataGrid:MuchinfoDataGrid x:Name="SaleDataGrid"
  30. FontSize="{DynamicResource MuchinfoFontSize_M}"
  31. FrozenColumnCount="4"
  32. ItemsSource="{Binding SaleGoodsList}"
  33. KeyUp="SaleDataGrid_OnKeyDown"
  34. MouseRightButtonDown="SaleDataGrid_OnMouseRightButtonDown"
  35. PreviewMouseWheel="SaleDataGrid_OnPreviewMouseWheel"
  36. ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  37. ScrollViewer.VerticalScrollBarVisibility="Hidden"
  38. SelectedIndex="-1"
  39. SelectedItem="{Binding CurrentDataGridItem,
  40. Mode=TwoWay}"
  41. Style="{DynamicResource QuoteMuchinfoDataGridStyle}">
  42. <!--
  43. <DataGrid.Columns>
  44. <DataGridTextColumn Width="Auto"
  45. MinWidth="50"
  46. Binding="{Binding OrderNumber}"
  47. ElementStyle="{StaticResource DataGridTextColumnStyle}"
  48. FontWeight="Bold">
  49. <DataGridTextColumn.Header>
  50. <StackPanel HorizontalAlignment="Stretch">
  51. <TextBlock HorizontalAlignment="Center"
  52. FontSize="{DynamicResource MuchinfoFontSize_M}"
  53. Text="{x:Static resource:Client_Resource.FinancingAndInvestmen_Id}" />
  54. </StackPanel>
  55. </DataGridTextColumn.Header>
  56. </DataGridTextColumn>
  57. <DataGridTextColumn Width="Auto"
  58. MinWidth="50"
  59. Binding="{Binding GoodsCode}"
  60. ElementStyle="{DynamicResource DataGridTextColumnStyleLeft}"
  61. FontWeight="Bold"
  62. Foreground="{DynamicResource GoodsCodeBrush}">
  63. <DataGridTextColumn.Header>
  64. <StackPanel HorizontalAlignment="Stretch">
  65. <TextBlock HorizontalAlignment="Center"
  66. FontSize="{DynamicResource MuchinfoFontSize_M}"
  67. Text="{x:Static resource:Client_Resource.Content_GoodsCode}" />
  68. </StackPanel>
  69. </DataGridTextColumn.Header>
  70. </DataGridTextColumn>
  71. <DataGridTemplateColumn Width="Auto"
  72. MinWidth="15"
  73. CellTemplate="{DynamicResource MySelectedFlagDataTemplate}">
  74. <DataGridTemplateColumn.Header>
  75. <StackPanel HorizontalAlignment="Stretch">
  76. <TextBlock HorizontalAlignment="Center" Text="" />
  77. </StackPanel>
  78. </DataGridTemplateColumn.Header>
  79. </DataGridTemplateColumn>
  80. <DataGridTextColumn Width="Auto"
  81. MinWidth="80"
  82. Binding="{Binding GoodsName}"
  83. ElementStyle="{StaticResource DataGridTextColumnStyleLeft}"
  84. Foreground="{DynamicResource NameDefaultBrush}">
  85. <DataGridTextColumn.Header>
  86. <StackPanel HorizontalAlignment="Stretch">
  87. <TextBlock HorizontalAlignment="Center"
  88. FontSize="{DynamicResource MuchinfoFontSize_M}"
  89. Text="{x:Static resource:Client_Resource.Content_GoodsName}" />
  90. </StackPanel>
  91. </DataGridTextColumn.Header>
  92. </DataGridTextColumn>
  93. <DataGridTextColumn Width="Auto"
  94. MinWidth="80"
  95. Binding="{Binding AgreeUnitDisplay}"
  96. ElementStyle="{StaticResource DataGridTextColumnStyle}">
  97. <DataGridTextColumn.Header>
  98. <StackPanel HorizontalAlignment="Stretch">
  99. <TextBlock HorizontalAlignment="Center"
  100. FontSize="{DynamicResource MuchinfoFontSize_M}"
  101. Text="{x:Static resource:Client_Resource.Content_AgreeUnit}" />
  102. </StackPanel>
  103. </DataGridTextColumn.Header>
  104. </DataGridTextColumn>
  105. <DataGridTextColumn Width="Auto"
  106. MinWidth="80"
  107. Binding="{Binding SalePrice}"
  108. ElementStyle="{StaticResource DataGridTextColumnStyleRight}"
  109. FontWeight="Bold"
  110. Foreground="{DynamicResource QuoteAscBrush}">
  111. <DataGridTextColumn.Header>
  112. <StackPanel HorizontalAlignment="Stretch">
  113. <TextBlock HorizontalAlignment="Right"
  114. FontSize="{DynamicResource MuchinfoFontSize_M}"
  115. Text="{x:Static resource:Client_Resource.Content_SalePrice}" />
  116. </StackPanel>
  117. </DataGridTextColumn.Header>
  118. </DataGridTextColumn>
  119. <DataGridTextColumn Width="Auto"
  120. MinWidth="120"
  121. Binding="{Binding ApplyStartTimeDisplay}"
  122. ElementStyle="{StaticResource DataGridTextColumnStyleRight}"
  123. FontWeight="Bold">
  124. <DataGridTextColumn.Header>
  125. <StackPanel HorizontalAlignment="Stretch">
  126. <TextBlock HorizontalAlignment="Right" Text="{x:Static resource:Client_Resource.Content_ApplyStartTime}" />
  127. </StackPanel>
  128. </DataGridTextColumn.Header>
  129. </DataGridTextColumn>
  130. <DataGridTextColumn Width="Auto"
  131. MinWidth="120"
  132. Binding="{Binding ApplyEndTimeDisplay}"
  133. ElementStyle="{StaticResource DataGridTextColumnStyleRight}"
  134. FontWeight="Bold">
  135. <DataGridTextColumn.Header>
  136. <StackPanel HorizontalAlignment="Stretch">
  137. <TextBlock HorizontalAlignment="Right" Text="{x:Static resource:Client_Resource.Content_ApplyEndTime}" />
  138. </StackPanel>
  139. </DataGridTextColumn.Header>
  140. </DataGridTextColumn>
  141. <DataGridTextColumn Width="Auto"
  142. MinWidth="80"
  143. Binding="{Binding RunStepsDisplay}"
  144. ElementStyle="{StaticResource DataGridTextColumnStyle}">
  145. <DataGridTextColumn.Header>
  146. <StackPanel HorizontalAlignment="Stretch">
  147. <TextBlock HorizontalAlignment="Center" Text="{x:Static resource:Client_Resource.Content_State}" />
  148. </StackPanel>
  149. </DataGridTextColumn.Header>
  150. </DataGridTextColumn>
  151. <DataGridTemplateColumn Width="Auto">
  152. <DataGridTemplateColumn.Header>
  153. <StackPanel HorizontalAlignment="Stretch">
  154. <TextBlock HorizontalAlignment="Center" Text="{x:Static resource:Client_Resource.Content_Operation}" />
  155. </StackPanel>
  156. </DataGridTemplateColumn.Header>
  157. <DataGridTemplateColumn.CellTemplate>
  158. <DataTemplate>
  159. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  160. <Button Width="52"
  161. Height="22"
  162. Margin="3"
  163. Command="{Binding Path=DataContext.DetailCommand,
  164. RelativeSource={RelativeSource Mode=FindAncestor,
  165. AncestorLevel=3,
  166. AncestorType={x:Type Grid}}}"
  167. Content="{x:Static resource:Client_Resource.Content_SaleApply}"
  168. IsEnabled="{Binding IsSale}"
  169. Style="{DynamicResource ButtonWithBorderStyle}" />
  170. </StackPanel>
  171. </DataTemplate>
  172. </DataGridTemplateColumn.CellTemplate>
  173. </DataGridTemplateColumn>
  174. </DataGrid.Columns>
  175. -->
  176. </dataGrid:MuchinfoDataGrid>
  177. </Grid>
  178. </UserControl>