156 lines
6.9 KiB
XML
156 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="AdventureWorks.MAUI.Views.UserDetailView"
|
|
xmlns:partial="clr-namespace:AdventureWorks.MAUI.ViewsPartial"
|
|
xmlns:converters="clr-namespace:AdventureWorks.MAUI.Converters"
|
|
xmlns:vm="clr-namespace:AdventureWorks.ViewModelLayer;assembly=AdventureWorks.ViewModelLayer"
|
|
x:DataType="vm:UserViewModel"
|
|
Title="User Information">
|
|
|
|
<ContentPage.Resources>
|
|
<converters:InvertedBoolConverter x:Key="invertedBoolean" />
|
|
<!--<vm:User x:Key="viewModel"
|
|
LoginId="JohnSmith123"
|
|
FirstName="John222"
|
|
LastName="Smith"
|
|
Email="john@smith.com"
|
|
Phone="615.222.2333"
|
|
PhoneType="Mobile"
|
|
IsFullTime="True"
|
|
IsEnrolledIn401k="True"
|
|
IsEnrolledInFlexTime="False"
|
|
IsEnrolledInHealthCare="True"
|
|
IsEnrolledInHSA="False"
|
|
IsActive="True"
|
|
BirthDate="10-03-1975"
|
|
/>-->
|
|
</ContentPage.Resources>
|
|
|
|
<Border Style="{StaticResource Border.Page}" >
|
|
<ScrollView>
|
|
<Grid RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto,Auto, Auto, Auto , Auto"
|
|
ColumnDefinitions="Auto, *"
|
|
Style="{StaticResource Grid.Page}">
|
|
|
|
|
|
<partial:HeaderView Grid.Row="0"
|
|
Grid.ColumnSpan="2"
|
|
ViewTitle="User Information"
|
|
ViewDescription="Use this Screen to Modify User Information." />
|
|
|
|
<Label Grid.Row="1"
|
|
Text="Login ID" />
|
|
|
|
<VerticalStackLayout Grid.Row="1"
|
|
Grid.Column="1">
|
|
<Entry Text="{Binding UserObject.LoginId}"
|
|
Placeholder="Please use a combination of letters and numbers."/>
|
|
<Label FontSize="Micro"
|
|
Text="Please use a combination of letters and numbers." />
|
|
</VerticalStackLayout>
|
|
<Label Grid.Row="2"
|
|
Text="First Name" />
|
|
<Entry Grid.Row="2"
|
|
Grid.Column="1"
|
|
Text="{Binding UserObject.FirstName}"/>
|
|
<Label Grid.Row="3"
|
|
Text="Last Name" />
|
|
<Entry Grid.Row="3"
|
|
Grid.Column="1"
|
|
Text="{Binding UserObject.LastName}"/>
|
|
<Label Grid.Row="4"
|
|
Text="Email Address" />
|
|
<Entry Grid.Row="4"
|
|
Grid.Column="1"
|
|
Text="{Binding UserObject.Email}"/>
|
|
<Label Grid.Row="5" Text="Is Enrolled ?"/>
|
|
|
|
<FlexLayout Grid.Row="5"
|
|
Grid.Column="1"
|
|
Wrap="Wrap"
|
|
Direction="Row">
|
|
<HorizontalStackLayout>
|
|
<Label Text="401k?"/>
|
|
<CheckBox IsChecked="{Binding UserObject.IsEnrolledIn401k}"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout >
|
|
<Label Text="Flex Time?"/>
|
|
<CheckBox x:Name="FlexTime" IsChecked="{Binding UserObject.IsEnrolledInFlexTime}"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout >
|
|
<Label Text="Health Care?"/>
|
|
<CheckBox IsChecked="{Binding UserObject.IsEnrolledInHealthCare}"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout >
|
|
<Label Text="Health Savings Account?"/>
|
|
<CheckBox IsChecked="{Binding UserObject.IsEnrolledInHSA}"/>
|
|
</HorizontalStackLayout>
|
|
</FlexLayout>
|
|
|
|
<Label Grid.Row="6"
|
|
Text="Still Employed"/>
|
|
<Switch Grid.Row="6"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding UserObject.IsActive}"/>
|
|
<Label Text="Employee Type"
|
|
Grid.Row="7"/>
|
|
<FlexLayout Grid.Row="7"
|
|
Grid.Column="1"
|
|
Wrap="Wrap"
|
|
Direction="Row">
|
|
<HorizontalStackLayout>
|
|
<Label Text="Full-Time"/>
|
|
<RadioButton x:Name="FullTime"
|
|
IsChecked="{Binding UserObject.IsFullTime}"
|
|
GroupName="EmployeeType"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="Part-Time"/>
|
|
<RadioButton GroupName="EmployeeType" IsChecked="{Binding UserObject.IsFullTime, Converter={StaticResource invertedBoolean}}"/>
|
|
</HorizontalStackLayout>
|
|
</FlexLayout>
|
|
|
|
<Label Text="Birth Date"
|
|
Grid.Row="8"/>
|
|
<DatePicker Grid.Row="8"
|
|
Grid.Column="1"
|
|
Date="{Binding UserObject.BirthDate}"
|
|
HorizontalOptions="Start"/>
|
|
<Label Text="Start Time"
|
|
Grid.Row="9"/>
|
|
<TimePicker Grid.Row="9"
|
|
Grid.Column="1"
|
|
Time="{Binding UserObject.StartTime}"
|
|
IsEnabled="{Binding UserObject.IsFullTime, Converter={StaticResource invertedBoolean}}"/>
|
|
|
|
<Label Text="Phone"
|
|
Grid.Row="10"/>
|
|
<FlexLayout Grid.Row="10"
|
|
Grid.Column="1"
|
|
Wrap="Wrap"
|
|
Direction="Row">
|
|
<HorizontalStackLayout>
|
|
<Entry MinimumWidthRequest="120"
|
|
Text="{Binding UserObject.Phone}"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Picker ItemsSource="{Binding PhoneTypesList}"
|
|
SelectedItem="{Binding UserObject.PhoneType}"/>
|
|
</HorizontalStackLayout>
|
|
</FlexLayout>
|
|
|
|
<partial:AddressView Grid.Row="11"
|
|
Grid.ColumnSpan="2" />
|
|
|
|
<HorizontalStackLayout Grid.Row="12"
|
|
Grid.Column="1"
|
|
Spacing="5">
|
|
<Button Text="Save" Clicked="SaveButton_Clicked"/>
|
|
<Button Text="Cancel" />
|
|
</HorizontalStackLayout>
|
|
</Grid>
|
|
</ScrollView>
|
|
</Border>
|
|
|
|
</ContentPage> |