Files
BeWoPlaner/Shared/DataContracts/ClientPartials/SupportConceptOverviewDC.cs
Christian a9a0b46368 Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
# Conflicts:
#	BeWoPlanerMobil/Views/Main/Main.cshtml
2018-06-13 14:38:35 +02:00

89 lines
3.2 KiB
C#

using System;
using System.Windows.Media;
using BS.Shared.Extensions;
namespace BS.Shared.DataContracts
{
partial class SupportConceptOverviewDC
{
public string BERecordedAndBilled
{
get
{
decimal diff = BERecordedTillNow - BEBilledTillNow;
if (diff > 0)
{
return string.Format("{0:0.00} (von {1:0.00})", BEBilledTillNow, BERecordedTillNow);
}
return string.Format("{0:0.00}", BEBilledTillNow);
}
}
public Brush KorridorStatusColor
{
get
{
var farbe = KorridorStatusFarbe;
if (!String.IsNullOrEmpty(farbe))
{
return new BrushConverter().ConvertFromString(farbe) as SolidColorBrush;
}
return null;
}
}
public string HeaderString
{
get
{
var open = this.BEOpen;
var openPerWeek = this.BEOpenPerWeek;
var unit = "Stunden";
if (this.ServiceUnit != null && this.ServiceUnit.CostRateValue.HasValue && !string.IsNullOrEmpty(this.ServiceUnit.UnitName))
{
unit = this.ServiceUnit.UnitName;
if (this.ServiceUnit.CostRateValue != 60)
{
open = this.ServiceUnit.GetMinutesInBE(open);
openPerWeek = this.ServiceUnit.GetMinutesInBE(openPerWeek);
}
}
if (this.IsApproved && this.ApprovedStartDate.HasValue && this.ApprovedEndDate.HasValue)
{
return string.Format("{0} - {1} | {2:0.00} Wochen verbleibend | {3:0.00} {4} bzw. {5:0.00} {4}/Woche verbleibend", this.ApprovedStartDate.Value.ToMonthSlashShortYear(), this.ApprovedEndDate.Value.ToMonthSlashShortYear(), this.OpenWeeks, open, unit, openPerWeek);
}
if (this.RequestedStartDate.HasValue && this.RequestedEndDate.HasValue)
{
return string.Format("{0} - {1} | {2:0.00} Wochen verbleibend | {3:0.00} {4} bzw. {5:0.00} {4}/Woche verbleibend | Nicht bewilligt!",
this.RequestedStartDate.Value.ToShortDateString(),
this.RequestedEndDate.Value.ToShortDateString(),
this.OpenWeeks,
open,
unit,
openPerWeek);
}
return "Keine Zeitangaben | Nicht bewilligt!";
}
}
public string Unit
{
get
{
if (this.ServiceUnit != null && this.ServiceUnit.CostRateValue.HasValue && !string.IsNullOrEmpty(this.ServiceUnit.UnitName))
{
return this.ServiceUnit.UnitName;
}
return "Stunden";
}
}
}
}