Fixed saving of name of master after programmatic update
This commit is contained in:
parent
abc2afdc11
commit
ef96795bbf
@ -470,125 +470,6 @@ namespace ENI2.DetailViewControls
|
|||||||
this.buttonSetTemplate.IsEnabled = false;
|
this.buttonSetTemplate.IsEnabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region special entry ship service check
|
|
||||||
|
|
||||||
private void CheckServiceEntryMaerskBHV()
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
foreach(SERV serv in _servMessage.Elements.Cast<SERV>())
|
|
||||||
{
|
|
||||||
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, Johanniswall 7, 20095 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 _servMessage.Elements.Cast<SERV>())
|
|
||||||
{
|
|
||||||
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 = "Maersk Deutschland A/S & Co. KG on behalf of Sealand Europe A/S, Johanniswall 7, 20095 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void CheckServiceEntryHoegh()
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
|
||||||
{
|
|
||||||
if (serv.ServiceBeneficiary.Equals("Höegh Autoliners AS, Oslo, Norway"))
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
SERV newServ = new SERV();
|
|
||||||
newServ.ServiceBeneficiary = "Höegh Autoliners AS, Oslo, Norway";
|
|
||||||
newServ.ServiceInvoiceRecipient = " PWL Port Services GmbH & Co. KG";
|
|
||||||
newServ.ServiceName = "HOEGH 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 CheckServiceEntryFctJunge()
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
|
||||||
{
|
|
||||||
if (serv.ServiceName.Equals("Fct Junge - Hamburg"))
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
SERV newServ = new SERV();
|
|
||||||
newServ.ServiceBeneficiary = "";
|
|
||||||
newServ.ServiceInvoiceRecipient = " Frachtcontor Junge & Co. GmbH";
|
|
||||||
newServ.ServiceName = "Fct Junge - Hamburg";
|
|
||||||
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 CheckServiceEntryElbeBulk()
|
|
||||||
{
|
|
||||||
bool found = false;
|
|
||||||
foreach (SERV serv in _servMessage.Elements.Cast<SERV>())
|
|
||||||
{
|
|
||||||
if (serv.ServiceName.Equals("Elbe Bulk Schiffe - Hamburg"))
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!found)
|
|
||||||
{
|
|
||||||
SERV newServ = new SERV();
|
|
||||||
newServ.ServiceBeneficiary = "";
|
|
||||||
newServ.ServiceInvoiceRecipient = " Division Elbe Bulk, Frachtcontor Junge & Co. GmbH";
|
|
||||||
newServ.ServiceName = "Elbe Bulk Schiffe - Hamburg";
|
|
||||||
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 buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
private void buttonSearchPortArea_Click(object sender, RoutedEventArgs e)
|
||||||
@ -610,8 +491,6 @@ namespace ENI2.DetailViewControls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void buttonCopyNameFromCREWA_Click(object sender, RoutedEventArgs e)
|
private void buttonCopyNameFromCREWA_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
CREW crewA = null;
|
CREW crewA = null;
|
||||||
@ -628,8 +507,12 @@ namespace ENI2.DetailViewControls
|
|||||||
{
|
{
|
||||||
this.textBox_NameMaster.Text = $"{crewA.CrewMemberFirstName} {crewA.CrewMemberLastName}";
|
this.textBox_NameMaster.Text = $"{crewA.CrewMemberFirstName} {crewA.CrewMemberLastName}";
|
||||||
this.SublistElementChanged(Message.NotificationClass.NAME);
|
this.SublistElementChanged(Message.NotificationClass.NAME);
|
||||||
|
var binding = textBox_NameMaster.GetBindingExpression(TextBox.TextProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>1</ApplicationRevision>
|
<ApplicationRevision>1</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.9.0</ApplicationVersion>
|
<ApplicationVersion>7.2.9.1</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
@ -249,6 +249,8 @@ namespace ENI2.SheetDisplayControls
|
|||||||
{
|
{
|
||||||
this.textBox_NameMaster.Text = $"{crewA.CrewMemberFirstName} {crewA.CrewMemberLastName}";
|
this.textBox_NameMaster.Text = $"{crewA.CrewMemberFirstName} {crewA.CrewMemberLastName}";
|
||||||
this.SublistElementChanged(Message.NotificationClass.NAME);
|
this.SublistElementChanged(Message.NotificationClass.NAME);
|
||||||
|
var binding = textBox_NameMaster.GetBindingExpression(TextBox.TextProperty);
|
||||||
|
binding?.UpdateSource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user