LoadMandator wird nicht durch ASP.NET zur Exception geführt -> Report Aufrufe erzeugen Mandator Entity vor OpenSession (Session is null - Nullpointer Exception)
This commit is contained in:
@@ -45,23 +45,7 @@ namespace BeWo.Data.Entities
|
||||
public Mandator()
|
||||
{
|
||||
this._Tid = TableID.Mandator;
|
||||
|
||||
LoadCanEditIKLeistungserbringer();
|
||||
}
|
||||
|
||||
public virtual void LoadCanEditIKLeistungserbringer()
|
||||
{
|
||||
try
|
||||
{
|
||||
var can_edit = DAOFactory.GenericDAO.GetRowCount<GkvTransferProtokoll>() == 0;
|
||||
|
||||
CanEditIKLeistungserbringer = can_edit;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual BankAccount BankAccount { get; set; }
|
||||
public virtual Employee SoziotherapieAnsprechpartner { get; set; }
|
||||
@@ -70,7 +54,6 @@ namespace BeWo.Data.Entities
|
||||
public virtual string ColorSendUrbelege { get; set; }
|
||||
public virtual bool? ShowGkvBzEinzel { get; set; }
|
||||
public virtual bool? ShowGkvBzUrbelege { get; set; }
|
||||
public virtual bool CanEditIKLeistungserbringer { get; set; }
|
||||
|
||||
public virtual long BeWoClientType
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
to.Apikey = from.Apikey;
|
||||
to.IKLeistungserbringer = from.IKLeistungserbringer;
|
||||
|
||||
to.CanEditIKLeistungserbringer = from.CanEditIKLeistungserbringer;
|
||||
to.CanEditIKLeistungserbringer = LoadCanEditIKLeistungserbringer();
|
||||
|
||||
if (from.SoziotherapieAnsprechpartner is object)
|
||||
to.SoziotherapieAnsprechpartner = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(from.SoziotherapieAnsprechpartner);
|
||||
@@ -98,5 +98,19 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
return pDC.MandatorOid == pEntity.Oid;
|
||||
}
|
||||
|
||||
public bool LoadCanEditIKLeistungserbringer()
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.GenericDAO.GetRowCount<GkvTransferProtokoll>() == 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user