110 lines
4.2 KiB
XML
110 lines
4.2 KiB
XML
<Window x:Class="XLAB2.CreateDocumentWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="Новый документ"
|
|
Height="360"
|
|
Width="520"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner">
|
|
<Grid Margin="16">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="170" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="0,0,12,8"
|
|
VerticalAlignment="Center"
|
|
Text="Тип документа" />
|
|
<ComboBox Grid.Row="0"
|
|
Grid.Column="1"
|
|
Margin="0,0,0,8"
|
|
DisplayMemberPath="Title"
|
|
ItemsSource="{Binding DocumentTypes}"
|
|
SelectedItem="{Binding SelectedDocumentType, Mode=TwoWay}" />
|
|
|
|
<TextBlock Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="0,0,12,8"
|
|
VerticalAlignment="Center"
|
|
Text="Книга учета" />
|
|
<ComboBox Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="0,0,0,8"
|
|
DisplayMemberPath="Title"
|
|
ItemsSource="{Binding AccountingBooks}"
|
|
SelectedItem="{Binding SelectedAccountingBook, Mode=TwoWay}" />
|
|
|
|
<TextBlock Grid.Row="2"
|
|
Grid.Column="0"
|
|
Margin="0,0,12,8"
|
|
VerticalAlignment="Center"
|
|
Text="Номер документа" />
|
|
<TextBox Grid.Row="2"
|
|
Grid.Column="1"
|
|
MinWidth="180"
|
|
Margin="0,0,0,8"
|
|
Text="{Binding DocumentSequenceNumber, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<TextBlock Grid.Row="3"
|
|
Grid.Column="0"
|
|
Margin="0,0,12,8"
|
|
VerticalAlignment="Center"
|
|
Text="Итоговый номер" />
|
|
<TextBox Grid.Row="3"
|
|
Grid.Column="1"
|
|
Margin="0,0,0,8"
|
|
IsReadOnly="True"
|
|
Text="{Binding DocumentNumber, Mode=OneWay}" />
|
|
|
|
<TextBlock Grid.Row="4"
|
|
Grid.Column="0"
|
|
Margin="0,0,12,8"
|
|
VerticalAlignment="Center"
|
|
Text="Дата приемки" />
|
|
<DatePicker Grid.Row="4"
|
|
Grid.Column="1"
|
|
Margin="0,0,0,8"
|
|
SelectedDate="{Binding AcceptedOn, Mode=TwoWay}"
|
|
SelectedDateFormat="Short" />
|
|
|
|
<TextBlock Grid.Row="5"
|
|
Grid.ColumnSpan="2"
|
|
Margin="0,8,0,4"
|
|
Foreground="DimGray"
|
|
TextWrapping="Wrap"
|
|
Text="Документ без строк EKZMK не хранится в базе. Команда «Создать» создаёт только черновик текущего сеанса." />
|
|
|
|
<TextBlock Grid.Row="6"
|
|
Grid.ColumnSpan="2"
|
|
Foreground="Firebrick"
|
|
Text="{Binding ValidationMessage}" />
|
|
|
|
<StackPanel Grid.Row="7"
|
|
Grid.ColumnSpan="2"
|
|
Orientation="Horizontal"
|
|
HorizontalAlignment="Right">
|
|
<Button Width="90"
|
|
Margin="0,12,8,0"
|
|
IsDefault="True"
|
|
Command="{Binding ConfirmCommand}"
|
|
Content="Создать" />
|
|
<Button Width="90"
|
|
Margin="0,12,0,0"
|
|
Command="{Binding CancelCommand}"
|
|
Content="Отмена" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|