Enitty + Mapper
This commit is contained in:
@@ -220,6 +220,7 @@
|
||||
<Compile Include="Entities\GeschenkterUrlaubstag.cs" />
|
||||
<Compile Include="Entities\GkvTransferprotokoll.cs" />
|
||||
<Compile Include="Entities\GoalRating.cs" />
|
||||
<Compile Include="Entities\ImageSimple.cs" />
|
||||
<Compile Include="Entities\Preis.cs" />
|
||||
<Compile Include="Entities\Quittierungsbelegsstatus.cs" />
|
||||
<Compile Include="Entities\Rating.cs" />
|
||||
|
||||
70
Data/Entities/ImageSimple.cs
Normal file
70
Data/Entities/ImageSimple.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class ImageSimple : BeWoEntityBase
|
||||
{
|
||||
private BeWoEntityBase _Parent;
|
||||
|
||||
private string _Filename;
|
||||
private string _Fullname;
|
||||
private byte[] _ImageData;
|
||||
|
||||
public ImageSimple()
|
||||
{
|
||||
_Tid = TableID.ImageSimple;
|
||||
}
|
||||
|
||||
public virtual BeWoEntityBase Parent
|
||||
{
|
||||
get { return _Parent; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Parent, value))
|
||||
return;
|
||||
|
||||
_Parent = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Filename
|
||||
{
|
||||
get { return _Filename; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Filename, value))
|
||||
return;
|
||||
|
||||
_Filename = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Fullname
|
||||
{
|
||||
get { return _Fullname; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_Fullname, value))
|
||||
return;
|
||||
|
||||
_Fullname = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual byte[] ImageData
|
||||
{
|
||||
get { return _ImageData; }
|
||||
set
|
||||
{
|
||||
if (!AreDifferent(_ImageData, value))
|
||||
return;
|
||||
|
||||
_ImageData = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Service/DCEntityMapper/ImageDC_ImageSimple.cs
Normal file
56
Service/DCEntityMapper/ImageDC_ImageSimple.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Wohnhilfe;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class ImageDC_ImageSimple : AbstractIDCEntityMapper<ImageSimple, ImageDC>
|
||||
{
|
||||
public ImageDC MergeWithDC(ImageSimple pEntity, ImageDC pDataContract, WohneinheitDC wohneinheit)
|
||||
{
|
||||
pDataContract.Filename = pEntity.Filename;
|
||||
pDataContract.Fullname = pEntity.Fullname;
|
||||
pDataContract.ImageData = pEntity.ImageData;
|
||||
|
||||
if (wohneinheit.Grundrisse is null)
|
||||
wohneinheit.Grundrisse = new List<ImageDC>();
|
||||
|
||||
wohneinheit.Grundrisse.Add(pDataContract);
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public ImageSimple MergeWithEntity(ImageDC pDataContract, ImageSimple pEntity, Wohneinheit wohneinheit)
|
||||
{
|
||||
pEntity.Filename = pDataContract.Filename;
|
||||
pEntity.Fullname = pDataContract.Fullname;
|
||||
pEntity.ImageData = pDataContract.ImageData;
|
||||
|
||||
pEntity.Parent = wohneinheit;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
public override ImageDC MergeWithDC(ImageSimple pEntity, ImageDC pDataContract)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public override ImageSimple MergeWithEntity(ImageDC pDataContract, ImageSimple pEntity)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
protected override bool AreDCAndEntityEqual(ImageDC pDC, ImageSimple pEntity)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,6 +304,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
private static FalldatenDC_CustomerFalldaten _FalldatenDC_CustomerFalldaten;
|
||||
|
||||
private static ImageDC_ImageSimple _ImageDC_ImageSimple;
|
||||
|
||||
public static MedRecordDC_MedRecord MedRecordDC_MedRecord =>
|
||||
_MedRecordDC_MedRecord ?? (_MedRecordDC_MedRecord = new MedRecordDC_MedRecord());
|
||||
|
||||
@@ -763,5 +765,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
public static FalldatenDC_CustomerFalldaten FalldatenDC_CustomerFalldaten =>
|
||||
_FalldatenDC_CustomerFalldaten ?? (_FalldatenDC_CustomerFalldaten = new FalldatenDC_CustomerFalldaten());
|
||||
|
||||
public static ImageDC_ImageSimple ImageDC_ImageSimple =>
|
||||
_ImageDC_ImageSimple ?? (_ImageDC_ImageSimple = new ImageDC_ImageSimple());
|
||||
}
|
||||
}
|
||||
@@ -227,6 +227,7 @@
|
||||
<Compile Include="DCEntityMapper\AddressRouteDC_AddressRoute.cs" />
|
||||
<Compile Include="DCEntityMapper\BargeldtransaktionshistoryDC_Bargeldtransaktionshistory.cs" />
|
||||
<Compile Include="DCEntityMapper\ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.cs" />
|
||||
<Compile Include="DCEntityMapper\ImageDC_ImageSimple.cs" />
|
||||
<Compile Include="DCEntityMapper\FalldatenDC_CustomerFalldaten.cs" />
|
||||
<Compile Include="DCEntityMapper\DienstvertretungDC_Dienstvertretung.cs" />
|
||||
<Compile Include="DCEntityMapper\DokumentvorlageDC_Dokumentvorlage.cs" />
|
||||
|
||||
@@ -174,7 +174,8 @@ namespace BS.Shared
|
||||
GkvTransferprotokoll = 167,
|
||||
Wohneinheit = 168,
|
||||
WohneinheitBelegung = 169,
|
||||
CustomerFalldaten = 170
|
||||
CustomerFalldaten = 170,
|
||||
ImageSimple = 171
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
|
||||
Reference in New Issue
Block a user