2017-04-03 13:07:06 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.ComponentModel;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
using System.Windows.Media;
|
2017-12-15 10:47:43 +01:00
|
|
|
|
using BS.Shared.Translation;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
|
|
|
|
|
namespace BS.Shared.DataContracts
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FlatSupportConceptTreeNodeDC : INotifyPropertyChanged
|
|
|
|
|
|
{
|
|
|
|
|
|
private string _CustomerWarning;
|
|
|
|
|
|
|
|
|
|
|
|
private string _EmployeeWarning;
|
|
|
|
|
|
|
|
|
|
|
|
private bool _IsCustomerWarningActive;
|
|
|
|
|
|
|
|
|
|
|
|
private bool _IsEmployeeWarningActive;
|
|
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
|
|
|
|
public string CostBearerName
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC.CostBearer != null)
|
|
|
|
|
|
{
|
2025-10-24 02:00:27 +02:00
|
|
|
|
String cb = this.SupportConceptTreeNodeDC.CostBearer.ToString();
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC != null && this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.Status != CostBearer2SupportConceptStatus.Approved)
|
|
|
|
|
|
{
|
|
|
|
|
|
cb = String.Format("{0} (nicht bewilligt)", cb);
|
|
|
|
|
|
}
|
|
|
|
|
|
return cb;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string CustomerName
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC == null)
|
|
|
|
|
|
{
|
2017-12-15 10:47:43 +01:00
|
|
|
|
return Translator.Translate("<Kein Hilfeplan ausgewählt>");
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC.Customer != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.SupportConceptTreeNodeDC.Customer.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string CustomerWarning
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return this._CustomerWarning;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
this._CustomerWarning = value;
|
|
|
|
|
|
this.RaisePropertyChanged("CustomerWarning");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string EmployeeWarning
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return this._EmployeeWarning;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
this._EmployeeWarning = value;
|
|
|
|
|
|
this.RaisePropertyChanged("EmployeeWarning");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool ExpiresIn3MonthOrLess
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.SupportConceptTreeNodeDC.ExpiresIn3MonthOrLess;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsAboutToExpire
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return this.SupportConceptTreeNodeDC.IsAboutToExpire;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsCustomerWarningActive
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return this._IsCustomerWarningActive;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
this._IsCustomerWarningActive = value;
|
|
|
|
|
|
this.RaisePropertyChanged("IsCustomerWarningActive");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsEmployeeWarningActive
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
return this._IsEmployeeWarningActive;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
{
|
|
|
|
|
|
this._IsEmployeeWarningActive = value;
|
|
|
|
|
|
this.RaisePropertyChanged("IsEmployeeWarningActive");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Brush NodeForegroundBrush
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.IsAboutToExpire)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Brushes.Red;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (this.ExpiresIn3MonthOrLess)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Brushes.Yellow;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
return new SolidColorBrush(Color.FromRgb(160, 160, 160));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string SupportConceptName
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (this.SupportConceptTreeNodeDC.SupportConcept != null)
|
|
|
|
|
|
// return "Plan vom " + this.SupportConceptTreeNodeDC.SupportConcept.ToString();
|
|
|
|
|
|
if (this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC != null)
|
|
|
|
|
|
{
|
2017-04-03 13:07:06 +02:00
|
|
|
|
if (
|
|
|
|
|
|
!string.IsNullOrEmpty(
|
|
|
|
|
|
this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.AuswahlBezeichnung))
|
|
|
|
|
|
{
|
|
|
|
|
|
return String.Format("{0} {1}",
|
|
|
|
|
|
this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.AuswahlBezeichnung,
|
|
|
|
|
|
this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString);
|
|
|
|
|
|
}
|
|
|
|
|
|
return this.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC.DateRangeString;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public SupportConceptTreeNodeDC SupportConceptTreeNodeDC { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
protected void RaisePropertyChanged(string propertyName)
|
|
|
|
|
|
{
|
|
|
|
|
|
PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
|
|
|
|
|
|
if (propertyChanged != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|