Skip to content

Commit

Permalink
VDS changed IsDisabled to IsReadOnly, so users can mark&copy NUMBER
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickGrub committed Jan 14, 2022
1 parent ad4331b commit 974436c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 56 deletions.
28 changes: 12 additions & 16 deletions Files/DataStandard/Vault.Custom/Configuration/File/erpBom.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviours="clr-namespace:Common.Wpf;assembly=Common" behaviours:TabTitleBehavior.TabTitle="ERP BOM" x:Name="MainWindow">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
Expand Down Expand Up @@ -44,7 +44,7 @@
<Setter Property="Padding" Value="4" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" >
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
</Setter.Value>
Expand All @@ -71,7 +71,7 @@
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" >
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
</Setter.Value>
Expand Down Expand Up @@ -116,7 +116,7 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<GroupBox Header="Header Data" Grid.Row="0">
<Grid>
<Grid.RowDefinitions>
Expand All @@ -132,23 +132,19 @@
<ColumnDefinition MinWidth="100" Width="*"/>
</Grid.ColumnDefinitions>
<Label Content="Number" Grid.Row="0" Grid.Column="0" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsEnabled="False" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsReadOnly="True" />
<Label Content="Description" Grid.Column="0" Grid.Row="1" />
<TextBox Text="{Binding Description}" Grid.Column="1" Grid.Row="1" IsEnabled="False"/>
<TextBox Text="{Binding Description}" Grid.Column="1" Grid.Row="1" IsReadOnly="True"/>
<Label Content="State" Grid.Row="0" Grid.Column="3" />
<ComboBox Grid.Row="0" Grid.Column="4" SelectedValue="{Binding State}" DisplayMemberPath="Value" SelectedValuePath="Key" IsEnabled="False"
ItemsSource="{Binding DataContext.PsList[GetBOMStateList], ElementName=MainWindow}" />
<ComboBox Grid.Row="0" Grid.Column="4" SelectedValue="{Binding State}" DisplayMemberPath="Value" SelectedValuePath="Key" IsEnabled="False" ItemsSource="{Binding DataContext.PsList[GetBOMStateList], ElementName=MainWindow}" />
<Label Content="Last Modified Date" Grid.Column="3" Grid.Row="1" />
<TextBox Text="{Binding ModifiedDate}" Grid.Column="4" Grid.Row="1" IsEnabled="False" />
<TextBox Text="{Binding ModifiedDate}" Grid.Column="4" Grid.Row="1" IsReadOnly="True" />
</Grid>
</GroupBox>

<DataGrid Grid.Row="1" ItemsSource="{Binding BomRows}"
AutoGenerateColumns="False" ScrollViewer.CanContentScroll="False"
HorizontalGridLinesBrush="WhiteSmoke" VerticalGridLinesBrush="WhiteSmoke" Background="White" Margin="6"
Focusable="False" SelectionMode="Single" IsReadOnly="True">
<DataGrid Grid.Row="1" ItemsSource="{Binding BomRows}" AutoGenerateColumns="False" ScrollViewer.CanContentScroll="False" HorizontalGridLinesBrush="WhiteSmoke" VerticalGridLinesBrush="WhiteSmoke" Background="White" Margin="6" Focusable="False" SelectionMode="Single" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Position}" Header="Position" Width="60" IsReadOnly="True" SortDirection="Ascending" >
<DataGridTextColumn Binding="{Binding Position}" Header="Position" Width="60" IsReadOnly="True" SortDirection="Ascending">
<DataGridTextColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Right" />
Expand All @@ -164,7 +160,7 @@
<DataGridTextColumn Binding="{Binding Type}" Header="Type" Width="60" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding ChildNumber}" Header="Number" Width="120" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Description}" Header="Description" Width="*" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Quantity}" Header="Quantity" Width="60" IsReadOnly="True" >
<DataGridTextColumn Binding="{Binding Quantity}" Header="Quantity" Width="60" IsReadOnly="True">
<DataGridTextColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Right" />
Expand Down
21 changes: 9 additions & 12 deletions Files/DataStandard/Vault.Custom/Configuration/File/erpItem.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:behaviours="clr-namespace:Common.Wpf;assembly=Common" behaviours:TabTitleBehavior.TabTitle="ERP Item" x:Name="MainWindow">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
Expand Down Expand Up @@ -45,7 +45,7 @@
<Setter Property="Padding" Value="4" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" >
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
</Setter.Value>
Expand Down Expand Up @@ -89,7 +89,7 @@

<Button Grid.Row="0" Grid.Column="1" x:Name="LinkMaterialButton" Content="Link ERP Item..." Command="{Binding PsCmd[LinkErpMaterial]}" DataContext="{Binding DataContext, ElementName=MainWindow}" Width="136" Margin="0,0,14,0" />
<!-- Visibility="{Binding DataContext.IsCreate, ElementName=DataGrid, Converter={StaticResource BooleanToVisibility}}" -->
<Button Grid.Row="0" Grid.Column="2" x:Name="CreateOrUpdateMaterialButton" IsEnabled="False" Command="{Binding PsCmd[CreateOrUpdateErpMaterial]}" DataContext="{Binding DataContext, ElementName=MainWindow}" Width="136" Margin="0,0,14,0" >
<Button Grid.Row="0" Grid.Column="2" x:Name="CreateOrUpdateMaterialButton" IsEnabled="False" Command="{Binding PsCmd[CreateOrUpdateErpMaterial]}" DataContext="{Binding DataContext, ElementName=MainWindow}" Width="136" Margin="0,0,14,0">
<Button.Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Content" Value="Create ERP Item"/>
Expand Down Expand Up @@ -133,7 +133,7 @@
<ColumnDefinition MinWidth="100" Width="*"/>
</Grid.ColumnDefinitions>
<Label Content="Number" Grid.Row="0" Grid.Column="0" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsEnabled="False" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsReadOnly="True" />
<Label Content="Description" Grid.Column="0" Grid.Row="1" />
<TextBox Text="{Binding Description, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="1">
<i:Interaction.Triggers>
Expand All @@ -150,8 +150,7 @@
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding IsBlocked}" IsEnabled="False" Visibility="{Binding IsUpdate, Converter={StaticResource BooleanToVisibility}}" />

<Label Content="Type" Grid.Column="3" Grid.Row="1"/>
<ComboBox Name="MaterialTypeList" SelectedValue="{Binding Type}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="4" Grid.Row="1" IsEnabled="{Binding IsCreate}"
ItemsSource="{Binding DataContext.PsList[GetMaterialTypeList], ElementName=MainWindow}" >
<ComboBox Name="MaterialTypeList" SelectedValue="{Binding Type}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="4" Grid.Row="1" IsEnabled="{Binding IsCreate}" ItemsSource="{Binding DataContext.PsList[GetMaterialTypeList], ElementName=MainWindow}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding DataContext.PsCmd[ValidateErpMaterialTab], ElementName=MainWindow}" />
Expand All @@ -163,8 +162,7 @@
</ComboBox>

<Label Content="Base Unit of Measure" Grid.Column="3" Grid.Row="0" />
<ComboBox Name="UomList" SelectedValue="{Binding UnitOfMeasure}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="4" Grid.Row="0" IsEnabled="{Binding IsCreate}"
ItemsSource="{Binding DataContext.PsList[GetUnitOfMeasuresList], ElementName=MainWindow}" />
<ComboBox Name="UomList" SelectedValue="{Binding UnitOfMeasure}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="4" Grid.Row="0" IsEnabled="{Binding IsCreate}" ItemsSource="{Binding DataContext.PsList[GetUnitOfMeasuresList], ElementName=MainWindow}" />

<Label Content="Last Modified Date" Grid.Column="3" Grid.Row="2" Visibility="{Binding IsUpdate, Converter={StaticResource BooleanToVisibility}}"/>
<TextBox Text="{Binding ModifiedDate}" Grid.Column="4" Grid.Row="2" IsEnabled="False" Visibility="{Binding IsUpdate, Converter={StaticResource BooleanToVisibility}}"/>
Expand All @@ -185,8 +183,7 @@
</Grid.ColumnDefinitions>

<Label Content="Item Category Code" Grid.Column="0" Grid.Row="0" />
<ComboBox Name="Category" SelectedValue="{Binding Category}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="1" Grid.Row="0"
ItemsSource="{Binding DataContext.PsList[GetCategoryList], ElementName=MainWindow}" />
<ComboBox Name="Category" SelectedValue="{Binding Category}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Column="1" Grid.Row="0" ItemsSource="{Binding DataContext.PsList[GetCategoryList], ElementName=MainWindow}" />

<Label Content="Search Description" Grid.Column="0" Grid.Row="1" />
<TextBox Text="{Binding SearchDescription}" Grid.Column="1" Grid.Row="1" />
Expand Down
28 changes: 12 additions & 16 deletions Files/DataStandard/Vault.Custom/Configuration/Item/erpBom.xaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviours="clr-namespace:Common.Wpf;assembly=Common" behaviours:TabTitleBehavior.TabTitle="ERP BOM" x:Name="MainWindow">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
Expand Down Expand Up @@ -44,7 +44,7 @@
<Setter Property="Padding" Value="4" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" >
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
</Setter.Value>
Expand All @@ -71,7 +71,7 @@
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" >
<Setter Property="BorderBrush">
<Setter.Value>
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.ActiveBorderColorKey}}"/>
</Setter.Value>
Expand Down Expand Up @@ -116,7 +116,7 @@
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<GroupBox Header="Header Data" Grid.Row="0">
<Grid>
<Grid.RowDefinitions>
Expand All @@ -132,23 +132,19 @@
<ColumnDefinition MinWidth="100" Width="*"/>
</Grid.ColumnDefinitions>
<Label Content="Number" Grid.Row="0" Grid.Column="0" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsEnabled="False" />
<TextBox Text="{Binding Number}" Grid.Row="0" Grid.Column="1" IsReadOnly="True" />
<Label Content="Description" Grid.Column="0" Grid.Row="1" />
<TextBox Text="{Binding Description}" Grid.Column="1" Grid.Row="1" IsEnabled="False"/>
<TextBox Text="{Binding Description}" Grid.Column="1" Grid.Row="1" IsReadOnly="True"/>
<Label Content="State" Grid.Row="0" Grid.Column="3" />
<ComboBox Grid.Row="0" Grid.Column="4" SelectedValue="{Binding State}" DisplayMemberPath="Value" SelectedValuePath="Key" IsEnabled="False"
ItemsSource="{Binding DataContext.PsList[GetBOMStateList], ElementName=MainWindow}" />
<ComboBox Grid.Row="0" Grid.Column="4" SelectedValue="{Binding State}" DisplayMemberPath="Value" SelectedValuePath="Key" IsEnabled="False" ItemsSource="{Binding DataContext.PsList[GetBOMStateList], ElementName=MainWindow}" />
<Label Content="Last Modified Date" Grid.Column="3" Grid.Row="1" />
<TextBox Text="{Binding ModifiedDate}" Grid.Column="4" Grid.Row="1" IsEnabled="False" />
<TextBox Text="{Binding ModifiedDate}" Grid.Column="4" Grid.Row="1" IsReadOnly="True" />
</Grid>
</GroupBox>

<DataGrid Grid.Row="1" ItemsSource="{Binding BomRows}"
AutoGenerateColumns="False" ScrollViewer.CanContentScroll="False"
HorizontalGridLinesBrush="WhiteSmoke" VerticalGridLinesBrush="WhiteSmoke" Background="White" Margin="6"
Focusable="False" SelectionMode="Single" IsReadOnly="True">
<DataGrid Grid.Row="1" ItemsSource="{Binding BomRows}" AutoGenerateColumns="False" ScrollViewer.CanContentScroll="False" HorizontalGridLinesBrush="WhiteSmoke" VerticalGridLinesBrush="WhiteSmoke" Background="White" Margin="6" Focusable="False" SelectionMode="Single" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Position}" Header="Position" Width="60" IsReadOnly="True" SortDirection="Ascending" >
<DataGridTextColumn Binding="{Binding Position}" Header="Position" Width="60" IsReadOnly="True" SortDirection="Ascending">
<DataGridTextColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Right" />
Expand All @@ -164,7 +160,7 @@
<DataGridTextColumn Binding="{Binding Type}" Header="Type" Width="60" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding ChildNumber}" Header="Number" Width="120" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Description}" Header="Description" Width="*" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Quantity}" Header="Quantity" Width="60" IsReadOnly="True" >
<DataGridTextColumn Binding="{Binding Quantity}" Header="Quantity" Width="60" IsReadOnly="True">
<DataGridTextColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Right" />
Expand Down
Loading

0 comments on commit 974436c

Please sign in to comment.