Mehrfache IK Leistungserbringer - Anfang
This commit is contained in:
@@ -266,5 +266,10 @@ namespace BeWo.Data.Access
|
||||
return obj;
|
||||
}
|
||||
|
||||
public virtual int GetRowCount<T>() where T : BeWoEntityBase
|
||||
{
|
||||
return Session.QueryOver<T>()
|
||||
.RowCount();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
@@ -30,6 +32,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
#endif
|
||||
pDataContract.Apikey = pEntity.Apikey;
|
||||
pDataContract.IKLeistungserbringer = pEntity.IKLeistungserbringer;
|
||||
//pDataContract.CanEditIKLeistungserbringer = GetCanEditIKLeistungserbringer();
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
@@ -65,5 +68,21 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
return pDC.MandatorOid == pEntity.Oid;
|
||||
}
|
||||
|
||||
private bool GetCanEditIKLeistungserbringer()
|
||||
{
|
||||
try
|
||||
{
|
||||
var row_count = DAOFactory.GenericDAO.GetRowCount<GkvTransferProtokoll>();
|
||||
|
||||
return row_count == 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,5 +58,8 @@ namespace BS.Shared.DataContracts
|
||||
|
||||
[DataMember]
|
||||
public string IKLeistungserbringer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public bool CanEditIKLeistungserbringer { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user