diff --git a/ENI2/EditControls/EditCREWDialog.xaml.cs b/ENI2/EditControls/EditCREWDialog.xaml.cs index 7f2735f8..f182f0b0 100644 --- a/ENI2/EditControls/EditCREWDialog.xaml.cs +++ b/ENI2/EditControls/EditCREWDialog.xaml.cs @@ -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(); } diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index cf93c357..9c5ba894 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -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); } diff --git a/ENI2/Report/ReportDocument.cs b/ENI2/Report/ReportDocument.cs index a754b4d5..f9d19900 100644 --- a/ENI2/Report/ReportDocument.cs +++ b/ENI2/Report/ReportDocument.cs @@ -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