Compare commits

...

3 Commits

7 changed files with 28 additions and 24 deletions

View File

@ -364,8 +364,8 @@ namespace ENI2.DetailViewControls
// confirm overwrite of waste disposal service provider // confirm overwrite of waste disposal service provider
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0) if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
{ {
if (MessageBox.Show(Properties.Resources.textConfirmWSDPOverwrite, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) string message = string.Format(Properties.Resources.textConfirmWSDPOverwrite, this.textBox_WasteDisposalServiceProvider.Text, this._currentTemplate.WasteDisposalServiceProviderName);
== MessageBoxResult.No) { return; } if (MessageBox.Show(message, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) { return; }
} }
this._undoTemplate = createFromCurrentText(null, null); this._undoTemplate = createFromCurrentText(null, null);

View File

@ -66,22 +66,21 @@ namespace ENI2.EditControls
// these are of no interest // these are of no interest
if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) || if ((aMessage.MessageNotificationClass == Message.NotificationClass.VISIT) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) || (aMessage.MessageNotificationClass == Message.NotificationClass.TRANSIT) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.STO)) (aMessage.MessageNotificationClass == Message.NotificationClass.STO))
continue; continue;
// these are never imported but may be sent // these are neither imported nor sent by the Send all function
if (IsImportMode)
{ if ((aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
if ((aMessage.MessageNotificationClass == Message.NotificationClass.ATA) || (aMessage.MessageNotificationClass == Message.NotificationClass.ATD))
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD)) continue;
continue;
}
// filter out messages not relevant for transit // filter out messages not relevant for transit
if (IsTransit && ( if (IsTransit && (
(aMessage.MessageNotificationClass == Message.NotificationClass.ATA) || (aMessage.MessageNotificationClass == Message.NotificationClass.ATA) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.ATD) || (aMessage.MessageNotificationClass == Message.NotificationClass.ATD) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) || (aMessage.MessageNotificationClass == Message.NotificationClass.BKRD) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) || (aMessage.MessageNotificationClass == Message.NotificationClass.HAZD) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.INFO) || (aMessage.MessageNotificationClass == Message.NotificationClass.INFO) ||
(aMessage.MessageNotificationClass == Message.NotificationClass.LADG) || (aMessage.MessageNotificationClass == Message.NotificationClass.LADG) ||
@ -100,9 +99,9 @@ namespace ENI2.EditControls
sc.IsSelected = this._preselectedClasses.Contains(sc.Class); sc.IsSelected = this._preselectedClasses.Contains(sc.Class);
_selectClasses.Add(sc); _selectClasses.Add(sc);
} }
this.checkListBoxClasses.ItemsSource = _selectClasses;
this.checkListBoxClasses.ItemsSource = _selectClasses;
this.OKClicked += SelectImportClassesDialog_OKClicked; this.OKClicked += SelectImportClassesDialog_OKClicked;
} }
@ -128,7 +127,7 @@ namespace ENI2.EditControls
OnPropertyChanged("IsSelected"); OnPropertyChanged("IsSelected");
} }
} }
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName) protected void OnPropertyChanged(string propertyName)
{ {

View File

@ -128,7 +128,7 @@ namespace ENI2.Excel
if (portName.IsNullOrEmpty()) if (portName.IsNullOrEmpty())
{ {
_log.WarnFormat("unknown Locode {0}", val); _log.WarnFormat("unknown Locode {0}", val);
val = ""; val = null;
} }
} }
return val; return val;

View File

@ -1286,10 +1286,10 @@ namespace ENI2.Excel
waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort waste.WasteDisposalPort = reader.ReadSSNLocode(wastePort); // aka RemainingWasteDisposalPort
//if (waste.WasteDisposalPort.IsNullOrEmpty()) if ((waste.WasteDisposalPort != null) && (waste.WasteDisposalPort == string.Empty))
//{ {
// waste.WasteDisposalPort = "ZZUKN"; waste.WasteDisposalPort = "ZZUKN";
//} }
waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen); waste.WasteAmountGeneratedTillNextPort_MTQ = reader.ReadNumber(amountGen);
@ -1299,7 +1299,7 @@ namespace ENI2.Excel
} }
} }
// was.AddMissingWaste(); was.AddMissingWaste();
return true; return true;
} }

View File

@ -2174,7 +2174,9 @@ namespace ENI2.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to The existing value for the waste disposal service provider will be overwritten. Proceed?. /// Looks up a localized string similar to The existing value for the waste disposal service provider will be overwritten.
///Current entry:{0} New entry:{1}
///Proceed?.
/// </summary> /// </summary>
public static string textConfirmWSDPOverwrite { public static string textConfirmWSDPOverwrite {
get { get {

View File

@ -2258,6 +2258,8 @@
<value>NSW-Status</value> <value>NSW-Status</value>
</data> </data>
<data name="textConfirmWSDPOverwrite" xml:space="preserve"> <data name="textConfirmWSDPOverwrite" xml:space="preserve">
<value>The existing value for the waste disposal service provider will be overwritten. Proceed?</value> <value>The existing value for the waste disposal service provider will be overwritten.
Current entry:{0} New entry:{1}
Proceed?</value>
</data> </data>
</root> </root>

View File

@ -342,7 +342,8 @@ namespace ENI2.SheetDisplayControls
// confirm overwrite of waste disposal service provider // confirm overwrite of waste disposal service provider
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0) if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
{ {
if (MessageBox.Show(Properties.Resources.textConfirmWSDPOverwrite, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) string message = string.Format(Properties.Resources.textConfirmWSDPOverwrite, this.textBox_WasteDisposalServiceProvider.Text, this._currentTemplate.WasteDisposalServiceProviderName);
if (MessageBox.Show(message, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No)
== MessageBoxResult.No) { return; } == MessageBoxResult.No) { return; }
} }