44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using BeWo.Data.Entities;
|
|
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWo.Service.DCEntityMapper
|
|
{
|
|
public class TeamFolderRightDC_TeamFolderRight : AbstractIDCEntityMapper<TeamFolderRight, TeamFolderRightDC>
|
|
{
|
|
public override TeamFolderRightDC MergeWithDC(TeamFolderRight pEntity, TeamFolderRightDC pDataContract)
|
|
{
|
|
pDataContract.Oid = pEntity.Oid;
|
|
pDataContract.Version = pEntity.Version;
|
|
pDataContract.TeamOid = pEntity.TeamOid;
|
|
pDataContract.BeWoFolderOid = pEntity.BeWoFolderOid;
|
|
pDataContract.AllowEdit = pEntity.AllowEdit;
|
|
pDataContract.AllowView = pEntity.AllowView;
|
|
|
|
return pDataContract;
|
|
}
|
|
|
|
public override TeamFolderRight MergeWithEntity(TeamFolderRightDC pDataContract, TeamFolderRight pEntity)
|
|
{
|
|
this.ConcurrencyCheck(pDataContract.Version, pEntity);
|
|
|
|
pEntity.Oid = pDataContract.Oid;
|
|
pEntity.TeamOid = pDataContract.TeamOid;
|
|
pEntity.BeWoFolderOid = pDataContract.BeWoFolderOid;
|
|
pEntity.AllowEdit = pDataContract.AllowEdit;
|
|
pEntity.AllowView = pDataContract.AllowView;
|
|
|
|
return pEntity;
|
|
}
|
|
|
|
protected override bool AreDCAndEntityEqual(TeamFolderRightDC pDC, TeamFolderRight pEntity)
|
|
{
|
|
if (pDC.Oid == null)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return pDC.Oid == pEntity.Oid;
|
|
}
|
|
}
|
|
} |