completely reload core after copy operation

This commit is contained in:
Daniel Schick 2024-07-23 08:48:27 +02:00
parent 1947c30010
commit f9f8980e09
2 changed files with 46 additions and 40 deletions

View File

@ -417,6 +417,7 @@ namespace ENI2
newMessage.SaveElements();
}
DBManager.GetSingleCon(Properties.Settings.Default.ConnectionString).LoadXtraData(newCore); // reload data from DB and set all rel properites
this.OnOpenNewCoreRequested(newCore);
}
};

View File

@ -295,12 +295,7 @@ namespace bsmd.database
List<MessageCore> result = new List<MessageCore>();
foreach (MessageCore core in cores.Cast<MessageCore>())
{
this.LoadCustomer(core);
this.LoadSTATShipName(core);
this.LoadETA_ETD(core);
this.LoadATA(core);
this.LoadATD(core);
this.LoadNumberSent(core);
LoadXtraData(core);
result.Add(core);
}
@ -310,6 +305,16 @@ namespace bsmd.database
return result;
}
public void LoadXtraData(MessageCore core)
{
this.LoadCustomer(core);
this.LoadSTATShipName(core);
this.LoadETA_ETD(core);
this.LoadATA(core);
this.LoadATD(core);
this.LoadNumberSent(core);
}
/// <summary>
/// Lädt MessageCore (=Schiffsanlauf) einer EU-NOAD Nachricht vom Fleettracker / Herberg
/// </summary>