update treeview und sort bei leistuung in verwaltung
This commit is contained in:
@@ -101,17 +101,17 @@
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Name" Header="Bezeichnung" Width="200" />
|
||||
<dxg:GridColumn x:Name="column_category" FieldName="ServiceCategory" Header="Kategorie" Width="200" />
|
||||
<dxg:GridColumn x:Name="column_costrateperiods" FieldName="CurrentAmount.CostRateValue" Header="Betrag" Width="60" EditSettings="{dxe:TextSettings DisplayFormat=c, EditFormat=c}">
|
||||
<dxg:GridColumn.EditTemplate>
|
||||
<ControlTemplate>
|
||||
<Button x:Name="PART_Editor" BorderThickness="0" Style="{x:Null}" Height="20" HorizontalAlignment="Stretch" Click="PART_Editor_Click">
|
||||
<TextBlock Text="{Binding Value, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0:c}'}" TextWrapping="Wrap" />
|
||||
</Button>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.EditTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="column_interval" FieldName="AccountingInterval" Header="Abrechnungsintervall" Width="130" />
|
||||
<dxg:GridColumn x:Name="column_category" FieldName="ServiceCategory" Header="Kategorie" Width="200" SortOrder="Ascending" />
|
||||
<dxg:GridColumn x:Name="column_costrateperiods" FieldName="CurrentAmount.CostRateValue" Header="Betrag" Width="60" EditSettings="{dxe:TextSettings DisplayFormat=c, EditFormat=c}">
|
||||
<dxg:GridColumn.EditTemplate>
|
||||
<ControlTemplate>
|
||||
<Button x:Name="PART_Editor" BorderThickness="0" Style="{x:Null}" Height="20" HorizontalAlignment="Stretch" Click="PART_Editor_Click">
|
||||
<TextBlock Text="{Binding Value, Converter={StaticResource StringFormatConverter}, ConverterParameter='{}{0:c}'}" TextWrapping="Wrap" />
|
||||
</Button>
|
||||
</ControlTemplate>
|
||||
</dxg:GridColumn.EditTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="column_interval" FieldName="AccountingInterval" Header="Abrechnungsintervall" Width="130" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
|
||||
|
||||
@@ -666,7 +666,7 @@
|
||||
<Grid x:Name="grid_serviceaccountings">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<!--<RowDefinition Height="*" />-->
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Header="Definierte Leistungen" Style="{DynamicResource ObjectEditGroupBox}">
|
||||
@@ -719,8 +719,24 @@
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</GroupBox>-->
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_checkAllLeistungen" Click="button_checkAllLeistungen_Click"
|
||||
HorizontalAlignment="Left">Alle auswählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllLeistungen" Click="button_uncheckAllLeistungen_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_aufklappenAllLeistungen" Click="button_aufklappenAllLeistungen_Click"
|
||||
HorizontalAlignment="Left">Alle aufklappen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_zuklappenAllLeistungen" Click="button_zuklappenAllLeistungen_Click"
|
||||
HorizontalAlignment="Left">Alle zuklappen</Button>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="Ziele" Name="tabitem_goals">
|
||||
<Grid>
|
||||
@@ -793,6 +809,12 @@
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_uncheckAllGoals" Click="button_uncheckAllGoals_Click"
|
||||
HorizontalAlignment="Left">Alle abwählen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_aufklappenAllGoals" Click="button_aufklappenAllGoals_Click"
|
||||
HorizontalAlignment="Left">Alle aufklappen</Button>
|
||||
<Button Margin="10 3 0 0"
|
||||
Name="button_zuklappenAllGoals" Click="button_zuklappenAllGoals_Click"
|
||||
HorizontalAlignment="Left">Alle zuklappen</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
@@ -1177,6 +1177,68 @@ namespace BeWo.View.Detail
|
||||
CheckAllGoalTreeItems(false);
|
||||
}
|
||||
|
||||
private void button_aufklappenAllGoals_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SwitchAllGoalTreeItems(true);
|
||||
}
|
||||
|
||||
private void button_zuklappenAllGoals_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SwitchAllGoalTreeItems(false);
|
||||
}
|
||||
|
||||
private void button_checkAllLeistungen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckAllLeistungTreeItems(true);
|
||||
}
|
||||
|
||||
private void button_uncheckAllLeistungen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckAllLeistungTreeItems(false);
|
||||
}
|
||||
|
||||
private void button_aufklappenAllLeistungen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SwitchAllLeistungTreeItems(true);
|
||||
}
|
||||
|
||||
private void button_zuklappenAllLeistungen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SwitchAllLeistungTreeItems(false);
|
||||
}
|
||||
|
||||
private void CheckAllLeistungTreeItems(bool check)
|
||||
{
|
||||
var allItems = treeview_serviceAccountings.ItemsSource as IList<ServiceCategoryTreeItem>;
|
||||
|
||||
foreach (var item in allItems)
|
||||
{
|
||||
item.IsChecked = check;
|
||||
}
|
||||
}
|
||||
|
||||
private void SwitchAllLeistungTreeItems(bool check)
|
||||
{
|
||||
Style stylee = new Style
|
||||
{
|
||||
TargetType = typeof(TreeViewItem)
|
||||
};
|
||||
|
||||
stylee.Setters.Add(new Setter(TreeViewItem.IsExpandedProperty,check));
|
||||
treeview_serviceAccountings.ItemContainerStyle = stylee;
|
||||
}
|
||||
|
||||
private void SwitchAllGoalTreeItems(bool check)
|
||||
{
|
||||
Style stylee = new Style
|
||||
{
|
||||
TargetType = typeof(TreeViewItem)
|
||||
};
|
||||
|
||||
stylee.Setters.Add(new Setter(TreeViewItem.IsExpandedProperty, check));
|
||||
treeview_Goals.ItemContainerStyle = stylee;
|
||||
}
|
||||
|
||||
private void CheckAllGoalTreeItems(bool check)
|
||||
{
|
||||
var allItems = treeview_Goals.ItemsSource as IList<SupportConceptGoalTreeItem>;
|
||||
@@ -1187,6 +1249,7 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void button_openAddBetreuungsschluessel_Click(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -120,6 +120,7 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int Position
|
||||
{
|
||||
get { return _Position; }
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
namespace BS.Shared.DataContracts
|
||||
using System;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public partial class ServiceCategoryDC
|
||||
public partial class ServiceCategoryDC : IComparable
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
@@ -25,10 +27,21 @@
|
||||
{
|
||||
return this.ServiceCategoryOid.HasValue ? this.GetType().Name.GetHashCode() ^ this.ServiceCategoryOid.GetHashCode() : base.GetHashCode();
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.Name;
|
||||
}
|
||||
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
var category2 = obj as ServiceCategoryDC;
|
||||
if (category2 == null || String.IsNullOrEmpty(category2.Name))
|
||||
return -1;
|
||||
if (String.IsNullOrEmpty(Name))
|
||||
return 1;
|
||||
return Name.CompareTo(category2.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user