Compare commits

..

No commits in common. "1eaf1766646994e16c6e0667e93cc9e833babd1c" and "ac0d6eea9d9c7b104c8a42e6f7d76eec3128d7b3" have entirely different histories.

6 changed files with 18 additions and 27 deletions

View File

@ -390,12 +390,9 @@ namespace ENI2.DetailViewControls
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber; this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
if (this._currentTemplate.WasteDisposalServiceProviderName != this.textBox_WasteDisposalServiceProvider.Text) this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
{ this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName; this.SublistElementChanged(Message.NotificationClass.WAS);
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.SublistElementChanged(Message.NotificationClass.WAS);
}
this.buttonUndoTemplate.IsEnabled = true; this.buttonUndoTemplate.IsEnabled = true;
this.buttonSetTemplate.IsEnabled = false; this.buttonSetTemplate.IsEnabled = false;

View File

@ -24,7 +24,7 @@
</col:ArrayList> </col:ArrayList>
</UserControl.Resources> </UserControl.Resources>
<GroupBox Name="portNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}"> <GroupBox Name="portNotificationGroupBox" Header="{x:Static p:Resources.textPortNotification}">
<ScrollViewer> <ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="50" /> <RowDefinition Height="50" />

View File

@ -1007,18 +1007,15 @@ namespace ENI2.Excel
STAT stat = statMessage.Elements[0] as STAT; STAT stat = statMessage.Elements[0] as STAT;
ScanMessage(stat, reader); ScanMessage(stat, reader);
if (!messageCore.IsTransit) // let's not do this for transit messages foreach (Message preMessage in messages)
{ {
foreach (Message preMessage in messages) if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H)
{ {
if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H) if (preMessage.Elements.Count > 0)
{ {
if (preMessage.Elements.Count > 0) PRE72H pre72h = preMessage.Elements[0] as PRE72H;
{ pre72h.Tanker = stat.IsTanker;
PRE72H pre72h = preMessage.Elements[0] as PRE72H; ExcelReader.SaveMessage(preMessage);
pre72h.Tanker = stat.IsTanker;
ExcelReader.SaveMessage(preMessage);
}
} }
} }
} }
@ -1470,7 +1467,7 @@ namespace ENI2.Excel
bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", 82 + i)); bool? PortOfCallLast30DaysCrewMembersJoinedFlag = reader.ReadCellAsBool(sheetTitle, string.Format("H{0}", 82 + i));
string crewNameString = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 82 + i)); string crewNameString = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 82 + i));
poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty() && (crewNameString.Length > 1); poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty();
// if crew members joined is set explicitly to true and the name is empty, still set the field to true // if crew members joined is set explicitly to true and the name is empty, still set the field to true
if (!(poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false) && (PortOfCallLast30DaysCrewMembersJoinedFlag ?? false)) if (!(poc30d.PortOfCallLast30DaysCrewMembersJoined ?? false) && (PortOfCallLast30DaysCrewMembersJoinedFlag ?? false))
@ -1691,7 +1688,7 @@ namespace ENI2.Excel
l10fc.PortFacilityDateOfArrival = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 54 + i)); l10fc.PortFacilityDateOfArrival = reader.ReadCellAsDateTime(sheetTitle, string.Format("G{0}", 54 + i));
l10fc.PortFacilityDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 54 + i)); l10fc.PortFacilityDateOfDeparture = reader.ReadCellAsDateTime(sheetTitle, string.Format("H{0}", 54 + i));
string sLevel = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 54 + i)); string sLevel = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 54 + i), 1);
if (!sLevel.IsNullOrEmpty()) if (!sLevel.IsNullOrEmpty())
{ {
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1; if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;

View File

@ -369,12 +369,9 @@ namespace ENI2.SheetDisplayControls
this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.textBox_AgentPostalCode.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber; this.textBox_AgentStreetAndNumber.Text = this._currentTemplate.AgentStreetAndNumber;
this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource(); this.textBox_AgentStreetAndNumber.GetBindingExpression(TextBox.TextProperty).UpdateSource();
if (this._currentTemplate.WasteDisposalServiceProviderName != this.textBox_WasteDisposalServiceProvider.Text) this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
{ this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName; this.SublistElementChanged(Message.NotificationClass.WAS);
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource();
this.SublistElementChanged(Message.NotificationClass.WAS);
}
this.buttonUndoTemplate.IsEnabled = true; this.buttonUndoTemplate.IsEnabled = true;
this.buttonSetTemplate.IsEnabled = false; this.buttonSetTemplate.IsEnabled = false;

View File

@ -98,7 +98,7 @@ namespace bsmd.database
public int CompareTo(object obj) public int CompareTo(object obj)
{ {
if (obj is WasteDisposalServiceProvider_Template template) if (obj is WasteDisposalServiceProvider_Template template)
return this.Remark?.CompareTo(template.Remark ?? "") ?? 0; this.Remark?.CompareTo(template.Remark ?? "");
return 0; return 0;
} }