Files
BeWoPlaner/BeWo/ViewModel/GkvAbrechnungVM.cs

333 lines
12 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using BeWo.Validation;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Core;
namespace BeWo.ViewModel
{
public class GkvAbrechnungVM : AbstractDCMapperVM<GkvAbrechnungDC>
{
/*
Notice
Kundennummer
IKDatenannahmestelle
IKEmpfang
IKLeistungserbringer
AbrechnungsZeitraumStart
AbrechnungsZeitraumEnde
Nutzdatendatei
Auftragsdatei
Transfername
VerschluesseltAm
UebertragenAm
AntwortErhaltenAm
AntwortEntschluesseltAm
*/
public static string PropertyName_IKDatenannahmestelle = "IKDatenannahmestelle";
public static string PropertyName_IKEmpfang = "IKEmpfang";
public static string PropertyName_IKLeistungserbringer = "IKLeistungserbringer";
public static string PropertyName_AbrechnungsZeitraumStart = "AbrechnungsZeitraumStart";
public static string PropertyName_AbrechnungsZeitraumEnde = "AbrechnungsZeitraumEnde";
public static string PropertyName_Nutzdatendatei = "Nutzdatendatei";
public static string PropertyName_Auftragsdatei = "Auftragsdatei";
public static string PropertyName_Transfername = "Transfername";
public static string PropertyName_VerschluesseltAm = "VerschluesseltAm";
public static string PropertyName_UebertragenAm = "UebertragenAm";
public static string PropertyName_AntwortErhaltenAm = "AntwortErhaltenAm";
public static string PropertyName_AntwortEntschluesseltAm = "AntwortEntschluesseltAm";
private string _IKDatenannahmestelle;
private string _IKEmpfang;
private string _IKLeistungserbringer;
private DateTime? _AbrechnungsZeitraumStart;
private DateTime? _AbrechnungsZeitraumEnde;
private string _Nutzdatendatei;
private string _Auftragsdatei;
private string _Transfername;
private DateTime? _VerschluesseltAm;
private DateTime? _UebertragenAm;
private DateTime? _AntwortErhaltenAm;
private DateTime? _AntwortEntschluesseltAm;
internal bool _IsChecked;
private BindingList<InvoiceBaseVM> _InvoiceBases;
public GkvAbrechnungVM(GkvAbrechnungDC pDC) : base(pDC, !pDC.GkvAbrechnungOid.HasValue)
{
_InvoiceBases = new BindingList<InvoiceBaseVM> ();
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string IKEmpfang
{
get { return this._IKEmpfang; }
set
{
if (this.AreDifferent(this._IKEmpfang, value))
{
this._IKEmpfang = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKEmpfang, value), PropertyName_IKEmpfang);
this.FirePropertyChanged(PropertyName_IKEmpfang);
}
}
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string IKDatenannahmestelle
{
get { return this._IKDatenannahmestelle; }
set
{
if (this.AreDifferent(this._IKDatenannahmestelle, value))
{
this._IKDatenannahmestelle = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKDatenannahmestelle, value), PropertyName_IKDatenannahmestelle);
this.FirePropertyChanged(PropertyName_IKDatenannahmestelle);
}
}
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string IKLeistungserbringer
{
get { return this._IKLeistungserbringer; }
set
{
if (this.AreDifferent(this._IKLeistungserbringer, value))
{
this._IKLeistungserbringer = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKLeistungserbringer, value), PropertyName_IKLeistungserbringer);
this.FirePropertyChanged(PropertyName_IKLeistungserbringer);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? AbrechnungsZeitraumStart
{
get { return this._AbrechnungsZeitraumStart; }
set
{
if (this.AreDifferent(this._AbrechnungsZeitraumStart, value))
{
this._AbrechnungsZeitraumStart = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AbrechnungsZeitraumStart, value), PropertyName_AbrechnungsZeitraumStart);
this.FirePropertyChanged(PropertyName_AbrechnungsZeitraumStart);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? AbrechnungsZeitraumEnde
{
get { return this._AbrechnungsZeitraumEnde; }
set
{
if (this.AreDifferent(this._AbrechnungsZeitraumEnde, value))
{
this._AbrechnungsZeitraumEnde = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AbrechnungsZeitraumEnde, value), PropertyName_AbrechnungsZeitraumEnde);
this.FirePropertyChanged(PropertyName_AbrechnungsZeitraumEnde);
}
}
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string Nutzdatendatei
{
get { return this._Nutzdatendatei; }
set
{
if (this.AreDifferent(this._Nutzdatendatei, value))
{
this._Nutzdatendatei = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Nutzdatendatei, value), PropertyName_Nutzdatendatei);
this.FirePropertyChanged(PropertyName_Nutzdatendatei);
}
}
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string Auftragsdatei
{
get { return this._Auftragsdatei; }
set
{
if (this.AreDifferent(this._Auftragsdatei, value))
{
this._Auftragsdatei = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Auftragsdatei, value), PropertyName_Auftragsdatei);
this.FirePropertyChanged(PropertyName_Auftragsdatei);
}
}
}
[ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string Transfername
{
get { return this._Transfername; }
set
{
if (this.AreDifferent(this._Transfername, value))
{
this._Transfername = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Transfername, value), PropertyName_Transfername);
this.FirePropertyChanged(PropertyName_Transfername);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? VerschluesseltAm
{
get { return this._VerschluesseltAm; }
set
{
if (this.AreDifferent(this._VerschluesseltAm, value))
{
this._VerschluesseltAm = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.VerschluesseltAm, value), PropertyName_VerschluesseltAm);
this.FirePropertyChanged(PropertyName_VerschluesseltAm);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? UebertragenAm
{
get { return this._UebertragenAm; }
set
{
if (this.AreDifferent(this._UebertragenAm, value))
{
this._UebertragenAm = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.UebertragenAm, value), PropertyName_UebertragenAm);
this.FirePropertyChanged(PropertyName_UebertragenAm);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? AntwortErhaltenAm
{
get { return this._AntwortErhaltenAm; }
set
{
if (this.AreDifferent(this._AntwortErhaltenAm, value))
{
this._AntwortErhaltenAm = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AntwortErhaltenAm, value), PropertyName_AntwortErhaltenAm);
this.FirePropertyChanged(PropertyName_AntwortErhaltenAm);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public DateTime? AntwortEntschluesseltAm
{
get { return this._AntwortEntschluesseltAm; }
set
{
if (this.AreDifferent(this._AntwortEntschluesseltAm, value))
{
this._AntwortEntschluesseltAm = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.AntwortEntschluesseltAm, value), PropertyName_AntwortEntschluesseltAm);
this.FirePropertyChanged(PropertyName_AntwortEntschluesseltAm);
}
}
}
public bool IsChecked
{
get { return _IsChecked; }
set
{
if (AreDifferent(_IsChecked, value))
{
_IsChecked = value;
FirePropertyChanged("IsChecked");
}
}
}
public BindingList<InvoiceBaseVM> InvoiceBases
{
get { return _InvoiceBases; }
set { _InvoiceBases = value; }
}
protected override void InitByDataContract(GkvAbrechnungDC pDataContract)
{
this._IKDatenannahmestelle= pDataContract.IKDatenannahmestelle;
this._IKDatenannahmestelle = pDataContract.IKDatenannahmestelle;
this._IKDatenannahmestelle = pDataContract.IKDatenannahmestelle;
this._AbrechnungsZeitraumStart = pDataContract.AbrechnungsZeitraumStart;
this._AbrechnungsZeitraumEnde = pDataContract.AbrechnungsZeitraumEnde;
this._Nutzdatendatei = pDataContract.Nutzdatendatei;
this._Auftragsdatei = pDataContract.Auftragsdatei;
this._Transfername = pDataContract.Transfername;
this._VerschluesseltAm = pDataContract.VerschluesseltAm;
this._UebertragenAm = pDataContract.UebertragenAm;
this._AntwortErhaltenAm = pDataContract.AntwortErhaltenAm;
this._AntwortEntschluesseltAm = pDataContract.AntwortEntschluesseltAm;
}
protected override GkvAbrechnungDC MapToDataContract(GkvAbrechnungDC pDataContract, bool doCommit)
{
pDataContract.IKDatenannahmestelle = this._IKDatenannahmestelle;
pDataContract.IKEmpfang = this._IKEmpfang;
pDataContract.IKLeistungserbringer = this._IKLeistungserbringer;
pDataContract.AbrechnungsZeitraumStart = this._AbrechnungsZeitraumStart;
pDataContract.AbrechnungsZeitraumEnde = this._AbrechnungsZeitraumEnde;
pDataContract.Nutzdatendatei = this._Nutzdatendatei;
pDataContract.Auftragsdatei = this._Auftragsdatei;
pDataContract.Transfername= this._Transfername;
pDataContract.VerschluesseltAm = this._VerschluesseltAm;
pDataContract.UebertragenAm = this._UebertragenAm;
pDataContract.AntwortErhaltenAm = this._AntwortErhaltenAm;
pDataContract.AntwortEntschluesseltAm= this._AntwortEntschluesseltAm;
return pDataContract;
}
}
}