Maßnahme und Ziele per Popup bearbeiten Maßnahme und Ziele Notiz optional einblenden Das selbe auch bei Hilfeplan -> Ziele (ohne Icf import) ReportTemplate hinzugefügt (Tabelle, Hibernate, Enity, Mapper, DC) Listbox Select hinzugefügt, dient dem generischen Auswählen eines object aus einer list<object> per control
129 lines
3.0 KiB
C#
129 lines
3.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Windows.Media;
|
|
|
|
namespace BS.Shared.DataContracts.ClientPartials
|
|
{
|
|
public class SupportConceptGoalDC : INotifyPropertyChanged, IFilterableDC
|
|
{
|
|
private List<SupportConceptGoalDC> _Children;
|
|
|
|
private ValueListEntryDC _GoalEntryDC;
|
|
|
|
private bool _IsChecked;
|
|
|
|
private bool _IsExpanded;
|
|
|
|
public List<SupportConceptGoalDC> Children
|
|
{
|
|
get { return _Children ?? (_Children = new List<SupportConceptGoalDC>()); }
|
|
|
|
set { _Children = value; }
|
|
}
|
|
|
|
public ValueListEntryDC GoalEntryDC
|
|
{
|
|
get { return _GoalEntryDC; }
|
|
|
|
set { _GoalEntryDC = value; }
|
|
}
|
|
|
|
public bool HasParent => ParentGoal != null;
|
|
|
|
public bool HasNotice => GoalEntryDC != null && !string.IsNullOrEmpty(GoalEntryDC.Notice);
|
|
|
|
public bool IsChecked
|
|
{
|
|
get => _IsChecked;
|
|
|
|
set
|
|
{
|
|
_IsChecked = value;
|
|
foreach (var item in Children)
|
|
{
|
|
item.IsChecked = value;
|
|
}
|
|
|
|
RaisePropertyChanged("IsChecked");
|
|
}
|
|
}
|
|
|
|
public bool IsExpanded
|
|
{
|
|
get => _IsExpanded;
|
|
|
|
set
|
|
{
|
|
_IsExpanded = value;
|
|
RaisePropertyChanged("IsExpanded");
|
|
}
|
|
}
|
|
|
|
public string Name => DetailDescription;
|
|
|
|
|
|
|
|
public SupportConceptGoalDC ParentGoal { get; set; }
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
|
|
|
|
protected void RaisePropertyChanged(string propertyName)
|
|
{
|
|
var propertyChanged = PropertyChanged;
|
|
|
|
propertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return GoalEntryDC == null ? "-" : GoalEntryDC.TypeDescription;
|
|
}
|
|
|
|
#region IFilterableDC Members
|
|
|
|
public string IconPath
|
|
{
|
|
get { return string.Empty; }
|
|
}
|
|
|
|
public string DetailDescription
|
|
{
|
|
get { return GoalEntryDC.DisplayName; }
|
|
}
|
|
|
|
public string FilterRelevants
|
|
{
|
|
get { return Name; } // ?? String.Empty; }
|
|
}
|
|
|
|
public bool SupportsActivationType
|
|
{
|
|
get { return true; }
|
|
}
|
|
|
|
public long Version
|
|
{
|
|
get { return 0; }
|
|
|
|
set { }
|
|
}
|
|
|
|
public string SimpleDescription
|
|
{
|
|
get { return Name; }
|
|
}
|
|
|
|
public ActivationTypeId ActivationType
|
|
{
|
|
get { return ActivationTypeId.Active; }
|
|
|
|
set { }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
} |