<localView:BeWoView x:Class="BeWo.View.Detail.MandatorView"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:localView="clr-namespace:BeWo.View"
                    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
                    Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch" Focusable="True">
	<Grid x:Name="root">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
			<ColumnDefinition Width="*" MaxWidth="420" />
		</Grid.ColumnDefinitions>
		<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Name</Label>
		<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Text="{Binding Path=Name, UpdateSourceTrigger=PropertyChanged}" />
		<GroupBox Margin="3 20 3 3" Grid.Row="1" Grid.ColumnSpan="2" Header="Adresse" Style="{StaticResource ObjectEditGroupBox}">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
					<ColumnDefinition Width="150" />
				</Grid.ColumnDefinitions>

				<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
				<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
				<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>

				<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Text="{Binding Path=Street, UpdateSourceTrigger=PropertyChanged}" />
				<TextBox Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Text="{Binding Path=PostalCode, UpdateSourceTrigger=PropertyChanged}" />
				<TextBox Grid.Column="1" Grid.Row="2" Margin="3" Height="23" Text="{Binding Path=Town, UpdateSourceTrigger=PropertyChanged}" />

			</Grid>
		</GroupBox>

		<GroupBox Margin="3 20 3 3" Grid.Row="2" Grid.ColumnSpan="2" Header="Einstellungen" Style="{StaticResource ObjectEditGroupBox}">
			<Grid x:Name="EinstellungenGrid">
				<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="430" />
					<ColumnDefinition Width="50" />
				</Grid.ColumnDefinitions>

				<TextBlock Foreground="Black" Grid.Column="0" Grid.Row="1" Margin="3,5,3,5" TextWrapping="Wrap" VerticalAlignment="Center">
					Anz Tage des Folgemonats, nach denen die Dokumentationen des vergangenen Monats nicht mehr verändert werden dürfen (0 für unbegrenzt)
				</TextBlock>

				<CheckBox Margin="3,5,3,5" Content="Dokumentationstext in der Zeiterfassung Pflichtfeld" IsChecked="{Binding Path=IsServiceRecordNoticeMandatory}" Grid.ColumnSpan="2"></CheckBox>
				<dxe:SpinEdit IsFloatValue="False" MinValue="0" Grid.Column="1" Grid.Row="1" Margin="3,5,3,5" Height="23" EditValue="{Binding Path=MaxDaysEditServiceRecordsAllowed, Converter={StaticResource Int2DecimalConverter}}" />

				<TextBlock Foreground="Black" Grid.Column="0" Grid.Row="3" Margin="3,5,3,5" TextWrapping="Wrap" VerticalAlignment="Center">
					Zeit in Minuten bis der BeWoPlaner nach Inaktivität gesperrt wird
				</TextBlock>
				<dxe:SpinEdit x:Name="LockUITimeSpinEdit" IsFloatValue="False" MinValue="0" MaxValue="999"
											Grid.Column="1" Grid.Row="3" Margin="3,5,3,5" Height="23"
											EditValue="{Binding Path=TimeUntilUILock, Converter={StaticResource Int2DecimalConverter}, Mode=TwoWay}" />

				<TextBlock Foreground="Black" Grid.Column="0" Grid.Row="4" Margin="3,5,3,5" TextWrapping="Wrap" VerticalAlignment="Center">
					Anzahl Monate ab der eine Warnung für auslaufende Hilfepläne angezeigt wird
				</TextBlock>
				<dxe:SpinEdit x:Name="helpplan" IsFloatValue="False" MinValue="0" MaxValue="999"
                      Grid.Column="1" Grid.Row="4" Margin="3,5,3,5" Height="23"  EditValue="{Binding Path=HilfeplanAuslaufAuswahl, Converter={StaticResource Int2DecimalConverter}}" />

        <TextBlock Foreground="Black" Grid.Column="0" Grid.Row="5" Margin="3,5,3,5" TextWrapping="Wrap" VerticalAlignment="Center">
          Anzahl Tage in der die Zeiterfassung erfolgen muss (0 für unbegrenzt)
        </TextBlock>
        <dxe:SpinEdit x:Name="AnzTageZeiterfassErfolgt" IsFloatValue="False" MinValue="0" MaxValue="999"
                      Grid.Column="1" Grid.Row="5" Margin="3,5,3,5" Height="23"  EditValue="{Binding Path=AnzTageZeiterfassErfolgt, Converter={StaticResource Int2DecimalConverter}}" />

        <CheckBox Margin="3,5,3,5" Content="Passwortsicherheit aktivieren" IsChecked="{Binding Path=IsPasswordSecurityActiv}" Grid.ColumnSpan="2" Grid.Row="6"></CheckBox>

				<!--<CheckBox Margin="3,5,3,5" Content="Enddatum in Zeiterfassung aktivieren" IsChecked="{Binding Path=IsEndDateVisible}" Grid.ColumnSpan="2" Grid.Row="7"></CheckBox>-->
			</Grid>
			


		</GroupBox>

		<GroupBox Margin="3 20 3 3" Grid.Row="3" Grid.ColumnSpan="2" Header="Rechnungsnummer" Style="{StaticResource ObjectEditGroupBox}">
			<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto" />
					<ColumnDefinition Width="*" />
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="Auto" />
					<RowDefinition Height="*" />
				</Grid.RowDefinitions>
				<Label Content="Schema" Grid.Row="1" Margin="3" VerticalAlignment="Center" />
				<TextBox Grid.Column="1" Grid.Row="1" Width="200" Margin="3" Height="23" Text="{Binding InvoiceNumber.Pattern}" />
				<Label Content="Aktuelle Nummer" Grid.Row="2" Margin="3" VerticalAlignment="Center" />
				<dxe:SpinEdit Name="spinedit_number" Grid.Column="1" Grid.Row="2"
								Height="23" Width="200" EditValue="{Binding Path=InvoiceNumber.CurrentNumber, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int2DecimalConverter}}" />
				<Label Content="Automatische Rechnungsnummer verwenden" Margin="3" VerticalAlignment="Center" />
				<dxe:CheckEdit Grid.Column="1" Width="200" Margin="3" Height="23" IsChecked="{Binding InvoiceNumber.Use}" />
			</Grid>
		</GroupBox>
	</Grid>

</localView:BeWoView>