Last active
August 29, 2015 14:04
-
-
Save gothedistance/f6bd50469ed1302b5fd9 to your computer and use it in GitHub Desktop.
納品書ユーザーコントロール
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="Sample.Invoice" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
mc:Ignorable="d" | |
d:DesignHeight="1100" d:DesignWidth="800"> | |
<Grid Background="White" Margin="20" DataContext="{StaticResource VMContainer}"> | |
<Grid.RowDefinitions> | |
<!-- Title--> | |
<RowDefinition Height="Auto" /> | |
<!-- 納品先と自社--> | |
<RowDefinition Height="Auto" /> | |
<!-- 明細ヘッダ--> | |
<RowDefinition Height="Auto" /> | |
<!-- 明細--> | |
<RowDefinition Height="*" /> | |
<!-- 合計とステータス--> | |
<RowDefinition Height="Auto" /> | |
<!-- 摘要--> | |
<RowDefinition Height="*" /> | |
<!-- ページ数--> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<StackPanel Grid.Row="0"> | |
<TextBlock Text="{Binding Invoice.Title}" TextAlignment="Right" FontSize="20" TextDecorations="UnderLine"/> | |
</StackPanel> | |
<Grid Grid.Row="1"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition></ColumnDefinition> | |
<ColumnDefinition></ColumnDefinition> | |
</Grid.ColumnDefinitions> | |
<Border Margin="70,5,0,10" BorderThickness="1" BorderBrush="Black" Height="170" Grid.Column="0" CornerRadius="2"> | |
<StackPanel Margin="5"> | |
<TextBlock Text="{Binding Path=Invoice.Zipcode}" Margin="0,0,0,5"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Address}" Margin="0,0,0,5"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Address2}" Margin="0,0,0,5"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Name}" Margin="0,0,0,5" TextWrapping="WrapWithOverflow"></TextBlock> | |
<StackPanel Orientation="Horizontal" Margin="0,0,0,5"> | |
<TextBlock Text="TEL:"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Tel}"></TextBlock> | |
<TextBlock Text="FAX:" Margin="10,0,0,0"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Fax}"></TextBlock> | |
</StackPanel> | |
<StackPanel Orientation="Horizontal" Margin="0,0,20,0" HorizontalAlignment="Right"> | |
<TextBlock Text="CD:"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.Code}" TextAlignment="Right"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.SeikyuCode}" TextAlignment="Right"></TextBlock> | |
</StackPanel> | |
</StackPanel> | |
</Border> | |
<StackPanel Grid.Column="1" Margin="50,5,0,10" HorizontalAlignment="Left"> | |
<StackPanel Orientation="Horizontal" Margin="0,0,0,10"> | |
<Border BorderThickness="1,1,0,1" BorderBrush="Black"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="伝票番号" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="Black"> | |
<TextBlock Text="{Binding Path=Invoice.InvoiceNo}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="Black"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="伝票日付" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="Black"> | |
<TextBlock Text="{Binding Path=Invoice.BillDate}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
</StackPanel> | |
<StackPanel Orientation="Horizontal" Margin="0,0,0,10"> | |
<Border BorderThickness="1,1,0,1" BorderBrush="Black"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="締日" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="Black"> | |
<TextBlock Text="{Binding Path=Invoice.DueDate}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="Black"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="販売区分" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="Black"> | |
<TextBlock Text="{Binding Path=Invoice.SaleType}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="Black"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="担当者" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="Black"> | |
<TextBlock Text="{Binding Path=Invoice.Tanto}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
</StackPanel> | |
<TextBlock Text="{Binding Path=Invoice.OurName}"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.OurZipcode}"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.OurAddress}" TextWrapping="WrapWithOverflow"></TextBlock> | |
<StackPanel Orientation="Horizontal" Margin="0,0,0,5"> | |
<TextBlock Text="TEL:"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.OurTel}"></TextBlock> | |
<TextBlock Text="FAX:" Margin="10,0,0,0"></TextBlock> | |
<TextBlock Text="{Binding Path=Invoice.OurFax}"></TextBlock> | |
</StackPanel> | |
</StackPanel> | |
</Grid> | |
<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5,0,5,0"> | |
<Label Content="品番" BorderThickness="1,1,1,1" Background="LightGray" Width="162" HorizontalContentAlignment="Center" BorderBrush="Gray"/> | |
<Label Content="メーカー" BorderThickness="0,1,1,1" Background="LightGray" Width="51" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="品名" BorderThickness="0,1,1,1" Background="LightGray" Width="251" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="色柄" BorderThickness="0,1,1,1" Background="LightGray" Width="51" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="数量" BorderThickness="0,1,1,1" Background="LightGray" Width="41" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="上代" BorderThickness="0,1,1,1" Background="LightGray" Width="51" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="単価" BorderThickness="0,1,1,1" Background="LightGray" Width="46" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
<Label Content="小計" BorderThickness="0,1,1,1" Background="LightGray" Width="61" HorizontalContentAlignment="Center" BorderBrush="Gray"></Label> | |
</StackPanel> | |
<ItemsControl ItemsSource="{Binding Invoice.Orderlist}" Grid.Row="3" Margin="5,0,5,0"> | |
<ItemsControl.ItemTemplate> | |
<DataTemplate> | |
<StackPanel Orientation="Horizontal" Margin="0"> | |
<Border BorderBrush="Gray" BorderThickness="1,0,1,1"> | |
<StackPanel Width="160"> | |
<TextBlock Text="{Binding Itemcode}"/> | |
<TextBlock Text="{Binding Jancode}"/> | |
</StackPanel> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Maker}" Width="50" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Name}" Width="250" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Color}" Width="50" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Ordernum}" Width="40" TextAlignment="Right" VerticalAlignment="Center"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Price}" Width="50" TextAlignment="Right" VerticalAlignment="Center"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Gedai}" Width="45" TextAlignment="Right" VerticalAlignment="Center"/> | |
</Border> | |
<Border BorderBrush="Gray" BorderThickness="0,0,1,1"> | |
<TextBlock Text="{Binding Subtotal}" Width="60" TextAlignment="Right" VerticalAlignment="Center"/> | |
</Border> | |
</StackPanel> | |
</DataTemplate> | |
</ItemsControl.ItemTemplate> | |
</ItemsControl> | |
<StackPanel Orientation="Horizontal" Margin="0,50,5,10" Grid.Row="4" HorizontalAlignment="Right"> | |
<Border BorderThickness="1,1,0,1" BorderBrush="#604848"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="合計数量" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="#604848"> | |
<TextBlock Text="{Binding Path=Invoice.Ordersum}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="#604848"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="上代合計" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="#604848"> | |
<TextBlock Text="{Binding Path=Invoice.Total}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="#604848"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="下代合計" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="#604848"> | |
<TextBlock Text="{Binding Path=Invoice.Subtotal}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
<Border BorderThickness="0,1,0,1" BorderBrush="#604848"> | |
<Label Background="LightGray" Padding="7" HorizontalAlignment="Center" VerticalAlignment="Center" Content="消費税" /> | |
</Border> | |
<Border BorderThickness="1" BorderBrush="#604848"> | |
<TextBlock Text="{Binding Path=Invoice.Tax}" VerticalAlignment="Center" Padding="5,0,5,0"></TextBlock> | |
</Border> | |
</StackPanel> | |
<StackPanel Grid.Row="5" Margin="0,20,0,0"> | |
<StackPanel Orientation="Horizontal"> | |
<TextBlock Text="摘要:" Margin="0,0,10,0"/> | |
<TextBlock Text="{Binding Invoice.Bikou}"/> | |
</StackPanel> | |
<Rectangle Height="1" Stroke="Black" VerticalAlignment="Bottom" /> | |
</StackPanel> | |
<StackPanel Grid.Row="6" Orientation="Horizontal" Margin="0,15,0,0" HorizontalAlignment="Center"> | |
<TextBlock Text="- "/> | |
<TextBlock Text="{Binding Invoice.CurrentPage}"/> | |
<TextBlock Text=" -"/> | |
</StackPanel> | |
</Grid> | |
</UserControl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment