-
Notifications
You must be signed in to change notification settings - Fork 0
/
Page5.xaml
81 lines (75 loc) · 4.62 KB
/
Page5.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
70
71
72
73
74
75
76
77
78
79
80
81
<Page x:Class="Question2.Page5"
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="Page5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<Frame Grid.Row="0" Name="SubPageFrame"/>
<HeaderedContentControl Grid.Row="1" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Center" FontSize="20" Foreground="DarkRed" Content="Manage Booking Reservation"/>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<DataGrid Name="Reservation" CanUserAddRows="False" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" AllowDrop="False" PreviewMouseLeftButtonUp="Rooms_OnPreviewMouseLeftButtonUp" >
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding BookingReservationId}" Width="*"/>
<DataGridTextColumn Header="Booking Date" Binding="{Binding BookingDate}" Width="2*"/>
<DataGridTextColumn Header="Total Price" Binding="{Binding TotalPrice}" Width="2*"/>
<DataGridTextColumn Header="Customer" Binding="{Binding Customer.CustomerFullName}" Width="3*"/>
<DataGridCheckBoxColumn Header="Booking Status" Width="1.5*" Binding="{Binding BookingStatus}"></DataGridCheckBoxColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Column="1">
<Grid Grid.Row="1">
<TextBlock Margin="5,0,5,0">Reservation ID</TextBlock>
<TextBox Margin="5,15,5,5" Name="txtId" IsReadOnly="True" Text="{Binding ElementName=Reservation, Path=SelectedItem.BookingReservationId, Mode=OneWay}" />
</Grid>
<Grid Grid.Row="2">
<TextBlock Margin="5,0,5,0">Booking Date</TextBlock>
<DatePicker Margin="5,15,5,5" Name="dpBooking" IsEnabled="False" Text="{Binding ElementName=Reservation, Path=SelectedItem.BookingDate, Mode=OneWay}" />
</Grid>
<Grid Grid.Row="1">
<TextBlock Margin="5,0,5,0">Total Price</TextBlock>
<TextBox Margin="5,15,5,5" Name="txtPrice" IsReadOnly="True" Text="{Binding ElementName=Reservation, Path=SelectedItem.TotalPrice, Mode=OneWay}" />
</Grid>
<Grid Grid.Row="1">
<TextBlock Margin="5,0,5,0">Customer</TextBlock>
<ComboBox Margin="5,15,5,5" Name="cbCustomer"></ComboBox>
</Grid>
<Grid Grid.Row="6">
<TextBlock Margin="5,0,5,0">Booking Status</TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="5,20,0,5">
<RadioButton Content="Active" Margin="0,0,30,0" Name="active"></RadioButton>
<RadioButton Content="Deactive" Name="deactive"></RadioButton>
</StackPanel>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Margin="5" Grid.Column="0" Height="30" Click="ButtonBase_OnClick">Refresh</Button>
<Button Margin="5" Grid.Column="1" Height="30" Click="ButtonBase_OnClickAdd">Add/Update</Button>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Margin="5" Grid.Column="0" Height="30" Click="Edit">Edit</Button>
<Button Margin="5" Grid.Column="1" Height="30" Click="ButtonBase_OnClickDelete">Delete</Button>
</Grid>
</StackPanel>
</Grid>
</Grid>
</Page>