Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -370,9 +370,11 @@
|
||||
</Border>
|
||||
<TextBlock Margin="5 5" FontSize="12" Foreground="#FFD2D2D2" Grid.Column="0" Grid.Row="0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0} endet am {1:dd.MM.yyyy}">
|
||||
<MultiBinding StringFormat="{}{0} endet am {1:dd.MM.yyyy} {3} {2:dd.MM.yyyy} ">
|
||||
<Binding Path="CustomerName" />
|
||||
<Binding Path="EndDate" />
|
||||
<Binding Path="Customer.TerminationDate" />
|
||||
<Binding Path="Customer.TerminationReason" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
|
||||
@@ -374,14 +374,16 @@ namespace BeWo.Data.Access
|
||||
.CreateCriteria(SupportConcept.PropertyName_CostBearer2SupportConceptList, JoinType.InnerJoin)
|
||||
.Add(Restrictions.Between(CostBearer2SupportConcept.PropertyName_ApprovedEndDate, DateTime.Now, expiredUntil))
|
||||
.List<SupportConcept>();
|
||||
}
|
||||
}
|
||||
|
||||
return c
|
||||
.CreateAlias(SupportConcept.PropertyName_CostBearer2SupportConceptList, "cb2sc", JoinType.InnerJoin)
|
||||
.CreateAlias(SupportConcept.PropertyName_Customer, "c", JoinType.InnerJoin)
|
||||
.CreateAlias("c.Employee2CustomerList", "e2c", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Between("cb2sc." + CostBearer2SupportConcept.PropertyName_ApprovedEndDate, DateTime.Now.Date, expiredUntil))
|
||||
.CreateAlias("c.Employee2CustomerList", "e2c", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq("e2c." + Employee2Customer.PropertyName_EmployeeOid, employeeOid.Value))
|
||||
.Add(Restrictions.Or(
|
||||
Restrictions.Between("cb2sc." + CostBearer2SupportConcept.PropertyName_ApprovedEndDate, DateTime.Now.Date, expiredUntil),
|
||||
Restrictions.And(Restrictions.IsNotNull("c.TerminationDate"), Restrictions.Between("c.TerminationDate", DateTime.Now.Date, expiredUntil))))
|
||||
.List<SupportConcept>().Distinct().ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.Sex = pEntity.Person.Sex;
|
||||
pDataContract.ActivationType = pEntity.IsActive;
|
||||
pDataContract.TerminationDate = pEntity.TerminationDate;
|
||||
|
||||
if (pEntity.TerminationReason != null)
|
||||
pDataContract.TerminationReason = pEntity.TerminationReason.Value;
|
||||
|
||||
pDataContract.AssistanceBegin = pEntity.AssistanceBegin;
|
||||
pDataContract.EquityContribution = pEntity.EquityContribution;
|
||||
pDataContract.CustomerAlias = pEntity.CustomerAlias;
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.ActivationType = pEntity.IsActive;
|
||||
pDataContract.AssistanceBegin = pEntity.AssistanceBegin;
|
||||
pDataContract.TerminationDate = pEntity.TerminationDate;
|
||||
|
||||
|
||||
pDataContract.EquityContribution = pEntity.EquityContribution;
|
||||
pDataContract.RelatedTeamOids = pEntity.Team2CustomerList.Select(t2c => t2c.CustomerOid.Value).ToList();
|
||||
pDataContract.CustomerAlias = pEntity.CustomerAlias;
|
||||
|
||||
@@ -1975,6 +1975,9 @@ namespace BeWo.Service.ServiceImplementations
|
||||
customerDC.ActivationType = cust.IsActive;
|
||||
customerDC.TerminationDate = cust.TerminationDate;
|
||||
|
||||
if (cust.TerminationReason != null)
|
||||
customerDC.TerminationReason = cust.TerminationReason.Value;
|
||||
|
||||
if (cust.Person.Address != null)
|
||||
{
|
||||
customerDC.Street = cust.Person.Address.Street;
|
||||
|
||||
@@ -120,6 +120,13 @@ namespace BS.Shared.DataContracts.Compact
|
||||
|
||||
DateTime? date = this.EndDate;
|
||||
|
||||
if (this.Customer.TerminationDate.HasValue)
|
||||
{
|
||||
if (this.Customer.TerminationDate < date)
|
||||
{
|
||||
date = this.Customer.TerminationDate;
|
||||
}
|
||||
}
|
||||
if (date != null)
|
||||
{
|
||||
expires = date < DateTime.Now.AddMonths(BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths);
|
||||
@@ -210,6 +217,14 @@ namespace BS.Shared.DataContracts.Compact
|
||||
|
||||
DateTime? date = this.EndDate;
|
||||
|
||||
if (this.Customer.TerminationDate.HasValue)
|
||||
{
|
||||
if (this.Customer.TerminationDate < date)
|
||||
{
|
||||
date = this.Customer.TerminationDate;
|
||||
}
|
||||
}
|
||||
|
||||
if (date != null)
|
||||
{
|
||||
expires = date < DateTime.Now.AddDays(7); // TODO anz Tage einstellbar machen
|
||||
@@ -349,6 +364,7 @@ namespace BS.Shared.DataContracts.Compact
|
||||
sb.Append(end.Value.ToShortDateString());
|
||||
}
|
||||
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -382,6 +398,11 @@ namespace BS.Shared.DataContracts.Compact
|
||||
cbstr.Append(to.Value.ToShortDateString());
|
||||
}
|
||||
|
||||
if (this.Customer.TerminationDate.HasValue)
|
||||
{
|
||||
cbstr.Append(" ("+Customer.TerminationReason+")");
|
||||
}
|
||||
|
||||
if (cbstr.Length > 0)
|
||||
{
|
||||
cbstr.Append(" ");
|
||||
|
||||
@@ -130,5 +130,8 @@ namespace BS.Shared.DataContracts.Compact
|
||||
}
|
||||
set{}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string TerminationReason { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user