Version 6.0.8 ausgeliefert

This commit is contained in:
Daniel Schick 2020-08-12 13:31:11 +00:00
parent 7671bc0260
commit 658cd11977
6 changed files with 70 additions and 4 deletions

View File

@ -570,7 +570,7 @@ namespace ENI2.DetailViewControls
}
else
{
if(this.Core.InitialHIS != _message.HIS)
if((this.Core.InitialHIS != _message.HIS) && (_message.HIS != Message.NSWProvider.UNDEFINED))
{
MessageBox.Show(Properties.Resources.textHISNotMatching, Properties.Resources.textConfirm, MessageBoxButton.OK, MessageBoxImage.Exclamation);
return;

View File

@ -373,6 +373,8 @@ namespace ENI2.DetailViewControls
DictionaryEntry selectedItem = (DictionaryEntry) this.comboBoxGroup.SelectedItem;
if(Int32.TryParse((string)selectedItem.Value, out int selectedValue))
{
if (selectedValue == (int)MessageCore.CoreFlags.MAERSK_BHV) CheckServiceEntryMaerskBHV();
if (selectedValue == (int)MessageCore.CoreFlags.SEAGO_BHV) CheckServiceEntrySeaGoBHV();
this.Core.SetFlag(true, (MessageCore.CoreFlags)selectedValue);
DBManager.Instance.Save(this.Core);
}
@ -380,5 +382,55 @@ namespace ENI2.DetailViewControls
#endregion
#region special entry ship service check
private void CheckServiceEntryMaerskBHV()
{
bool found = false;
foreach(SERV serv in this._servMessage.Elements)
{
if (serv.ServiceBeneficiary.Equals("Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655"))
found = true;
}
if(!found)
{
SERV newServ = new SERV();
newServ.ServiceBeneficiary = "Maersk A/S, Esplanaden 50, DK-1263 Copenhagen K, VAT-ID: DK53139655";
newServ.ServiceInvoiceRecipient = "Maersk Deutschland A/S & Co.KG, Ericusspitze 2-4, 20457 Hamburg";
newServ.ServiceName = "Maersk BHV";
newServ.MessageHeader = this._servMessage;
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
this._servMessage.Elements.Add(newServ);
this.dataGridSERV.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.SERV);
}
}
private void CheckServiceEntrySeaGoBHV()
{
bool found = false;
foreach (SERV serv in this._servMessage.Elements)
{
if (serv.ServiceBeneficiary.Equals("Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655"))
found = true;
}
if (!found)
{
SERV newServ = new SERV();
newServ.ServiceBeneficiary = "Sealand Europe A/S, Dampfaergevej 10, 3.tv, DK- 2100 Copenhagen, VAT-ID: DK53139655";
newServ.ServiceInvoiceRecipient = "Sealand Europe Deutschland A/S & Co. KG, Ericusspitze 2-4, 20457 Hamburg";
newServ.ServiceName = "SeaGo BHV";
newServ.MessageHeader = this._servMessage;
newServ.Identifier = SERV.GetNewIdentifier(_servMessage.Elements);
this._servMessage.Elements.Add(newServ);
this.dataGridSERV.Items.Refresh();
this.SublistElementChanged(Message.NotificationClass.SERV);
}
}
#endregion
}
}

View File

@ -35,7 +35,7 @@
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>6.0.7.%2a</ApplicationVersion>
<ApplicationVersion>6.0.8.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>

Binary file not shown.

View File

@ -630,6 +630,11 @@ namespace bsmd.database
RuleEngine.ValidateProperties(poc30d, errors, violations);
poc30d.Validate(errors, violations);
}
foreach (SanitaryMeasuresDetail smd in this.SanitaryMeasuresDetails)
{
RuleEngine.ValidateProperties(smd, errors, violations);
}
}
}

View File

@ -36,17 +36,18 @@ namespace bsmd.database
[ShowReport]
[MaxLength(99)]
[ENI2Validation]
[Validation2(ValidationCode.STRING_MAXLEN, 99)]
[Validation2(ValidationCode.NOT_NULL_MAX_LEN, 99)]
public string SanitaryMeasuresType { get; set; }
[ShowReport]
[MaxLength(99)]
[ENI2Validation]
[Validation2(ValidationCode.STRING_MAXLEN, 99)]
[Validation2(ValidationCode.NOT_NULL_MAX_LEN, 99)]
public string SanitaryMeasuresLocation { get; set; }
[ShowReport]
[ENI2Validation]
[Validation2(ValidationCode.NOT_NULL)]
public DateTime? SanitaryMeasuresDate { get; set; }
public string Identifier { get; set; }
@ -128,6 +129,14 @@ namespace bsmd.database
#endregion
#region Validation
public override ValidationBlock GetValidationBlock()
{
return ValidationBlock.BLOCK2;
}
#endregion
}