DomizielAnsbach/Invoicing/PBInvoiceCreation Adresssetzung
This commit is contained in:
@@ -57,8 +57,6 @@ namespace DomizielAnsbach.Invoicing
|
||||
{
|
||||
serviceInvoice.InvoiceBase.RecipientAddress = address.CopyToNew();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,14 @@ namespace DomizielAnsbach
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
bool bezirk = false;
|
||||
|
||||
var sb = new StringBuilder();
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientAddressLine1) && pRO.RecipientAddressLine1.Contains("Bezirk"))
|
||||
{
|
||||
bezirk = true;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation) && !bezirk)
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
@@ -31,18 +37,17 @@ namespace DomizielAnsbach
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
|
||||
//if (!String.IsNullOrEmpty(pRO.RecipientContactPerson) && pRO.RecipientContactPerson != pRO.RecipientOrganisation)
|
||||
//{
|
||||
// sb.AppendLine(pRO.RecipientContactPerson);
|
||||
//}
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPoBox))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPoBox);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine("");
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
}
|
||||
|
||||
@@ -62,14 +67,16 @@ namespace DomizielAnsbach
|
||||
{
|
||||
lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte Tätigkeiten:", start, end);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.CustomerSalutation) && pRO.CustomerSalutation.ToLower().Contains("herr"))
|
||||
if (!bezirk)
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrter Herr {0},", pRO.CustomerLastName);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.CustomerSalutation) && pRO.CustomerSalutation.ToLower().Contains("frau"))
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrte Frau {0},", pRO.CustomerLastName);
|
||||
if (!String.IsNullOrEmpty(pRO.CustomerSalutation) && pRO.CustomerSalutation.ToLower().Contains("herr"))
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrter Herr {0},", pRO.CustomerLastName);
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(pRO.CustomerSalutation) && pRO.CustomerSalutation.ToLower().Contains("frau"))
|
||||
{
|
||||
lblAnrede.Text = String.Format("Sehr geehrte Frau {0},", pRO.CustomerLastName);
|
||||
}
|
||||
}
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
|
||||
Reference in New Issue
Block a user