101 lines
3.1 KiB
C#
101 lines
3.1 KiB
C#
using BeWo.ViewModel;
|
|
using BS.Shared;
|
|
using BS.Shared.DataContracts.ClientPartials;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
|
|
namespace BeWo.Core
|
|
{
|
|
[DebuggerDisplay("{GoalEntryVM.Abbreviation}: {GoalEntryVM.Description}")]
|
|
public class SupportConceptGoalTreeItem : SupportConceptGoalDC
|
|
{
|
|
private ValueListEntryVM _GoalEntryVM;
|
|
private BindingList<SupportConceptGoalTreeItem> _Children;
|
|
private bool _ShowNotice;
|
|
|
|
public SupportConceptGoalTreeItem() { }
|
|
|
|
public ValueListEntryVM GoalEntryVM
|
|
{
|
|
get => _GoalEntryVM;
|
|
set => _GoalEntryVM = value;
|
|
}
|
|
|
|
//CB Das ist doch genau falsch herum?
|
|
public bool IsGoal => GoalEntryVM != null ?
|
|
GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) :
|
|
GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
|
|
|
|
public bool IsZiel
|
|
{
|
|
get
|
|
{
|
|
return IsOfType(ValueListEntryType.SupportConceptGoalCategoryType);
|
|
}
|
|
}
|
|
|
|
public bool IsIndZiel
|
|
{
|
|
get
|
|
{
|
|
return IsOfType(ValueListEntryType.SupportConceptIndividualGoalCategoryType);
|
|
}
|
|
}
|
|
|
|
public bool IsMassnahme
|
|
{
|
|
get
|
|
{
|
|
return IsOfType(ValueListEntryType.SupportConceptGoalType);
|
|
}
|
|
}
|
|
|
|
public bool IsIndMassnahme
|
|
{
|
|
get
|
|
{
|
|
return IsOfType(ValueListEntryType.SupportConceptIndividualGoalType);
|
|
}
|
|
}
|
|
|
|
public bool IsOfType(ValueListEntryType t)
|
|
{
|
|
|
|
if (GoalEntryVM != null)
|
|
{
|
|
return GoalEntryVM.Type == t;
|
|
}
|
|
else if (GoalEntryDC != null)
|
|
{
|
|
return GoalEntryDC.Type == t;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
//public bool IsGoal => GoalEntryVM != null ?
|
|
// GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryVM.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType) :
|
|
// GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptGoalType) || GoalEntryDC.Type.Equals(ValueListEntryType.SupportConceptIndividualGoalType);
|
|
|
|
|
|
|
|
public bool ShowNotice
|
|
{
|
|
get => _ShowNotice;
|
|
set
|
|
{
|
|
_ShowNotice = value;
|
|
RaisePropertyChanged(nameof(ShowNotice));
|
|
}
|
|
}
|
|
|
|
public bool IsHidden { get; set; }
|
|
|
|
public BindingList<SupportConceptGoalTreeItem> Items
|
|
{
|
|
get => _Children ?? (_Children = new BindingList<SupportConceptGoalTreeItem>());
|
|
set => _Children = value;
|
|
}
|
|
|
|
public ValueListEntryType GoalType => GoalEntryDC?.Type ?? GoalEntryVM.Type;
|
|
}
|
|
} |