-
Notifications
You must be signed in to change notification settings - Fork 0
/
Page6.xaml
69 lines (63 loc) · 3.64 KB
/
Page6.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<Page x:Class="Question2.Page6"
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"
xmlns:local="clr-namespace:Question2"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
Title="Page6">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<HeaderedContentControl Grid.Row="0" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="20" Foreground="DarkRed" Name="ContentControl"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<DataGrid Name="BookingDetails" CanUserAddRows="False" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" AllowDrop="False" PreviewMouseLeftButtonUp="Rooms_OnPreviewMouseLeftButtonUp" >
<DataGrid.Columns>
<DataGridTextColumn Header="Room Number" Binding="{Binding Room.RoomNumber}" Width="2*"/>
<DataGridTextColumn Header="Start Date" Binding="{Binding StartDate}" Width="3*"/>
<DataGridTextColumn Header="End Date" Binding="{Binding EndDate}" Width="3*"/>
<DataGridTextColumn Header="Actual Price" Binding="{Binding ActualPrice}" Width="3*"/>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Column="1">
<Grid Grid.Row="1">
<TextBlock Margin="5,0,5,0">Room Number</TextBlock>
<ComboBox Margin="5,15,5,5" Name="txtId" />
</Grid>
<Grid Grid.Row="2">
<TextBlock Margin="5,0,5,0">Start Date</TextBlock>
<DatePicker Margin="5,15,5,5" Name="dpStart" Text="{Binding ElementName=BookingDetails, Path=SelectedItem.StartDate, Mode=OneWay}" />
</Grid>
<Grid Grid.Row="2">
<TextBlock Margin="5,0,5,0">End Date</TextBlock>
<DatePicker Margin="5,15,5,5" Name="dpEnd" Text="{Binding ElementName=BookingDetails, Path=SelectedItem.EndDate, Mode=OneWay}" />
</Grid>
<Grid Grid.Row="1">
<TextBlock Margin="5,0,5,0">Actual Price</TextBlock>
<TextBox Margin="5,15,5,5" Name="txtPrice" IsReadOnly="True" Text="{Binding ElementName=BookingDetails, Path=SelectedItem.ActualPrice, Mode=OneWay}" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Margin="5" Grid.Column="0" Height="30" Click="ButtonBase_OnClick">Refresh</Button>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Margin="5" Grid.Column="0" Height="30" Click="ButtonBase_OnClickAdd">Add</Button>
<Button Margin="5" Grid.Column="1" Height="30" Click="Delete">Delete</Button>
</Grid>
</StackPanel>
</Grid>
</Grid>
</Page>