Compare commits

...

3 Commits

6 changed files with 27 additions and 18 deletions

View File

@ -56,7 +56,7 @@
</Grid> </Grid>
</ControlTemplate> </ControlTemplate>
<!-- Validation Error Template for a DataGrid Row --> <!-- Validation Error Template for a DataGrid Row -->
@ -80,7 +80,7 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="{x:Type ToolTip}" > <Style TargetType="{x:Type ToolTip}" >

View File

@ -390,9 +390,12 @@ 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();
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName; if (this._currentTemplate.WasteDisposalServiceProviderName != this.textBox_WasteDisposalServiceProvider.Text)
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource(); {
this.SublistElementChanged(Message.NotificationClass.WAS); this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
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 PreviewMouseWheel="ScrollViewer_PreviewMouseWheel"> <ScrollViewer>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="50" /> <RowDefinition Height="50" />

View File

@ -1007,15 +1007,18 @@ namespace ENI2.Excel
STAT stat = statMessage.Elements[0] as STAT; STAT stat = statMessage.Elements[0] as STAT;
ScanMessage(stat, reader); ScanMessage(stat, reader);
foreach (Message preMessage in messages) if (!messageCore.IsTransit) // let's not do this for transit messages
{ {
if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H) foreach (Message preMessage in messages)
{ {
if (preMessage.Elements.Count > 0) if (preMessage.MessageNotificationClass == Message.NotificationClass.PRE72H)
{ {
PRE72H pre72h = preMessage.Elements[0] as PRE72H; if (preMessage.Elements.Count > 0)
pre72h.Tanker = stat.IsTanker; {
ExcelReader.SaveMessage(preMessage); PRE72H pre72h = preMessage.Elements[0] as PRE72H;
pre72h.Tanker = stat.IsTanker;
ExcelReader.SaveMessage(preMessage);
}
} }
} }
} }
@ -1467,7 +1470,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(); poc30d.PortOfCallLast30DaysCrewMembersJoined = !crewNameString.IsNullOrEmpty() && (crewNameString.Length > 1);
// 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))
@ -1688,7 +1691,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), 1); string sLevel = reader.ReadCellAsText(sheetTitle, string.Format("I{0}", 54 + i));
if (!sLevel.IsNullOrEmpty()) if (!sLevel.IsNullOrEmpty())
{ {
if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1; if (sLevel.Contains('1')) l10fc.PortFacilityShipSecurityLevel = 1;

View File

@ -369,9 +369,12 @@ 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();
this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName; if (this._currentTemplate.WasteDisposalServiceProviderName != this.textBox_WasteDisposalServiceProvider.Text)
this.textBox_WasteDisposalServiceProvider.GetBindingExpression(TextBox.TextProperty).UpdateSource(); {
this.SublistElementChanged(Message.NotificationClass.WAS); this.textBox_WasteDisposalServiceProvider.Text = this._currentTemplate.WasteDisposalServiceProviderName;
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)
this.Remark?.CompareTo(template.Remark ?? ""); return this.Remark?.CompareTo(template.Remark ?? "") ?? 0;
return 0; return 0;
} }