|
@@ -7,84 +7,205 @@
|
|
|
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
|
|
|
xmlns:WPF="clr-namespace:InABox.WPF;assembly=InABox.Wpf"
|
|
|
mc:Ignorable="d"
|
|
|
- Title="Relocate Items" Height="300" Width="600"
|
|
|
+ Title="Relocate Items" Height="500" Width="750"
|
|
|
+ WindowStartupLocation="CenterOwner"
|
|
|
x:Name="Window">
|
|
|
<Window.Resources>
|
|
|
<WPF:BooleanToVisibilityConverter x:Key="boolToVisibilityConverter" TrueValue="Visible" FalseValue="Collapsed"/>
|
|
|
</Window.Resources>
|
|
|
- <Grid DataContext="{Binding ElementName=Window}">
|
|
|
+ <Grid DataContext="{Binding ElementName=Window}" Margin="5">
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
<RowDefinition Height="*"/>
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <DockPanel Grid.Row="0" LastChildFill="False" Height="35">
|
|
|
- <Border DockPanel.Dock="Left" Margin="5,0,0,0">
|
|
|
- <TextBlock VerticalAlignment="Center" Text="Location: " FontWeight="Bold"/>
|
|
|
- </Border>
|
|
|
- <TextBox IsEnabled="False" Text="{Binding From.Location.Code}" Width="100"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- DockPanel.Dock="Left" Margin="5" VerticalContentAlignment="Center"/>
|
|
|
- <TextBox IsEnabled="False" Text="{Binding To.Description}" Width="150"
|
|
|
- Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- DockPanel.Dock="Right" Margin="5" VerticalContentAlignment="Center"/>
|
|
|
- <Button x:Name="ToButton" Click="ToButton_Click"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
- Content="..." VerticalContentAlignment="Center"
|
|
|
- Padding="5,0"
|
|
|
- Margin="5,5,0,5" DockPanel.Dock="Right"/>
|
|
|
- <TextBox x:Name="ToBox" Text="{Binding To.Code}" Width="100"
|
|
|
- VerticalAlignment="Stretch"
|
|
|
- Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
- Background="LightYellow"
|
|
|
- LostFocus="ToBox_LostFocus"
|
|
|
- DockPanel.Dock="Right" Margin="5,5,0,5"
|
|
|
- VerticalContentAlignment="Center"/>
|
|
|
- <Border DockPanel.Dock="Right">
|
|
|
- <TextBlock VerticalAlignment="Center" FontWeight="Bold" Text="To:"
|
|
|
- Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"/>
|
|
|
- </Border>
|
|
|
+
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <DockPanel
|
|
|
+ Grid.Row="0"
|
|
|
+ Margin="5">
|
|
|
+
|
|
|
+ <Label
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Content="From:"
|
|
|
+ FontWeight="Bold"/>
|
|
|
+
|
|
|
+ <TextBox
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ Width="100"
|
|
|
+ IsEnabled="False"
|
|
|
+ Text="{Binding From.Location.Code}"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"/>
|
|
|
+
|
|
|
+ <Label
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontWeight="Bold"
|
|
|
+ Content="To:"
|
|
|
+ Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"/>
|
|
|
+
|
|
|
+ <TextBox
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ Width="100"
|
|
|
+ x:Name="ToBox"
|
|
|
+ Text="{Binding To.Code}"
|
|
|
+ Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
+ Background="LightYellow"
|
|
|
+ LostFocus="ToBox_LostFocus"
|
|
|
+ KeyUp="ToBox_OnKeyUp"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ BorderThickness="0.75,0.75,0,0.75"/>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Width="35"
|
|
|
+ x:Name="ToButton"
|
|
|
+ Click="ToButton_Click"
|
|
|
+ Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
+ Content="..." VerticalContentAlignment="Center"
|
|
|
+ BorderBrush="Silver"/>
|
|
|
+
|
|
|
+ <TextBox
|
|
|
+ DockPanel.Dock="Left"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ IsEnabled="False"
|
|
|
+ Text="{Binding To.Description}"
|
|
|
+ Visibility="{Binding IsTargetEditable,Converter={StaticResource boolToVisibilityConverter}}"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Background="WhiteSmoke"/>
|
|
|
+
|
|
|
</DockPanel>
|
|
|
- <Border Grid.Row="1"
|
|
|
- Margin="2" BorderBrush="LightGray" BorderThickness="1" Padding="2">
|
|
|
+
|
|
|
+ <Border
|
|
|
+ Grid.Row="1"
|
|
|
+ Margin="5,0,5,5"
|
|
|
+ BorderBrush="Silver"
|
|
|
+ BorderThickness="0.75" >
|
|
|
+
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
|
|
|
+
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto"/>
|
|
|
- <RowDefinition Height="Auto"/>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="40"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <ItemsControl ItemsSource="{Binding Items}"
|
|
|
- Grid.Row="0">
|
|
|
+
|
|
|
+ <Grid Grid.Row="0" Background="Silver">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="60"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="60"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Label Grid.Column="0" Content="#" HorizontalContentAlignment="Center" FontWeight="Bold" VerticalContentAlignment="Center" />
|
|
|
+ <Label Grid.Column="1" Content="Description" HorizontalContentAlignment="Center" FontWeight="Bold" VerticalContentAlignment="Center" />
|
|
|
+ <Label Grid.Column="2" Content="Total" HorizontalContentAlignment="Center" FontWeight="Bold" VerticalContentAlignment="Center" />
|
|
|
+ <Label Grid.Column="5" Content="Quantity" HorizontalContentAlignment="Center" FontWeight="Bold" VerticalContentAlignment="Center" />
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <ItemsControl
|
|
|
+ ItemsSource="{Binding Items}"
|
|
|
+ Grid.Row="1">
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
<DataTemplate DataType="local:StockHoldingRelocationItem">
|
|
|
- <Border BorderBrush="LightGray" BorderThickness="0,0,0,1" Padding="2">
|
|
|
+
|
|
|
+ <Border
|
|
|
+ BorderBrush="LightGray"
|
|
|
+ BorderThickness="0,0,0,0.75"
|
|
|
+ Padding="5">
|
|
|
+
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
- <ColumnDefinition Width="40"/>
|
|
|
- <ColumnDefinition Width="20"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
- <ColumnDefinition Width="20"/>
|
|
|
- <ColumnDefinition Width="40"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" VerticalAlignment="Center">
|
|
|
- <Run Text="{Binding ItemNumber}" FontWeight="Bold"/>
|
|
|
- <Run Text="{Binding Text}"/>
|
|
|
- </TextBlock>
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding Quantity}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
- <Button Grid.Column="2" Content="None" Tag="{Binding}" Click="None_Click"
|
|
|
- Margin="2,0"/>
|
|
|
- <Button Grid.Column="3" Content="-" Tag="{Binding}" Click="Minus_Click"
|
|
|
- Margin="2,0"/>
|
|
|
- <syncfusion:DoubleTextBox Grid.Column="4" Value="{Binding Issued}" MinValue="0" MaxValue="{Binding Quantity}"
|
|
|
- HorizontalContentAlignment="Center"/>
|
|
|
- <Button Grid.Column="5" Content="+" Tag="{Binding}" Click="Plus_Click"
|
|
|
- Margin="2,0,0,0"/>
|
|
|
- <Button Grid.Column="6" Content="All" Tag="{Binding}" Click="All_Click"
|
|
|
- Margin="2,0"/>
|
|
|
+
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="30" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Label
|
|
|
+ Grid.Column="0"
|
|
|
+ Content="{Binding ItemNumber}"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="{Binding Text}"
|
|
|
+ TextWrapping="NoWrap"
|
|
|
+ TextTrimming="CharacterEllipsis"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Grid.Column="2"
|
|
|
+ Value="{Binding Quantity}"
|
|
|
+ IsReadOnly="True"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ Background="WhiteSmoke"/>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Grid.Column="3"
|
|
|
+ Content="None"
|
|
|
+ Tag="{Binding}"
|
|
|
+ Click="None_Click"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Grid.Column="4"
|
|
|
+ Content="-"
|
|
|
+ Tag="{Binding}"
|
|
|
+ Click="Minus_Click"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Grid.Column="5"
|
|
|
+ Value="{Binding Issued}"
|
|
|
+ MinValue="0"
|
|
|
+ MaxValue="{Binding Quantity}"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="5,0,0,0"
|
|
|
+ Background="LightYellow"/>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Grid.Column="6"
|
|
|
+ Content="+"
|
|
|
+ Tag="{Binding}"
|
|
|
+ Click="Plus_Click"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
+ <Button
|
|
|
+ Grid.Column="7"
|
|
|
+ Content="All"
|
|
|
+ Tag="{Binding}"
|
|
|
+ Click="All_Click"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
</DataTemplate>
|
|
@@ -95,20 +216,50 @@
|
|
|
</ItemsPanelTemplate>
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
</ItemsControl>
|
|
|
- <Border Padding="2" Grid.Row="1">
|
|
|
+
|
|
|
+ <Border Grid.Row="2" BorderBrush="Silver" BorderThickness="0,0.75,0,0" Background="WhiteSmoke">
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
- <ColumnDefinition Width="40"/>
|
|
|
- <ColumnDefinition Width="100"/>
|
|
|
- <ColumnDefinition Width="40"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="60"/>
|
|
|
+ <ColumnDefinition Width="30"/>
|
|
|
+ <ColumnDefinition Width="50"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" Text="Total to Transfer/Issue" FontWeight="Bold" VerticalAlignment="Center"/>
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding TotalQuantity}" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
- <TextBlock Grid.Column="3" Text="{Binding TotalIssued}" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
+ Grid.Column="0"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ Text="Total to Transfer/Issue"
|
|
|
+ FontWeight="Bold"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Margin="5,0,0,0"/>
|
|
|
+
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Grid.Column="2"
|
|
|
+ Value="{Binding TotalQuantity}"
|
|
|
+ IsReadOnly="True"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="0,5,5,5"
|
|
|
+ Background="WhiteSmoke"/>
|
|
|
+
|
|
|
+ <syncfusion:DoubleTextBox
|
|
|
+ Grid.Column="5"
|
|
|
+ Value="{Binding TotalIssued}"
|
|
|
+ IsReadOnly="True"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Margin="0,5,5,5"
|
|
|
+ Background="LightGreen"/>
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
+
|
|
|
</Grid>
|
|
|
</ScrollViewer>
|
|
|
</Border>
|