Ich bin schon groß und vier, komm doch und spiel mit mir, ich lad dich ein ich bin Caillou
62 lines
1.7 KiB
C#
62 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using BeWo.ViewModel.Light;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.DataContracts.GkvAbrechnung;
|
|
using BS.Shared.DataContracts.Light;
|
|
|
|
namespace BeWo.ViewModel.ListViewModel.Light
|
|
{
|
|
public class GkvAbrechnungLightListVM : AbstractDCListMapperVM<GkvAbrechnungLightDC, GkvAbrechnungLightVM>
|
|
{
|
|
public static string PropertyName_DateTimeSpanFilter = "DateTimeSpanFilter";
|
|
|
|
public static string PropertyName_FilterResultAmountSum = "FilterResultAmountSum";
|
|
public static string PropertyName_FilterResultAmountNotPaidSum = "FilterResultAmountNotPaidSum";
|
|
|
|
private DateTimeSpan _DateTimeSpanFilter;
|
|
|
|
public GkvAbrechnungLightListVM(List<GkvAbrechnungLightDC> pDCList) : base(pDCList)
|
|
{
|
|
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
|
this.VMList.ListChanged += (s, e) => this.FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
|
}
|
|
public GkvAbrechnungLightListVM() : this(null)
|
|
{
|
|
|
|
}
|
|
|
|
public DateTimeSpan DateTimeSpanFilter
|
|
{
|
|
get
|
|
{
|
|
return this._DateTimeSpanFilter;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (this.AreDifferent(this._DateTimeSpanFilter, value))
|
|
{
|
|
this._DateTimeSpanFilter = value;
|
|
this.FirePropertyChanged(PropertyName_DateTimeSpanFilter);
|
|
}
|
|
}
|
|
}
|
|
|
|
internal void UpdateList(IList<GkvAbrechnungLightDC> dcList)
|
|
{
|
|
VMList.Clear();
|
|
|
|
if (dcList is object)
|
|
foreach (var dc in dcList)
|
|
{
|
|
VMList.Add(CreateVM(dc));
|
|
}
|
|
|
|
FirePropertyChanged(PropertyName_FilterResultAmountSum);
|
|
FirePropertyChanged(PropertyName_FilterResultAmountNotPaidSum);
|
|
}
|
|
|
|
internal void ClearList() => UpdateList(null);
|
|
}
|
|
} |