99
Приложение 8
Вид добавления записей в таблицу «Арендованные
автомобили»(RentedAdd.xaml)
<Window x:Class="АИС_Учёт_2.RentedAdd"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:АИС_Учёт_2"
mc:Ignorable="d"
Title="Добавитьзапись" Loaded="Window_Loaded" Height="323.606" Width="320.181">
<Window.Resources>
<local:DBDataSet x:Key="dBDataSet"/>
<CollectionViewSource x:Key="клиентыViewSource" Source="{BindingКлиенты,
Source={StaticResource dBDataSet}}"/>
<local:DBDataSet1 x:Key="dBDataSet1"/>
<CollectionViewSource x:Key="автомобилиViewSource" Source="{BindingАвтомобили,
Source={StaticResource dBDataSet1}}"/>
<CollectionViewSource x:Key="условия_арендыViewSource" Source="{BindingУсловия_аренды,
Source={StaticResource dBDataSet1}}"/>
</Window.Resources>
<Grid DataContext="{StaticResourceклиентыViewSource}">
<GroupBox Header="Добавлениезаписи" HorizontalAlignment="Left" Height="283"
Margin="10,0,0,0" VerticalAlignment="Top" Width="292">
</GroupBox>
<Label Content="Клиент:" HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="193,23,0,0" Height="23"/>
<Label Content="Автомобиль:" HorizontalAlignment="Left" Margin="181,73,0,0"
VerticalAlignment="Top"/>
<Label Content="Договораренды:" HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="168,123,0,0"/>
<Label Content="Сумма:" HorizontalAlignment="Left" VerticalAlignment="Top"
Margin="130,181,0,0"/>
<ComboBox x:Name="Clients" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120"
Margin="160,46,0,0" Height="22" ItemsSource="{Binding}" SelectedValuePath="ID клиента">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="Фамилия"/>
<Binding Path="Имя"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ComboBox x:Name="Car" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120"
Margin="160,96,0,0" ItemsSource="{Binding Source={StaticResourceавтомобилиViewSource}}"
SelectedValuePath="ID автомобиля">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1} {2}">
<Binding Path="Марка"/>
<Binding Path="Модель"/>
<Binding Path="Стоимость 1 суток"/>
</MultiBinding>