fixed some smaller bugs

This commit is contained in:
Daniel Schick 2023-11-07 12:17:17 +01:00
parent f4d2ba6291
commit 51ad5ab3ae
3 changed files with 34 additions and 24 deletions

View File

@ -90,7 +90,7 @@ namespace ENI2.EditControls
this.CREW.CrewMemberVisaNumber = this.textBoxVisaNumber.Text.Trim();
this.CREW.CrewMemberIdentityDocumentIssuingState = (this.comboBoxIssuingState.SelectedValue == null) ? "" : (string) this.comboBoxIssuingState.SelectedValue;
this.CREW.CrewMemberIdentityDocumentExpiryDate = this.datePickerExpiryDate.SelectedDate;
// this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
this.CREW.CrewMemberCountryOfBirth = (this.comboBoxCountryOfBirth.SelectedValue == null) ? "" : (string)this.comboBoxCountryOfBirth.SelectedValue;
// this.CREW.Effects = this.textBoxEffects.Text.Trim();
}

View File

@ -2212,6 +2212,7 @@ namespace ENI2.Excel
crewd = new CREWD();
crewd.Identifier = (i + 1).ToString();
crewd.MessageHeader = crewdMessage;
crewd.IsDeparture = true;
crewdMessage.Elements.Add(crewd);
}
@ -2263,6 +2264,7 @@ namespace ENI2.Excel
crewd = new CREWD();
crewd.Identifier = (i + 1).ToString();
crewd.MessageHeader = crewdMessage;
crewd.IsDeparture = true;
crewdMessage.Elements.Add(crewd);
}

View File

@ -382,34 +382,42 @@ namespace ENI2.Report
case Message.NotificationClass.HAZA when (message.Elements[0] is HAZ haz) && ((haz.IMDGPositions.Count > 0) || (haz.IBCPositions.Count > 0) || (haz.IGCPositions.Count > 0) || (haz.IMSBCPositions.Count > 0) || (haz.MARPOLPositions.Count > 0)):
case Message.NotificationClass.HAZD when (message.Elements[0] is HAZ hazd) && ((hazd.IMDGPositions.Count > 0) || (hazd.IBCPositions.Count > 0) || (hazd.IGCPositions.Count > 0) || (hazd.IMSBCPositions.Count > 0) || (hazd.MARPOLPositions.Count > 0)):
{
// Landscape if not set
if (_lastOrientation == Orientation.Portrait)
{
DefineContentSection(document, Orientation.Landscape, false);
_lastOrientation = Orientation.Landscape;
}
else
{
document.LastSection.AddPageBreak();
}
// Landscape if not set
if (_lastOrientation == Orientation.Portrait)
{
DefineContentSection(document, Orientation.Landscape, false);
_lastOrientation = Orientation.Landscape;
}
else
{
document.LastSection.AddPageBreak();
}
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Title), "Heading2");
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
string title = messageParagraph.Title;
if (title.Equals("CREW")) title = "CREWA"; // evil
if (title.Equals("PAS")) title = "PASA";
}
break;
document.LastSection.AddParagraph(ReplaceTitle(title), "Heading2");
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
}
break;
default:
{
if (_lastOrientation == Orientation.Landscape)
{
ReportDocument.DefineContentSection(document, Orientation.Portrait, false);
_lastOrientation = Orientation.Portrait;
}
if (_lastOrientation == Orientation.Landscape)
{
ReportDocument.DefineContentSection(document, Orientation.Portrait, false);
_lastOrientation = Orientation.Portrait;
}
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Title), "Heading2");
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
}
break;
string title = messageParagraph.Title;
if (title.Equals("CREW")) title = "CREWA"; // evil
if (title.Equals("PAS")) title = "PASA";
document.LastSection.AddParagraph(ReplaceTitle(title), "Heading2");
document.LastSection.AddParagraph(ReplaceTitle(messageParagraph.Subtitle), "Heading3");
}
break;
}
#endregion