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
if (this.textBox_WasteDisposalServiceProvider.Text.Length > 0)
{
if (MessageBox.Show(Properties.Resources.textConfirmWSDPOverwrite, Properties.Resources.textConfirmation, MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No)
== MessageBoxResult.No) { return; }
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; }
}
this._undoTemplate = createFromCurrentText(null, null);

View File

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

View File

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

View File

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

View File

@ -2174,7 +2174,9 @@ namespace ENI2.Properties {
}
/// <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>
public static string textConfirmWSDPOverwrite {
get {

View File

@ -2258,6 +2258,8 @@
<value>NSW-Status</value>
</data>
<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>
</root>

View File

@ -342,7 +342,8 @@ namespace ENI2.SheetDisplayControls
// confirm overwrite of waste disposal service provider
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; }
}